one thing is fixing bugs
another is bugging fixes
This commit is contained in:
parent
50f6bb536f
commit
5fbaf71105
|
@ -24,7 +24,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, portaStop, keyOn, nowYouCanStop, stopOnOff, arpYield;
|
bool doNote, legato, portaStop, keyOn, nowYouCanStop, stopOnOff, arpYield, delayLocked;
|
||||||
|
|
||||||
DivChannelState():
|
DivChannelState():
|
||||||
note(-1),
|
note(-1),
|
||||||
|
@ -48,7 +48,14 @@ struct DivChannelState {
|
||||||
arp(0),
|
arp(0),
|
||||||
arpStage(-1),
|
arpStage(-1),
|
||||||
arpTicks(1),
|
arpTicks(1),
|
||||||
doNote(false), legato(false), portaStop(false), keyOn(false), nowYouCanStop(true), stopOnOff(false), arpYield(false) {}
|
doNote(false),
|
||||||
|
legato(false),
|
||||||
|
portaStop(false),
|
||||||
|
keyOn(false),
|
||||||
|
nowYouCanStop(true),
|
||||||
|
stopOnOff(false),
|
||||||
|
arpYield(false),
|
||||||
|
delayLocked(false) {}
|
||||||
};
|
};
|
||||||
|
|
||||||
class DivEngine {
|
class DivEngine {
|
||||||
|
@ -59,7 +66,7 @@ class DivEngine {
|
||||||
bool playing;
|
bool playing;
|
||||||
bool speedAB;
|
bool speedAB;
|
||||||
bool endOfSong;
|
bool endOfSong;
|
||||||
int ticks, cycles, curRow, curOrder, remainingLoops;
|
int ticks, cycles, curRow, curOrder, remainingLoops, nextSpeed;
|
||||||
int changeOrd, changePos, totalTicks, totalCmds, lastCmds, cmdsPerSecond;
|
int changeOrd, changePos, totalTicks, totalCmds, lastCmds, cmdsPerSecond;
|
||||||
DivStatusView view;
|
DivStatusView view;
|
||||||
DivChannelState chan[17];
|
DivChannelState chan[17];
|
||||||
|
@ -118,6 +125,7 @@ class DivEngine {
|
||||||
curRow(0),
|
curRow(0),
|
||||||
curOrder(0),
|
curOrder(0),
|
||||||
remainingLoops(-1),
|
remainingLoops(-1),
|
||||||
|
nextSpeed(3),
|
||||||
changeOrd(-1),
|
changeOrd(-1),
|
||||||
changePos(0),
|
changePos(0),
|
||||||
totalTicks(0),
|
totalTicks(0),
|
||||||
|
|
|
@ -265,13 +265,24 @@ void DivEngine::processRow(int i, bool afterDelay) {
|
||||||
|
|
||||||
if (effectVal==-1) effectVal=0;
|
if (effectVal==-1) effectVal=0;
|
||||||
if (effect==0xed && effectVal!=0) {
|
if (effect==0xed && effectVal!=0) {
|
||||||
chan[i].rowDelay=effectVal+1;
|
if (effectVal<=nextSpeed) {
|
||||||
chan[i].delayOrder=whatOrder;
|
chan[i].rowDelay=effectVal+1;
|
||||||
chan[i].delayRow=whatRow;
|
chan[i].delayOrder=whatOrder;
|
||||||
return;
|
chan[i].delayRow=whatRow;
|
||||||
|
if (effectVal==nextSpeed) {
|
||||||
|
chan[i].delayLocked=true;
|
||||||
|
} else {
|
||||||
|
chan[i].delayLocked=false;
|
||||||
|
}
|
||||||
|
return;
|
||||||
|
} else {
|
||||||
|
chan[i].delayLocked=false;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (chan[i].delayLocked) return;
|
||||||
|
|
||||||
// instrument
|
// instrument
|
||||||
if (pat->data[whatRow][2]!=-1) {
|
if (pat->data[whatRow][2]!=-1) {
|
||||||
dispatchCmd(DivCommand(DIV_CMD_INSTRUMENT,i,pat->data[whatRow][2]));
|
dispatchCmd(DivCommand(DIV_CMD_INSTRUMENT,i,pat->data[whatRow][2]));
|
||||||
|
@ -536,8 +547,10 @@ void DivEngine::nextRow() {
|
||||||
|
|
||||||
if (speedAB) {
|
if (speedAB) {
|
||||||
ticks=song.speed2*(song.timeBase+1);
|
ticks=song.speed2*(song.timeBase+1);
|
||||||
|
nextSpeed=song.speed1;
|
||||||
} else {
|
} else {
|
||||||
ticks=song.speed1*(song.timeBase+1);
|
ticks=song.speed1*(song.timeBase+1);
|
||||||
|
nextSpeed=song.speed2;
|
||||||
}
|
}
|
||||||
speedAB=!speedAB;
|
speedAB=!speedAB;
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue