add some view modes and fix a slide bug

This commit is contained in:
tildearrow 2021-05-19 02:05:24 -05:00
parent 09ed99f0b0
commit 471cd2d68d
3 changed files with 145 additions and 68 deletions

View file

@ -29,7 +29,9 @@ enum DivDispatchCmds {
DIV_CMD_ARCADE_LFO, DIV_CMD_ARCADE_LFO,
DIV_CMD_STD_NOISE_FREQ, DIV_CMD_STD_NOISE_FREQ,
DIV_CMD_STD_NOISE_MODE DIV_CMD_STD_NOISE_MODE,
DIV_CMD_MAX
}; };
struct DivCommand { struct DivCommand {

View file

@ -5,6 +5,12 @@
#include "../audio/taAudio.h" #include "../audio/taAudio.h"
#include "blip_buf.h" #include "blip_buf.h"
enum DivStatusView {
DIV_STATUS_NOTHING=0,
DIV_STATUS_PATTERN,
DIV_STATUS_COMMANDS
};
struct DivChannelState { struct DivChannelState {
std::vector<DivDelayedCommand> delayed; std::vector<DivDelayedCommand> delayed;
int note, pitch, portaSpeed, portaNote; int note, pitch, portaSpeed, portaNote;
@ -12,7 +18,7 @@ struct DivChannelState {
int vibratoDepth, vibratoRate, vibratoPos, vibratoDir, vibratoFine; int vibratoDepth, vibratoRate, vibratoPos, vibratoDir, vibratoFine;
int tremoloDepth, tremoloRate, tremoloPos; int tremoloDepth, tremoloRate, tremoloPos;
unsigned char arp, arpStage, arpTicks; unsigned char arp, arpStage, arpTicks;
bool doNote, legato; bool doNote, legato, portaStop;
DivChannelState(): DivChannelState():
note(-1), note(-1),
@ -34,7 +40,7 @@ struct DivChannelState {
arp(0), arp(0),
arpStage(-1), arpStage(-1),
arpTicks(1), arpTicks(1),
doNote(false), legato(false) {} doNote(false), legato(false), portaStop(false) {}
}; };
class DivEngine { class DivEngine {
@ -45,7 +51,8 @@ class DivEngine {
bool playing; bool playing;
bool speedAB; bool speedAB;
int ticks, cycles, curRow, curOrder; int ticks, cycles, curRow, curOrder;
int changeOrd, changePos; int changeOrd, changePos, totalTicks, totalCmds, lastCmds, cmdsPerSecond;
DivStatusView view;
DivChannelState chan[17]; DivChannelState chan[17];
short vibTable[64]; short vibTable[64];
@ -54,6 +61,7 @@ class DivEngine {
int temp[2], prevSample[2]; int temp[2], prevSample[2];
short* bbOut[2]; short* bbOut[2];
int dispatchCmd(DivCommand c);
void processRow(int i, bool afterDelay); void processRow(int i, bool afterDelay);
void nextOrder(); void nextOrder();
void nextRow(); void nextRow();
@ -87,6 +95,11 @@ class DivEngine {
curOrder(0), curOrder(0),
changeOrd(-1), changeOrd(-1),
changePos(0), changePos(0),
totalTicks(0),
totalCmds(0),
lastCmds(0),
cmdsPerSecond(0),
view(DIV_STATUS_PATTERN),
temp{0,0}, temp{0,0},
prevSample{0,0} {} prevSample{0,0} {}
}; };

View file

@ -11,6 +11,35 @@ const char* notes[12]={
"C-", "C#", "D-", "D#", "E-", "F-", "F#", "G-", "G#", "A-", "A#", "B-" "C-", "C#", "D-", "D#", "E-", "F-", "F#", "G-", "G#", "A-", "A#", "B-"
}; };
const char* cmdName[DIV_CMD_MAX]={
"NOTE_ON",
"NOTE_OFF",
"INSTRUMENT",
"VOLUME",
"GET_VOLUME",
"GET_VOLMAX",
"NOTE_PORTA",
"PITCH",
"PANNING",
"LEGATO",
"PRE_PORTA",
"SAMPLE_MODE",
"FM_TL",
"FM_AR",
"FM_FB",
"FM_MULT",
"FM_EXTCH",
"GENESIS_LFO",
"ARCADE_LFO",
"STD_NOISE_FREQ",
"STD_NOISE_MODE"
};
const char* formatNote(unsigned char note, unsigned char octave) { const char* formatNote(unsigned char note, unsigned char octave) {
static char ret[4]; static char ret[4];
if (note==100) { if (note==100) {
@ -22,16 +51,24 @@ const char* formatNote(unsigned char note, unsigned char octave) {
return ret; return ret;
} }
int DivEngine::dispatchCmd(DivCommand c) {
if (view==DIV_STATUS_COMMANDS) {
printf("%8d | %d: %s(%d, %d)\n",totalTicks,c.chan,cmdName[c.cmd],c.value,c.value2);
}
totalCmds++;
return dispatch->dispatch(c);
}
bool DivEngine::perSystemEffect(int ch, unsigned char effect, unsigned char effectVal) { bool DivEngine::perSystemEffect(int ch, unsigned char effect, unsigned char effectVal) {
switch (song.system) { switch (song.system) {
case DIV_SYSTEM_GENESIS: case DIV_SYSTEM_GENESIS:
case DIV_SYSTEM_GENESIS_EXT: case DIV_SYSTEM_GENESIS_EXT:
switch (effect) { switch (effect) {
case 0x17: // DAC enable case 0x17: // DAC enable
dispatch->dispatch(DivCommand(DIV_CMD_SAMPLE_MODE,ch,(effectVal>0))); dispatchCmd(DivCommand(DIV_CMD_SAMPLE_MODE,ch,(effectVal>0)));
break; break;
case 0x20: // SN noise mode case 0x20: // SN noise mode
dispatch->dispatch(DivCommand(DIV_CMD_STD_NOISE_MODE,ch,effectVal)); dispatchCmd(DivCommand(DIV_CMD_STD_NOISE_MODE,ch,effectVal));
break; break;
default: default:
return false; return false;
@ -40,7 +77,7 @@ bool DivEngine::perSystemEffect(int ch, unsigned char effect, unsigned char effe
case DIV_SYSTEM_SMS: case DIV_SYSTEM_SMS:
switch (effect) { switch (effect) {
case 0x20: // SN noise mode case 0x20: // SN noise mode
dispatch->dispatch(DivCommand(DIV_CMD_STD_NOISE_MODE,ch,effectVal)); dispatchCmd(DivCommand(DIV_CMD_STD_NOISE_MODE,ch,effectVal));
break; break;
default: default:
return false; return false;
@ -58,42 +95,42 @@ bool DivEngine::perSystemPostEffect(int ch, unsigned char effect, unsigned char
case DIV_SYSTEM_GENESIS_EXT: case DIV_SYSTEM_GENESIS_EXT:
switch (effect) { switch (effect) {
case 0x11: // FB case 0x11: // FB
dispatch->dispatch(DivCommand(DIV_CMD_FM_FB,ch,effectVal&7)); dispatchCmd(DivCommand(DIV_CMD_FM_FB,ch,effectVal&7));
break; break;
case 0x12: // TL op1 case 0x12: // TL op1
dispatch->dispatch(DivCommand(DIV_CMD_FM_TL,ch,0,effectVal&0x7f)); dispatchCmd(DivCommand(DIV_CMD_FM_TL,ch,0,effectVal&0x7f));
break; break;
case 0x13: // TL op2 case 0x13: // TL op2
dispatch->dispatch(DivCommand(DIV_CMD_FM_TL,ch,1,effectVal&0x7f)); dispatchCmd(DivCommand(DIV_CMD_FM_TL,ch,1,effectVal&0x7f));
break; break;
case 0x14: // TL op3 case 0x14: // TL op3
dispatch->dispatch(DivCommand(DIV_CMD_FM_TL,ch,2,effectVal&0x7f)); dispatchCmd(DivCommand(DIV_CMD_FM_TL,ch,2,effectVal&0x7f));
break; break;
case 0x15: // TL op4 case 0x15: // TL op4
dispatch->dispatch(DivCommand(DIV_CMD_FM_TL,ch,3,effectVal&0x7f)); dispatchCmd(DivCommand(DIV_CMD_FM_TL,ch,3,effectVal&0x7f));
break; break;
case 0x16: // MULT case 0x16: // MULT
if ((effectVal>>4)>0 && (effectVal>>4)<5) { if ((effectVal>>4)>0 && (effectVal>>4)<5) {
dispatch->dispatch(DivCommand(DIV_CMD_FM_MULT,ch,(effectVal>>4)-1,effectVal&15)); dispatchCmd(DivCommand(DIV_CMD_FM_MULT,ch,(effectVal>>4)-1,effectVal&15));
} }
break; break;
case 0x18: // EXT case 0x18: // EXT
dispatch->dispatch(DivCommand(DIV_CMD_FM_EXTCH,ch,effectVal)); dispatchCmd(DivCommand(DIV_CMD_FM_EXTCH,ch,effectVal));
break; break;
case 0x19: // AR global case 0x19: // AR global
dispatch->dispatch(DivCommand(DIV_CMD_FM_AR,ch,-1,effectVal&31)); dispatchCmd(DivCommand(DIV_CMD_FM_AR,ch,-1,effectVal&31));
break; break;
case 0x1a: // AR op1 case 0x1a: // AR op1
dispatch->dispatch(DivCommand(DIV_CMD_FM_AR,ch,0,effectVal&31)); dispatchCmd(DivCommand(DIV_CMD_FM_AR,ch,0,effectVal&31));
break; break;
case 0x1b: // AR op2 case 0x1b: // AR op2
dispatch->dispatch(DivCommand(DIV_CMD_FM_AR,ch,1,effectVal&31)); dispatchCmd(DivCommand(DIV_CMD_FM_AR,ch,1,effectVal&31));
break; break;
case 0x1c: // AR op3 case 0x1c: // AR op3
dispatch->dispatch(DivCommand(DIV_CMD_FM_AR,ch,2,effectVal&31)); dispatchCmd(DivCommand(DIV_CMD_FM_AR,ch,2,effectVal&31));
break; break;
case 0x1d: // AR op4 case 0x1d: // AR op4
dispatch->dispatch(DivCommand(DIV_CMD_FM_AR,ch,3,effectVal&31)); dispatchCmd(DivCommand(DIV_CMD_FM_AR,ch,3,effectVal&31));
break; break;
default: default:
return false; return false;
@ -121,12 +158,12 @@ void DivEngine::processRow(int i, bool afterDelay) {
// instrument // instrument
if (pat->data[curRow][2]!=-1) { if (pat->data[curRow][2]!=-1) {
dispatch->dispatch(DivCommand(DIV_CMD_INSTRUMENT,i,pat->data[curRow][2])); dispatchCmd(DivCommand(DIV_CMD_INSTRUMENT,i,pat->data[curRow][2]));
} }
// note // note
if (pat->data[curRow][0]==100) { if (pat->data[curRow][0]==100) {
chan[i].note=-1; chan[i].note=-1;
dispatch->dispatch(DivCommand(DIV_CMD_NOTE_OFF,i)); dispatchCmd(DivCommand(DIV_CMD_NOTE_OFF,i));
} else if (!(pat->data[curRow][0]==0 && pat->data[curRow][1]==0)) { } else if (!(pat->data[curRow][0]==0 && pat->data[curRow][1]==0)) {
chan[i].note=pat->data[curRow][0]+pat->data[curRow][1]*12; chan[i].note=pat->data[curRow][0]+pat->data[curRow][1]*12;
chan[i].doNote=true; chan[i].doNote=true;
@ -136,7 +173,7 @@ void DivEngine::processRow(int i, bool afterDelay) {
if (pat->data[curRow][3]!=-1) { if (pat->data[curRow][3]!=-1) {
if ((MIN(chan[i].volMax,chan[i].volume)>>8)!=pat->data[curRow][3]) { if ((MIN(chan[i].volMax,chan[i].volume)>>8)!=pat->data[curRow][3]) {
chan[i].volume=pat->data[curRow][3]<<8; chan[i].volume=pat->data[curRow][3]<<8;
dispatch->dispatch(DivCommand(DIV_CMD_VOLUME,i,chan[i].volume>>8)); dispatchCmd(DivCommand(DIV_CMD_VOLUME,i,chan[i].volume>>8));
} }
} }
@ -164,7 +201,7 @@ void DivEngine::processRow(int i, bool afterDelay) {
changePos=effectVal; changePos=effectVal;
break; break;
case 0x08: // panning case 0x08: // panning
dispatch->dispatch(DivCommand(DIV_CMD_PANNING,i,effectVal)); dispatchCmd(DivCommand(DIV_CMD_PANNING,i,effectVal));
break; break;
case 0x01: // ramp up case 0x01: // ramp up
if (effectVal==0) { if (effectVal==0) {
@ -173,6 +210,7 @@ void DivEngine::processRow(int i, bool afterDelay) {
} else { } else {
chan[i].portaNote=0x60; chan[i].portaNote=0x60;
chan[i].portaSpeed=effectVal; chan[i].portaSpeed=effectVal;
chan[i].portaStop=false;
} }
break; break;
case 0x02: // ramp down case 0x02: // ramp down
@ -182,6 +220,7 @@ void DivEngine::processRow(int i, bool afterDelay) {
} else { } else {
chan[i].portaNote=0x00; chan[i].portaNote=0x00;
chan[i].portaSpeed=effectVal; chan[i].portaSpeed=effectVal;
chan[i].portaStop=false;
} }
break; break;
case 0x03: // portamento case 0x03: // portamento
@ -191,14 +230,15 @@ void DivEngine::processRow(int i, bool afterDelay) {
} else { } else {
chan[i].portaNote=chan[i].note; chan[i].portaNote=chan[i].note;
chan[i].portaSpeed=effectVal; chan[i].portaSpeed=effectVal;
chan[i].portaStop=true;
chan[i].doNote=false; chan[i].doNote=false;
dispatch->dispatch(DivCommand(DIV_CMD_PRE_PORTA,i)); dispatchCmd(DivCommand(DIV_CMD_PRE_PORTA,i));
} }
break; break;
case 0x04: // vibrato case 0x04: // vibrato
chan[i].vibratoDepth=effectVal&15; chan[i].vibratoDepth=effectVal&15;
chan[i].vibratoRate=effectVal>>4; chan[i].vibratoRate=effectVal>>4;
dispatch->dispatch(DivCommand(DIV_CMD_PITCH,i,chan[i].pitch+(((chan[i].vibratoDepth*vibTable[chan[i].vibratoPos]*chan[i].vibratoFine)>>4)/15))); dispatchCmd(DivCommand(DIV_CMD_PITCH,i,chan[i].pitch+(((chan[i].vibratoDepth*vibTable[chan[i].vibratoPos]*chan[i].vibratoFine)>>4)/15)));
break; break;
case 0x0a: // volume ramp case 0x0a: // volume ramp
if (effectVal!=0) { if (effectVal!=0) {
@ -224,10 +264,12 @@ void DivEngine::processRow(int i, bool afterDelay) {
case 0xe1: // portamento up case 0xe1: // portamento up
chan[i].portaNote=chan[i].note+(effectVal&15); chan[i].portaNote=chan[i].note+(effectVal&15);
chan[i].portaSpeed=(effectVal>>4)*4; chan[i].portaSpeed=(effectVal>>4)*4;
chan[i].portaStop=true;
break; break;
case 0xe2: // portamento down case 0xe2: // portamento down
chan[i].portaNote=chan[i].note-(effectVal&15); chan[i].portaNote=chan[i].note-(effectVal&15);
chan[i].portaSpeed=(effectVal>>4)*4; chan[i].portaSpeed=(effectVal>>4)*4;
chan[i].portaStop=true;
break; break;
case 0xe3: // vibrato direction case 0xe3: // vibrato direction
chan[i].vibratoDir=effectVal; chan[i].vibratoDir=effectVal;
@ -237,7 +279,7 @@ void DivEngine::processRow(int i, bool afterDelay) {
break; break;
case 0xe5: // pitch case 0xe5: // pitch
chan[i].pitch=effectVal-0x80; chan[i].pitch=effectVal-0x80;
dispatch->dispatch(DivCommand(DIV_CMD_PITCH,i,chan[i].pitch+(((chan[i].vibratoDepth*vibTable[chan[i].vibratoPos]*chan[i].vibratoFine)>>4)/15))); dispatchCmd(DivCommand(DIV_CMD_PITCH,i,chan[i].pitch+(((chan[i].vibratoDepth*vibTable[chan[i].vibratoPos]*chan[i].vibratoFine)>>4)/15)));
break; break;
case 0xea: // legato mode case 0xea: // legato mode
chan[i].legato=effectVal; chan[i].legato=effectVal;
@ -253,11 +295,11 @@ void DivEngine::processRow(int i, bool afterDelay) {
if (chan[i].doNote) { if (chan[i].doNote) {
chan[i].vibratoPos=0; chan[i].vibratoPos=0;
dispatch->dispatch(DivCommand(DIV_CMD_PITCH,i,chan[i].pitch+(((chan[i].vibratoDepth*vibTable[chan[i].vibratoPos]*chan[i].vibratoFine)>>4)/15))); dispatchCmd(DivCommand(DIV_CMD_PITCH,i,chan[i].pitch+(((chan[i].vibratoDepth*vibTable[chan[i].vibratoPos]*chan[i].vibratoFine)>>4)/15)));
if (chan[i].legato) { if (chan[i].legato) {
dispatch->dispatch(DivCommand(DIV_CMD_LEGATO,i,chan[i].note)); dispatchCmd(DivCommand(DIV_CMD_LEGATO,i,chan[i].note));
} else { } else {
dispatch->dispatch(DivCommand(DIV_CMD_NOTE_ON,i,chan[i].note,chan[i].volume>>8)); dispatchCmd(DivCommand(DIV_CMD_NOTE_ON,i,chan[i].note,chan[i].volume>>8));
} }
chan[i].doNote=false; chan[i].doNote=false;
} }
@ -288,6 +330,8 @@ void DivEngine::nextRow() {
} }
changeOrd=-1; changeOrd=-1;
} }
if (view==DIV_STATUS_PATTERN) {
strcpy(pb1,""); strcpy(pb1,"");
strcpy(pb3,""); strcpy(pb3,"");
for (int i=0; i<chans; i++) { for (int i=0; i<chans; i++) {
@ -326,6 +370,7 @@ void DivEngine::nextRow() {
} }
} }
printf("| %.2x:%s | \x1b[1;33m%3d%s\x1b[m\n",curOrder,pb1,curRow,pb3); printf("| %.2x:%s | \x1b[1;33m%3d%s\x1b[m\n",curOrder,pb1,curRow,pb3);
}
for (int i=0; i<chans; i++) { for (int i=0; i<chans; i++) {
chan[i].rowDelay=0; chan[i].rowDelay=0;
@ -360,18 +405,18 @@ void DivEngine::nextTick() {
} }
} }
if (chan[i].volSpeed!=0) { if (chan[i].volSpeed!=0) {
chan[i].volume=(chan[i].volume&0xff)|(dispatch->dispatch(DivCommand(DIV_CMD_GET_VOLUME,i))<<8); chan[i].volume=(chan[i].volume&0xff)|(dispatchCmd(DivCommand(DIV_CMD_GET_VOLUME,i))<<8);
chan[i].volume+=chan[i].volSpeed; chan[i].volume+=chan[i].volSpeed;
if (chan[i].volume>chan[i].volMax) { if (chan[i].volume>chan[i].volMax) {
chan[i].volume=chan[i].volMax; chan[i].volume=chan[i].volMax;
chan[i].volSpeed=0; chan[i].volSpeed=0;
dispatch->dispatch(DivCommand(DIV_CMD_VOLUME,i,chan[i].volume>>8)); dispatchCmd(DivCommand(DIV_CMD_VOLUME,i,chan[i].volume>>8));
} else if (chan[i].volume<0) { } else if (chan[i].volume<0) {
chan[i].volSpeed=0; chan[i].volSpeed=0;
chan[i].volume=chan[i].volMax+1; chan[i].volume=chan[i].volMax+1;
dispatch->dispatch(DivCommand(DIV_CMD_VOLUME,i,chan[i].volume>>8)); dispatchCmd(DivCommand(DIV_CMD_VOLUME,i,chan[i].volume>>8));
} else { } else {
dispatch->dispatch(DivCommand(DIV_CMD_VOLUME,i,chan[i].volume>>8)); dispatchCmd(DivCommand(DIV_CMD_VOLUME,i,chan[i].volume>>8));
} }
} }
if (chan[i].vibratoDepth>0) { if (chan[i].vibratoDepth>0) {
@ -379,26 +424,26 @@ void DivEngine::nextTick() {
if (chan[i].vibratoPos>=64) chan[i].vibratoPos-=64; if (chan[i].vibratoPos>=64) chan[i].vibratoPos-=64;
switch (chan[i].vibratoDir) { switch (chan[i].vibratoDir) {
case 1: // up case 1: // up
dispatch->dispatch(DivCommand(DIV_CMD_PITCH,i,chan[i].pitch+(MAX(0,(chan[i].vibratoDepth*vibTable[chan[i].vibratoPos]*chan[i].vibratoFine)>>4)/15))); dispatchCmd(DivCommand(DIV_CMD_PITCH,i,chan[i].pitch+(MAX(0,(chan[i].vibratoDepth*vibTable[chan[i].vibratoPos]*chan[i].vibratoFine)>>4)/15)));
break; break;
case 2: // down case 2: // down
dispatch->dispatch(DivCommand(DIV_CMD_PITCH,i,chan[i].pitch+(MIN(0,(chan[i].vibratoDepth*vibTable[chan[i].vibratoPos]*chan[i].vibratoFine)>>4)/15))); dispatchCmd(DivCommand(DIV_CMD_PITCH,i,chan[i].pitch+(MIN(0,(chan[i].vibratoDepth*vibTable[chan[i].vibratoPos]*chan[i].vibratoFine)>>4)/15)));
break; break;
default: // both default: // both
dispatch->dispatch(DivCommand(DIV_CMD_PITCH,i,chan[i].pitch+(((chan[i].vibratoDepth*vibTable[chan[i].vibratoPos]*chan[i].vibratoFine)>>4)/15))); dispatchCmd(DivCommand(DIV_CMD_PITCH,i,chan[i].pitch+(((chan[i].vibratoDepth*vibTable[chan[i].vibratoPos]*chan[i].vibratoFine)>>4)/15)));
break; break;
} }
} }
if (chan[i].portaSpeed>0) { if (chan[i].portaSpeed>0) {
if (dispatch->dispatch(DivCommand(DIV_CMD_NOTE_PORTA,i,chan[i].portaSpeed,chan[i].portaNote))==2) { if (dispatchCmd(DivCommand(DIV_CMD_NOTE_PORTA,i,chan[i].portaSpeed,chan[i].portaNote))==2 && chan[i].portaStop) {
chan[i].portaSpeed=0; chan[i].portaSpeed=0;
} }
} }
if (chan[i].cut>0) { if (chan[i].cut>0) {
if (--chan[i].cut<1) { if (--chan[i].cut<1) {
chan[i].note=-1; chan[i].note=-1;
dispatch->dispatch(DivCommand(DIV_CMD_NOTE_OFF,i)); dispatchCmd(DivCommand(DIV_CMD_NOTE_OFF,i));
} }
} }
if (chan[i].arp!=0 && chan[i].portaSpeed<1) { if (chan[i].arp!=0 && chan[i].portaSpeed<1) {
@ -408,13 +453,13 @@ void DivEngine::nextTick() {
if (chan[i].arpStage>2) chan[i].arpStage=0; if (chan[i].arpStage>2) chan[i].arpStage=0;
switch (chan[i].arpStage) { switch (chan[i].arpStage) {
case 0: case 0:
dispatch->dispatch(DivCommand(DIV_CMD_LEGATO,i,chan[i].note)); dispatchCmd(DivCommand(DIV_CMD_LEGATO,i,chan[i].note));
break; break;
case 1: case 1:
dispatch->dispatch(DivCommand(DIV_CMD_LEGATO,i,chan[i].note+(chan[i].arp>>4))); dispatchCmd(DivCommand(DIV_CMD_LEGATO,i,chan[i].note+(chan[i].arp>>4)));
break; break;
case 2: case 2:
dispatch->dispatch(DivCommand(DIV_CMD_LEGATO,i,chan[i].note+(chan[i].arp&15))); dispatchCmd(DivCommand(DIV_CMD_LEGATO,i,chan[i].note+(chan[i].arp&15)));
break; break;
} }
} }
@ -423,6 +468,23 @@ void DivEngine::nextTick() {
// system tick // system tick
dispatch->tick(); dispatch->tick();
totalTicks++;
int hz;
if (song.customTempo) {
hz=song.hz;
} else if (song.pal) {
hz=60;
} else {
hz=50;
}
fprintf(stderr,"\x1b[2K> %d:%.2d:%.2d.%.2d %.2x/%.2x:%.3d/%.3d %4dcmd/s\x1b[G",totalTicks/(hz*3600),(totalTicks/(hz*60))%60,(totalTicks/hz)%60,totalTicks%hz,curOrder,song.ordersLen,curRow,song.patLen,cmdsPerSecond);
if ((totalTicks%hz)==0) {
cmdsPerSecond=totalCmds-lastCmds;
lastCmds=totalCmds;
}
} }
void DivEngine::nextBuf(float** in, float** out, int inChans, int outChans, unsigned int size) { void DivEngine::nextBuf(float** in, float** out, int inChans, int outChans, unsigned int size) {