mirror of
https://github.com/tildearrow/furnace.git
synced 2024-11-24 05:25:12 +00:00
change the porta logic a bit
This commit is contained in:
parent
a43034f559
commit
7e34c7746e
1 changed files with 8 additions and 3 deletions
|
@ -815,13 +815,12 @@ void DivEngine::processRow(int i, bool afterDelay) {
|
||||||
if (chan[i].delayLocked) return;
|
if (chan[i].delayLocked) return;
|
||||||
|
|
||||||
// instrument
|
// instrument
|
||||||
|
bool insChanged=false;
|
||||||
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]));
|
||||||
if (chan[i].lastIns!=pat->data[whatRow][2]) {
|
if (chan[i].lastIns!=pat->data[whatRow][2]) {
|
||||||
chan[i].lastIns=pat->data[whatRow][2];
|
chan[i].lastIns=pat->data[whatRow][2];
|
||||||
if (chan[i].inPorta && song.newInsTriggersInPorta) {
|
insChanged=true;
|
||||||
dispatchCmd(DivCommand(DIV_CMD_NOTE_ON,i,DIV_NOTE_NULL));
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// note
|
// note
|
||||||
|
@ -894,6 +893,7 @@ void DivEngine::processRow(int i, bool afterDelay) {
|
||||||
chan[i].retrigSpeed=0;
|
chan[i].retrigSpeed=0;
|
||||||
|
|
||||||
short lastSlide=-1;
|
short lastSlide=-1;
|
||||||
|
bool calledPorta=false;
|
||||||
|
|
||||||
// effects
|
// effects
|
||||||
for (int j=0; j<song.pat[i].effectRows; j++) {
|
for (int j=0; j<song.pat[i].effectRows; j++) {
|
||||||
|
@ -970,6 +970,7 @@ void DivEngine::processRow(int i, bool afterDelay) {
|
||||||
chan[i].inPorta=false;
|
chan[i].inPorta=false;
|
||||||
dispatchCmd(DivCommand(DIV_CMD_PRE_PORTA,i,false,0));
|
dispatchCmd(DivCommand(DIV_CMD_PRE_PORTA,i,false,0));
|
||||||
} else {
|
} else {
|
||||||
|
calledPorta=true;
|
||||||
if (chan[i].note==chan[i].oldNote && !chan[i].inPorta && song.buggyPortaAfterSlide) {
|
if (chan[i].note==chan[i].oldNote && !chan[i].inPorta && song.buggyPortaAfterSlide) {
|
||||||
chan[i].portaNote=chan[i].note;
|
chan[i].portaNote=chan[i].note;
|
||||||
chan[i].portaSpeed=-1;
|
chan[i].portaSpeed=-1;
|
||||||
|
@ -1174,6 +1175,10 @@ void DivEngine::processRow(int i, bool afterDelay) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (insChanged && (chan[i].inPorta || calledPorta) && song.newInsTriggersInPorta) {
|
||||||
|
dispatchCmd(DivCommand(DIV_CMD_NOTE_ON,i,DIV_NOTE_NULL));
|
||||||
|
}
|
||||||
|
|
||||||
if (chan[i].doNote) {
|
if (chan[i].doNote) {
|
||||||
if (!song.continuousVibrato) {
|
if (!song.continuousVibrato) {
|
||||||
chan[i].vibratoPos=0;
|
chan[i].vibratoPos=0;
|
||||||
|
|
Loading…
Reference in a new issue