prepare to fix pitch linearity issues

This commit is contained in:
tildearrow 2025-04-01 14:11:45 -05:00
parent b5faddf319
commit c064cf089d
13 changed files with 49 additions and 454 deletions

View file

@ -29,11 +29,6 @@
void DivEngine::nextOrder() {
curRow=0;
if (repeatPattern) return;
if (curEngineState==3 || curEngineState==17) {
if ((rand()%80)==0) {
return;
}
}
if (++curOrder>=curSubSong->ordersLen) {
logV("end of orders reached");
endOfSong=true;
@ -331,18 +326,6 @@ const char* formatNote(unsigned char note, unsigned char octave) {
}
int DivEngine::dispatchCmd(DivCommand c) {
if (curEngineState==2 || curEngineState==14 || curEngineState==22) {
if (c.cmd==DIV_CMD_NOTE_ON) {
if ((rand()&255)==0) {
c.value++;
}
}
if (c.cmd==DIV_CMD_NOTE_OFF) {
if ((rand()&127)==0) {
return 0;
}
}
}
if (view==DIV_STATUS_COMMANDS) {
if (!skipping) {
switch (c.cmd) {
@ -1441,26 +1424,13 @@ void DivEngine::nextRow() {
changeOrd=-1;
}
if (haltOn==DIV_HALT_PATTERN) halted=true;
} else if (playing) {
if (reverse) {
if (--curRow<1) reverse=false;
} else if (playing) if (++curRow>=curSubSong->patLen) {
if (shallStopSched) {
curRow=curSubSong->patLen-1;
} else {
curRow++;
}
if (curRow>=curSubSong->patLen) {
if (shallStopSched) {
curRow=curSubSong->patLen-1;
} else {
nextOrder();
}
if (haltOn==DIV_HALT_PATTERN) halted=true;
}
if ((curEngineState==4 || curEngineState==21) && (curRow&3)==0 && !skipping) {
if ((rand()%600)==0) {
reverse=true;
}
nextOrder();
}
if (haltOn==DIV_HALT_PATTERN) halted=true;
}
// new loop detection routine
@ -1489,17 +1459,6 @@ void DivEngine::nextRow() {
nextSpeed=speeds.val[curSpeed];
}
if (curEngineState==3 || curEngineState==17) {
if ((rand()%300)==0) {
ticks++;
nextSpeed++;
}
if ((rand()%15000)==0) {
ticks=128;
nextSpeed+=128;
}
}
/*
if (skipping) {
ticks=1;