mirror of
https://github.com/tildearrow/furnace.git
synced 2024-11-23 13:05:11 +00:00
one thing is fixing bugs
another is bugging fixes
This commit is contained in:
parent
50f6bb536f
commit
5fbaf71105
2 changed files with 28 additions and 7 deletions
|
@ -24,7 +24,7 @@ struct DivChannelState {
|
|||
int vibratoDepth, vibratoRate, vibratoPos, vibratoDir, vibratoFine;
|
||||
int tremoloDepth, tremoloRate, tremoloPos;
|
||||
unsigned char arp, arpStage, arpTicks;
|
||||
bool doNote, legato, portaStop, keyOn, nowYouCanStop, stopOnOff, arpYield;
|
||||
bool doNote, legato, portaStop, keyOn, nowYouCanStop, stopOnOff, arpYield, delayLocked;
|
||||
|
||||
DivChannelState():
|
||||
note(-1),
|
||||
|
@ -48,7 +48,14 @@ struct DivChannelState {
|
|||
arp(0),
|
||||
arpStage(-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 {
|
||||
|
@ -59,7 +66,7 @@ class DivEngine {
|
|||
bool playing;
|
||||
bool speedAB;
|
||||
bool endOfSong;
|
||||
int ticks, cycles, curRow, curOrder, remainingLoops;
|
||||
int ticks, cycles, curRow, curOrder, remainingLoops, nextSpeed;
|
||||
int changeOrd, changePos, totalTicks, totalCmds, lastCmds, cmdsPerSecond;
|
||||
DivStatusView view;
|
||||
DivChannelState chan[17];
|
||||
|
@ -118,6 +125,7 @@ class DivEngine {
|
|||
curRow(0),
|
||||
curOrder(0),
|
||||
remainingLoops(-1),
|
||||
nextSpeed(3),
|
||||
changeOrd(-1),
|
||||
changePos(0),
|
||||
totalTicks(0),
|
||||
|
|
|
@ -265,13 +265,24 @@ void DivEngine::processRow(int i, bool afterDelay) {
|
|||
|
||||
if (effectVal==-1) effectVal=0;
|
||||
if (effect==0xed && effectVal!=0) {
|
||||
chan[i].rowDelay=effectVal+1;
|
||||
chan[i].delayOrder=whatOrder;
|
||||
chan[i].delayRow=whatRow;
|
||||
return;
|
||||
if (effectVal<=nextSpeed) {
|
||||
chan[i].rowDelay=effectVal+1;
|
||||
chan[i].delayOrder=whatOrder;
|
||||
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
|
||||
if (pat->data[whatRow][2]!=-1) {
|
||||
dispatchCmd(DivCommand(DIV_CMD_INSTRUMENT,i,pat->data[whatRow][2]));
|
||||
|
@ -536,8 +547,10 @@ void DivEngine::nextRow() {
|
|||
|
||||
if (speedAB) {
|
||||
ticks=song.speed2*(song.timeBase+1);
|
||||
nextSpeed=song.speed1;
|
||||
} else {
|
||||
ticks=song.speed1*(song.timeBase+1);
|
||||
nextSpeed=song.speed2;
|
||||
}
|
||||
speedAB=!speedAB;
|
||||
|
||||
|
|
Loading…
Reference in a new issue