mirror of
https://github.com/tildearrow/furnace.git
synced 2024-11-16 01:35:07 +00:00
fix arpeggio not happening during slide on SMS
This commit is contained in:
parent
7599f99ca0
commit
e25f5b229c
4 changed files with 21 additions and 10 deletions
|
@ -308,7 +308,9 @@ int DivPlatformGB::dispatch(DivCommand c) {
|
||||||
chan[c.chan].note=c.value;
|
chan[c.chan].note=c.value;
|
||||||
break;
|
break;
|
||||||
case DIV_CMD_PRE_PORTA:
|
case DIV_CMD_PRE_PORTA:
|
||||||
|
if (chan[c.chan].active) {
|
||||||
chan[c.chan].std.init(parent->getIns(chan[c.chan].ins));
|
chan[c.chan].std.init(parent->getIns(chan[c.chan].ins));
|
||||||
|
}
|
||||||
chan[c.chan].inPorta=c.value;
|
chan[c.chan].inPorta=c.value;
|
||||||
break;
|
break;
|
||||||
case DIV_CMD_GB_SWEEP_DIR:
|
case DIV_CMD_GB_SWEEP_DIR:
|
||||||
|
|
|
@ -33,6 +33,7 @@ void DivPlatformSMS::tick() {
|
||||||
rWrite(0x90|(i<<5)|(isMuted[i]?15:(15-(chan[i].outVol&15))));
|
rWrite(0x90|(i<<5)|(isMuted[i]?15:(15-(chan[i].outVol&15))));
|
||||||
}
|
}
|
||||||
if (chan[i].std.hadArp) {
|
if (chan[i].std.hadArp) {
|
||||||
|
if (!chan[i].inPorta) {
|
||||||
if (chan[i].std.arpMode) {
|
if (chan[i].std.arpMode) {
|
||||||
chan[i].baseFreq=NOTE_PERIODIC(chan[i].std.arp);
|
chan[i].baseFreq=NOTE_PERIODIC(chan[i].std.arp);
|
||||||
chan[i].actualNote=chan[i].std.arp;
|
chan[i].actualNote=chan[i].std.arp;
|
||||||
|
@ -41,6 +42,7 @@ void DivPlatformSMS::tick() {
|
||||||
chan[i].actualNote=chan[i].note+chan[i].std.arp;
|
chan[i].actualNote=chan[i].note+chan[i].std.arp;
|
||||||
}
|
}
|
||||||
chan[i].freqChanged=true;
|
chan[i].freqChanged=true;
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
if (chan[i].std.arpMode && chan[i].std.finishedArp) {
|
if (chan[i].std.arpMode && chan[i].std.finishedArp) {
|
||||||
chan[i].baseFreq=NOTE_PERIODIC(chan[i].note);
|
chan[i].baseFreq=NOTE_PERIODIC(chan[i].note);
|
||||||
|
@ -163,7 +165,10 @@ int DivPlatformSMS::dispatch(DivCommand c) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
chan[c.chan].freqChanged=true;
|
chan[c.chan].freqChanged=true;
|
||||||
if (return2) return 2;
|
if (return2) {
|
||||||
|
chan[c.chan].inPorta=false;
|
||||||
|
return 2;
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case DIV_CMD_STD_NOISE_MODE:
|
case DIV_CMD_STD_NOISE_MODE:
|
||||||
|
@ -178,6 +183,7 @@ int DivPlatformSMS::dispatch(DivCommand c) {
|
||||||
break;
|
break;
|
||||||
case DIV_CMD_PRE_PORTA:
|
case DIV_CMD_PRE_PORTA:
|
||||||
chan[c.chan].std.init(parent->getIns(chan[c.chan].ins));
|
chan[c.chan].std.init(parent->getIns(chan[c.chan].ins));
|
||||||
|
chan[c.chan].inPorta=c.value;
|
||||||
break;
|
break;
|
||||||
case DIV_CMD_GET_VOLMAX:
|
case DIV_CMD_GET_VOLMAX:
|
||||||
return 15;
|
return 15;
|
||||||
|
|
|
@ -9,7 +9,7 @@ class DivPlatformSMS: public DivDispatch {
|
||||||
struct Channel {
|
struct Channel {
|
||||||
int freq, baseFreq, pitch, note, actualNote;
|
int freq, baseFreq, pitch, note, actualNote;
|
||||||
unsigned char ins;
|
unsigned char ins;
|
||||||
bool active, insChanged, freqChanged, keyOn, keyOff;
|
bool active, insChanged, freqChanged, keyOn, keyOff, inPorta;
|
||||||
signed char vol, outVol;
|
signed char vol, outVol;
|
||||||
DivMacroInt std;
|
DivMacroInt std;
|
||||||
Channel():
|
Channel():
|
||||||
|
@ -24,6 +24,7 @@ class DivPlatformSMS: public DivDispatch {
|
||||||
freqChanged(false),
|
freqChanged(false),
|
||||||
keyOn(false),
|
keyOn(false),
|
||||||
keyOff(false),
|
keyOff(false),
|
||||||
|
inPorta(false),
|
||||||
vol(15),
|
vol(15),
|
||||||
outVol(15) {}
|
outVol(15) {}
|
||||||
};
|
};
|
||||||
|
|
|
@ -551,6 +551,7 @@ void DivEngine::processRow(int i, bool afterDelay) {
|
||||||
chan[i].portaNote=-1;
|
chan[i].portaNote=-1;
|
||||||
chan[i].portaSpeed=-1;
|
chan[i].portaSpeed=-1;
|
||||||
chan[i].inPorta=false;
|
chan[i].inPorta=false;
|
||||||
|
dispatchCmd(DivCommand(DIV_CMD_PRE_PORTA,i,false));
|
||||||
} else {
|
} else {
|
||||||
chan[i].portaNote=song.limitSlides?disCont[dispatchOfChan[i]].dispatch->getPortaFloor(dispatchChanOfChan[i]):-60;
|
chan[i].portaNote=song.limitSlides?disCont[dispatchOfChan[i]].dispatch->getPortaFloor(dispatchChanOfChan[i]):-60;
|
||||||
chan[i].portaSpeed=effectVal;
|
chan[i].portaSpeed=effectVal;
|
||||||
|
@ -559,6 +560,7 @@ void DivEngine::processRow(int i, bool afterDelay) {
|
||||||
chan[i].stopOnOff=false;
|
chan[i].stopOnOff=false;
|
||||||
chan[i].scheduledSlideReset=false;
|
chan[i].scheduledSlideReset=false;
|
||||||
chan[i].inPorta=false;
|
chan[i].inPorta=false;
|
||||||
|
dispatchCmd(DivCommand(DIV_CMD_PRE_PORTA,i,true));
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case 0x03: // portamento
|
case 0x03: // portamento
|
||||||
|
|
Loading…
Reference in a new issue