fix arpeggio not resetting note to base on 0000
This commit is contained in:
parent
9dea093052
commit
d63f3d311b
|
@ -37,8 +37,8 @@
|
||||||
warnings+=(String("\n")+x); \
|
warnings+=(String("\n")+x); \
|
||||||
}
|
}
|
||||||
|
|
||||||
#define DIV_VERSION "dev68"
|
#define DIV_VERSION "dev69"
|
||||||
#define DIV_ENGINE_VERSION 68
|
#define DIV_ENGINE_VERSION 69
|
||||||
|
|
||||||
// for imports
|
// for imports
|
||||||
#define DIV_VERSION_MOD 0xff01
|
#define DIV_VERSION_MOD 0xff01
|
||||||
|
@ -78,7 +78,8 @@ 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, noteOnInhibit;
|
bool doNote, legato, portaStop, keyOn, keyOff, nowYouCanStop, stopOnOff;
|
||||||
|
bool arpYield, delayLocked, inPorta, scheduledSlideReset, shorthandPorta, noteOnInhibit, resetArp;
|
||||||
|
|
||||||
DivChannelState():
|
DivChannelState():
|
||||||
note(-1),
|
note(-1),
|
||||||
|
@ -119,7 +120,8 @@ struct DivChannelState {
|
||||||
inPorta(false),
|
inPorta(false),
|
||||||
scheduledSlideReset(false),
|
scheduledSlideReset(false),
|
||||||
shorthandPorta(false),
|
shorthandPorta(false),
|
||||||
noteOnInhibit(false) {}
|
noteOnInhibit(false),
|
||||||
|
resetArp(false) {}
|
||||||
};
|
};
|
||||||
|
|
||||||
struct DivNoteEvent {
|
struct DivNoteEvent {
|
||||||
|
|
|
@ -143,6 +143,7 @@ bool DivEngine::loadDMF(unsigned char* file, size_t len) {
|
||||||
ds.brokenDACMode=true;
|
ds.brokenDACMode=true;
|
||||||
ds.oneTickCut=false;
|
ds.oneTickCut=false;
|
||||||
ds.newInsTriggersInPorta=true;
|
ds.newInsTriggersInPorta=true;
|
||||||
|
ds.arp0Reset=true;
|
||||||
|
|
||||||
// 1.1 compat flags
|
// 1.1 compat flags
|
||||||
if (ds.version>24) {
|
if (ds.version>24) {
|
||||||
|
@ -818,6 +819,9 @@ bool DivEngine::loadFur(unsigned char* file, size_t len) {
|
||||||
if (ds.version<66) {
|
if (ds.version<66) {
|
||||||
ds.newInsTriggersInPorta=false;
|
ds.newInsTriggersInPorta=false;
|
||||||
}
|
}
|
||||||
|
if (ds.version<69) {
|
||||||
|
ds.arp0Reset=false;
|
||||||
|
}
|
||||||
ds.isDMF=false;
|
ds.isDMF=false;
|
||||||
|
|
||||||
reader.readS(); // reserved
|
reader.readS(); // reserved
|
||||||
|
@ -1009,7 +1013,11 @@ bool DivEngine::loadFur(unsigned char* file, size_t len) {
|
||||||
} else {
|
} else {
|
||||||
reader.readC();
|
reader.readC();
|
||||||
}
|
}
|
||||||
for (int i=0; i<1; i++) reader.readC();
|
if (ds.version>=69) {
|
||||||
|
ds.arp0Reset=reader.readC();
|
||||||
|
} else {
|
||||||
|
reader.readC();
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
for (int i=0; i<20; i++) reader.readC();
|
for (int i=0; i<20; i++) reader.readC();
|
||||||
}
|
}
|
||||||
|
@ -1828,9 +1836,7 @@ SafeWriter* DivEngine::saveFur() {
|
||||||
w->writeC(song.brokenDACMode);
|
w->writeC(song.brokenDACMode);
|
||||||
w->writeC(song.oneTickCut);
|
w->writeC(song.oneTickCut);
|
||||||
w->writeC(song.newInsTriggersInPorta);
|
w->writeC(song.newInsTriggersInPorta);
|
||||||
for (int i=0; i<1; i++) {
|
w->writeC(song.arp0Reset);
|
||||||
w->writeC(0);
|
|
||||||
}
|
|
||||||
|
|
||||||
ptrSeek=w->tell();
|
ptrSeek=w->tell();
|
||||||
// instrument pointers (we'll seek here later)
|
// instrument pointers (we'll seek here later)
|
||||||
|
|
|
@ -909,6 +909,9 @@ void DivEngine::processRow(int i, bool afterDelay) {
|
||||||
break;
|
break;
|
||||||
case 0x00: // arpeggio
|
case 0x00: // arpeggio
|
||||||
chan[i].arp=effectVal;
|
chan[i].arp=effectVal;
|
||||||
|
if (chan[i].arp==0 && song.arp0Reset) {
|
||||||
|
chan[i].resetArp=true;
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
case 0x0c: // retrigger
|
case 0x0c: // retrigger
|
||||||
if (effectVal!=0) {
|
if (effectVal!=0) {
|
||||||
|
@ -1335,6 +1338,10 @@ bool DivEngine::nextTick(bool noAccum) {
|
||||||
dispatchCmd(DivCommand(DIV_CMD_NOTE_OFF,i));
|
dispatchCmd(DivCommand(DIV_CMD_NOTE_OFF,i));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
if (chan[i].resetArp) {
|
||||||
|
dispatchCmd(DivCommand(DIV_CMD_LEGATO,i,chan[i].note));
|
||||||
|
chan[i].resetArp=false;
|
||||||
|
}
|
||||||
if (chan[i].arp!=0 && !chan[i].arpYield && chan[i].portaSpeed<1) {
|
if (chan[i].arp!=0 && !chan[i].arpYield && chan[i].portaSpeed<1) {
|
||||||
if (--chan[i].arpTicks<1) {
|
if (--chan[i].arpTicks<1) {
|
||||||
chan[i].arpTicks=song.arpLen;
|
chan[i].arpTicks=song.arpLen;
|
||||||
|
|
|
@ -300,6 +300,7 @@ struct DivSong {
|
||||||
bool brokenDACMode;
|
bool brokenDACMode;
|
||||||
bool oneTickCut;
|
bool oneTickCut;
|
||||||
bool newInsTriggersInPorta;
|
bool newInsTriggersInPorta;
|
||||||
|
bool arp0Reset;
|
||||||
|
|
||||||
DivOrders orders;
|
DivOrders orders;
|
||||||
std::vector<DivInstrument*> ins;
|
std::vector<DivInstrument*> ins;
|
||||||
|
@ -371,7 +372,8 @@ struct DivSong {
|
||||||
continuousVibrato(false),
|
continuousVibrato(false),
|
||||||
brokenDACMode(false),
|
brokenDACMode(false),
|
||||||
oneTickCut(false),
|
oneTickCut(false),
|
||||||
newInsTriggersInPorta(true) {
|
newInsTriggersInPorta(true),
|
||||||
|
arp0Reset(true) {
|
||||||
for (int i=0; i<32; i++) {
|
for (int i=0; i<32; i++) {
|
||||||
system[i]=DIV_SYSTEM_NULL;
|
system[i]=DIV_SYSTEM_NULL;
|
||||||
systemVol[i]=64;
|
systemVol[i]=64;
|
||||||
|
|
|
@ -2197,6 +2197,10 @@ void FurnaceGUI::drawCompatFlags() {
|
||||||
if (ImGui::IsItemHovered()) {
|
if (ImGui::IsItemHovered()) {
|
||||||
ImGui::SetTooltip("behavior changed in 0.6");
|
ImGui::SetTooltip("behavior changed in 0.6");
|
||||||
}
|
}
|
||||||
|
ImGui::Checkbox("Reset note to base on arpeggio stop",&e->song.arp0Reset);
|
||||||
|
if (ImGui::IsItemHovered()) {
|
||||||
|
ImGui::SetTooltip("behavior changed in 0.6");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
if (ImGui::IsWindowFocused(ImGuiFocusedFlags_ChildWindows)) curWindow=GUI_WINDOW_COMPAT_FLAGS;
|
if (ImGui::IsWindowFocused(ImGuiFocusedFlags_ChildWindows)) curWindow=GUI_WINDOW_COMPAT_FLAGS;
|
||||||
ImGui::End();
|
ImGui::End();
|
||||||
|
|
Loading…
Reference in a new issue