mirror of
https://github.com/tildearrow/furnace.git
synced 2024-11-23 04:55:13 +00:00
more slide headache
This commit is contained in:
parent
ba2c4f46c6
commit
f26307f11b
2 changed files with 10 additions and 2 deletions
|
@ -18,7 +18,7 @@ struct DivChannelState {
|
|||
int vibratoDepth, vibratoRate, vibratoPos, vibratoDir, vibratoFine;
|
||||
int tremoloDepth, tremoloRate, tremoloPos;
|
||||
unsigned char arp, arpStage, arpTicks;
|
||||
bool doNote, legato, portaStop;
|
||||
bool doNote, legato, portaStop, keyOn;
|
||||
|
||||
DivChannelState():
|
||||
note(-1),
|
||||
|
@ -40,7 +40,7 @@ struct DivChannelState {
|
|||
arp(0),
|
||||
arpStage(-1),
|
||||
arpTicks(1),
|
||||
doNote(false), legato(false), portaStop(false) {}
|
||||
doNote(false), legato(false), portaStop(false), keyOn(false) {}
|
||||
};
|
||||
|
||||
class DivEngine {
|
||||
|
|
|
@ -163,6 +163,7 @@ void DivEngine::processRow(int i, bool afterDelay) {
|
|||
// note
|
||||
if (pat->data[curRow][0]==100) {
|
||||
chan[i].note=-1;
|
||||
chan[i].keyOn=false;
|
||||
dispatchCmd(DivCommand(DIV_CMD_NOTE_OFF,i));
|
||||
} else if (!(pat->data[curRow][0]==0 && pat->data[curRow][1]==0)) {
|
||||
chan[i].note=pat->data[curRow][0]+pat->data[curRow][1]*12;
|
||||
|
@ -303,6 +304,13 @@ void DivEngine::processRow(int i, bool afterDelay) {
|
|||
dispatchCmd(DivCommand(DIV_CMD_NOTE_ON,i,chan[i].note,chan[i].volume>>8));
|
||||
}
|
||||
chan[i].doNote=false;
|
||||
if (!chan[i].keyOn) {
|
||||
if (chan[i].portaStop) {
|
||||
chan[i].portaNote=-1;
|
||||
chan[i].portaSpeed=-1;
|
||||
}
|
||||
}
|
||||
chan[i].keyOn=true;
|
||||
}
|
||||
|
||||
// post effects
|
||||
|
|
Loading…
Reference in a new issue