mirror of
https://github.com/tildearrow/furnace.git
synced 2024-11-23 04:55:13 +00:00
more slide fixes
we are closer and closer
This commit is contained in:
parent
42cd300b46
commit
30692985dc
2 changed files with 16 additions and 4 deletions
|
@ -18,7 +18,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;
|
bool doNote, legato, portaStop, keyOn, nowYouCanStop, stopOnOff;
|
||||||
|
|
||||||
DivChannelState():
|
DivChannelState():
|
||||||
note(-1),
|
note(-1),
|
||||||
|
@ -40,7 +40,7 @@ struct DivChannelState {
|
||||||
arp(0),
|
arp(0),
|
||||||
arpStage(-1),
|
arpStage(-1),
|
||||||
arpTicks(1),
|
arpTicks(1),
|
||||||
doNote(false), legato(false), portaStop(false), keyOn(false), nowYouCanStop(true) {}
|
doNote(false), legato(false), portaStop(false), keyOn(false), nowYouCanStop(true), stopOnOff(false) {}
|
||||||
};
|
};
|
||||||
|
|
||||||
class DivEngine {
|
class DivEngine {
|
||||||
|
|
|
@ -164,6 +164,11 @@ void DivEngine::processRow(int i, bool afterDelay) {
|
||||||
if (pat->data[curRow][0]==100) {
|
if (pat->data[curRow][0]==100) {
|
||||||
chan[i].note=-1;
|
chan[i].note=-1;
|
||||||
chan[i].keyOn=false;
|
chan[i].keyOn=false;
|
||||||
|
if (chan[i].stopOnOff) {
|
||||||
|
chan[i].portaNote=-1;
|
||||||
|
chan[i].portaSpeed=-1;
|
||||||
|
chan[i].stopOnOff=false;
|
||||||
|
}
|
||||||
dispatchCmd(DivCommand(DIV_CMD_NOTE_OFF,i));
|
dispatchCmd(DivCommand(DIV_CMD_NOTE_OFF,i));
|
||||||
} else if (!(pat->data[curRow][0]==0 && pat->data[curRow][1]==0)) {
|
} else if (!(pat->data[curRow][0]==0 && pat->data[curRow][1]==0)) {
|
||||||
chan[i].note=pat->data[curRow][0]+pat->data[curRow][1]*12;
|
chan[i].note=pat->data[curRow][0]+pat->data[curRow][1]*12;
|
||||||
|
@ -214,7 +219,9 @@ void DivEngine::processRow(int i, bool afterDelay) {
|
||||||
} else {
|
} else {
|
||||||
chan[i].portaNote=0x60;
|
chan[i].portaNote=0x60;
|
||||||
chan[i].portaSpeed=effectVal;
|
chan[i].portaSpeed=effectVal;
|
||||||
chan[i].portaStop=false;
|
chan[i].portaStop=true;
|
||||||
|
chan[i].nowYouCanStop=false;
|
||||||
|
chan[i].stopOnOff=false;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case 0x02: // ramp down
|
case 0x02: // ramp down
|
||||||
|
@ -226,6 +233,7 @@ void DivEngine::processRow(int i, bool afterDelay) {
|
||||||
chan[i].portaSpeed=effectVal;
|
chan[i].portaSpeed=effectVal;
|
||||||
chan[i].portaStop=true;
|
chan[i].portaStop=true;
|
||||||
chan[i].nowYouCanStop=false;
|
chan[i].nowYouCanStop=false;
|
||||||
|
chan[i].stopOnOff=false;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case 0x03: // portamento
|
case 0x03: // portamento
|
||||||
|
@ -237,6 +245,7 @@ void DivEngine::processRow(int i, bool afterDelay) {
|
||||||
chan[i].portaSpeed=effectVal;
|
chan[i].portaSpeed=effectVal;
|
||||||
chan[i].portaStop=true;
|
chan[i].portaStop=true;
|
||||||
chan[i].doNote=false;
|
chan[i].doNote=false;
|
||||||
|
chan[i].stopOnOff=true;
|
||||||
dispatchCmd(DivCommand(DIV_CMD_PRE_PORTA,i));
|
dispatchCmd(DivCommand(DIV_CMD_PRE_PORTA,i));
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
@ -271,12 +280,14 @@ void DivEngine::processRow(int i, bool afterDelay) {
|
||||||
chan[i].portaSpeed=(effectVal>>4)*4;
|
chan[i].portaSpeed=(effectVal>>4)*4;
|
||||||
chan[i].portaStop=true;
|
chan[i].portaStop=true;
|
||||||
chan[i].nowYouCanStop=false;
|
chan[i].nowYouCanStop=false;
|
||||||
|
chan[i].stopOnOff=true;
|
||||||
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);
|
||||||
chan[i].portaSpeed=(effectVal>>4)*4;
|
chan[i].portaSpeed=(effectVal>>4)*4;
|
||||||
chan[i].portaStop=true;
|
chan[i].portaStop=true;
|
||||||
chan[i].nowYouCanStop=false;
|
chan[i].nowYouCanStop=false;
|
||||||
|
chan[i].stopOnOff=true;
|
||||||
break;
|
break;
|
||||||
case 0xe3: // vibrato direction
|
case 0xe3: // vibrato direction
|
||||||
chan[i].vibratoDir=effectVal;
|
chan[i].vibratoDir=effectVal;
|
||||||
|
@ -309,12 +320,13 @@ void DivEngine::processRow(int i, bool afterDelay) {
|
||||||
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));
|
||||||
}
|
}
|
||||||
chan[i].doNote=false;
|
chan[i].doNote=false;
|
||||||
|
/*
|
||||||
if (!chan[i].keyOn) {
|
if (!chan[i].keyOn) {
|
||||||
if (chan[i].portaStop && chan[i].nowYouCanStop) {
|
if (chan[i].portaStop && chan[i].nowYouCanStop) {
|
||||||
chan[i].portaNote=-1;
|
chan[i].portaNote=-1;
|
||||||
chan[i].portaSpeed=-1;
|
chan[i].portaSpeed=-1;
|
||||||
}
|
}
|
||||||
}
|
}*/
|
||||||
chan[i].keyOn=true;
|
chan[i].keyOn=true;
|
||||||
}
|
}
|
||||||
chan[i].nowYouCanStop=true;
|
chan[i].nowYouCanStop=true;
|
||||||
|
|
Loading…
Reference in a new issue