mirror of
https://github.com/tildearrow/furnace.git
synced 2024-12-31 20:11:29 +00:00
fix E1xx and E2xx effects
This commit is contained in:
parent
2a15673610
commit
d638af2017
2 changed files with 17 additions and 5 deletions
|
@ -41,7 +41,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, keyOff, nowYouCanStop, stopOnOff, arpYield, delayLocked, inPorta, scheduledSlideReset;
|
bool doNote, legato, portaStop, keyOn, keyOff, nowYouCanStop, stopOnOff, arpYield, delayLocked, inPorta, scheduledSlideReset, shorthandPorta;
|
||||||
|
|
||||||
DivChannelState():
|
DivChannelState():
|
||||||
note(-1),
|
note(-1),
|
||||||
|
@ -79,7 +79,8 @@ struct DivChannelState {
|
||||||
arpYield(false),
|
arpYield(false),
|
||||||
delayLocked(false),
|
delayLocked(false),
|
||||||
inPorta(false),
|
inPorta(false),
|
||||||
scheduledSlideReset(false) {}
|
scheduledSlideReset(false),
|
||||||
|
shorthandPorta(false) {}
|
||||||
};
|
};
|
||||||
|
|
||||||
struct DivNoteEvent {
|
struct DivNoteEvent {
|
||||||
|
|
|
@ -627,7 +627,12 @@ void DivEngine::processRow(int i, bool afterDelay) {
|
||||||
chan[i].nowYouCanStop=false;
|
chan[i].nowYouCanStop=false;
|
||||||
chan[i].stopOnOff=true;
|
chan[i].stopOnOff=true;
|
||||||
chan[i].scheduledSlideReset=false;
|
chan[i].scheduledSlideReset=false;
|
||||||
chan[i].inPorta=false;
|
if ((effectVal&15)!=0) {
|
||||||
|
chan[i].inPorta=true;
|
||||||
|
chan[i].shorthandPorta=true;
|
||||||
|
} else {
|
||||||
|
chan[i].inPorta=false;
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
case 0xe2: // portamento down
|
case 0xe2: // portamento down
|
||||||
chan[i].portaNote=chan[i].note-(effectVal&15);
|
chan[i].portaNote=chan[i].note-(effectVal&15);
|
||||||
|
@ -636,7 +641,12 @@ void DivEngine::processRow(int i, bool afterDelay) {
|
||||||
chan[i].nowYouCanStop=false;
|
chan[i].nowYouCanStop=false;
|
||||||
chan[i].stopOnOff=true;
|
chan[i].stopOnOff=true;
|
||||||
chan[i].scheduledSlideReset=false;
|
chan[i].scheduledSlideReset=false;
|
||||||
chan[i].inPorta=false;
|
if ((effectVal&15)!=0) {
|
||||||
|
chan[i].inPorta=true;
|
||||||
|
chan[i].shorthandPorta=true;
|
||||||
|
} else {
|
||||||
|
chan[i].inPorta=false;
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
case 0xe3: // vibrato direction
|
case 0xe3: // vibrato direction
|
||||||
chan[i].vibratoDir=effectVal;
|
chan[i].vibratoDir=effectVal;
|
||||||
|
@ -682,7 +692,7 @@ void DivEngine::processRow(int i, bool afterDelay) {
|
||||||
if (chan[i].legato) {
|
if (chan[i].legato) {
|
||||||
dispatchCmd(DivCommand(DIV_CMD_LEGATO,i,chan[i].note));
|
dispatchCmd(DivCommand(DIV_CMD_LEGATO,i,chan[i].note));
|
||||||
} else {
|
} else {
|
||||||
if (chan[i].inPorta && chan[i].keyOn) {
|
if (chan[i].inPorta && chan[i].keyOn && !chan[i].shorthandPorta) {
|
||||||
chan[i].portaNote=chan[i].note;
|
chan[i].portaNote=chan[i].note;
|
||||||
} else {
|
} else {
|
||||||
dispatchCmd(DivCommand(DIV_CMD_NOTE_ON,i,chan[i].note,chan[i].volume>>8));
|
dispatchCmd(DivCommand(DIV_CMD_NOTE_ON,i,chan[i].note,chan[i].volume>>8));
|
||||||
|
@ -703,6 +713,7 @@ void DivEngine::processRow(int i, bool afterDelay) {
|
||||||
chan[i].keyOff=false;
|
chan[i].keyOff=false;
|
||||||
}
|
}
|
||||||
chan[i].nowYouCanStop=true;
|
chan[i].nowYouCanStop=true;
|
||||||
|
chan[i].shorthandPorta=false;
|
||||||
|
|
||||||
// post effects
|
// post effects
|
||||||
for (int j=0; j<song.pat[i].effectRows; j++) {
|
for (int j=0; j<song.pat[i].effectRows; j++) {
|
||||||
|
|
Loading…
Reference in a new issue