mirror of
https://github.com/tildearrow/furnace.git
synced 2024-12-31 20:11:29 +00:00
parent
bf537881ce
commit
dea79c2adb
2 changed files with 6 additions and 3 deletions
|
@ -49,7 +49,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, shorthandPorta;
|
bool doNote, legato, portaStop, keyOn, keyOff, nowYouCanStop, stopOnOff, arpYield, delayLocked, inPorta, scheduledSlideReset, shorthandPorta, noteOnInhibit;
|
||||||
|
|
||||||
DivChannelState():
|
DivChannelState():
|
||||||
note(-1),
|
note(-1),
|
||||||
|
@ -88,7 +88,8 @@ struct DivChannelState {
|
||||||
delayLocked(false),
|
delayLocked(false),
|
||||||
inPorta(false),
|
inPorta(false),
|
||||||
scheduledSlideReset(false),
|
scheduledSlideReset(false),
|
||||||
shorthandPorta(false) {}
|
shorthandPorta(false),
|
||||||
|
noteOnInhibit(false) {}
|
||||||
};
|
};
|
||||||
|
|
||||||
struct DivNoteEvent {
|
struct DivNoteEvent {
|
||||||
|
|
|
@ -727,7 +727,7 @@ void DivEngine::processRow(int i, bool afterDelay) {
|
||||||
} else {
|
} else {
|
||||||
if (chan[i].inPorta && chan[i].keyOn && !chan[i].shorthandPorta) {
|
if (chan[i].inPorta && chan[i].keyOn && !chan[i].shorthandPorta) {
|
||||||
chan[i].portaNote=chan[i].note;
|
chan[i].portaNote=chan[i].note;
|
||||||
} else {
|
} else if (!chan[i].noteOnInhibit) {
|
||||||
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));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -747,6 +747,7 @@ void DivEngine::processRow(int i, bool afterDelay) {
|
||||||
}
|
}
|
||||||
chan[i].nowYouCanStop=true;
|
chan[i].nowYouCanStop=true;
|
||||||
chan[i].shorthandPorta=false;
|
chan[i].shorthandPorta=false;
|
||||||
|
chan[i].noteOnInhibit=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++) {
|
||||||
|
@ -868,6 +869,7 @@ bool DivEngine::nextTick(bool noAccum) {
|
||||||
if (note.on) {
|
if (note.on) {
|
||||||
dispatchCmd(DivCommand(DIV_CMD_INSTRUMENT,note.channel,note.ins,1));
|
dispatchCmd(DivCommand(DIV_CMD_INSTRUMENT,note.channel,note.ins,1));
|
||||||
dispatchCmd(DivCommand(DIV_CMD_NOTE_ON,note.channel,note.note));
|
dispatchCmd(DivCommand(DIV_CMD_NOTE_ON,note.channel,note.note));
|
||||||
|
chan[note.channel].noteOnInhibit=true;
|
||||||
} else {
|
} else {
|
||||||
dispatchCmd(DivCommand(DIV_CMD_NOTE_OFF,note.channel));
|
dispatchCmd(DivCommand(DIV_CMD_NOTE_OFF,note.channel));
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue