add compatibility flag for arp phase reset on new note

This commit is contained in:
DevEd 2023-09-10 17:41:16 -04:00
parent 85c5cffde8
commit a2c9ec78d3
3 changed files with 10 additions and 2 deletions

View file

@ -1067,7 +1067,9 @@ void DivEngine::processRow(int i, bool afterDelay) {
}
} else if (!chan[i].noteOnInhibit) {
dispatchCmd(DivCommand(DIV_CMD_NOTE_ON,i,chan[i].note,chan[i].volume>>8));
chan[i].arpStage=-1;
if (song.resetArpPhaseOnNewNote) {
chan[i].arpStage=-1;
}
chan[i].goneThroughNote=true;
chan[i].wentThroughNote=true;
keyHit[i]=true;

View file

@ -377,6 +377,7 @@ struct DivSong {
bool brokenPortaLegato;
bool brokenFMOff;
bool preNoteNoEffect;
bool resetArpPhaseOnNewNote;
std::vector<DivInstrument*> ins;
std::vector<DivWavetable*> wave;
@ -496,7 +497,8 @@ struct DivSong {
patchbayAuto(true),
brokenPortaLegato(false),
brokenFMOff(false),
preNoteNoEffect(false) {
preNoteNoEffect(false),
resetArpPhaseOnNewNote(false) {
for (int i=0; i<DIV_MAX_CHIPS; i++) {
system[i]=DIV_SYSTEM_NULL;
systemVol[i]=1.0;

View file

@ -328,6 +328,10 @@ void FurnaceGUI::drawCompatFlags() {
if (ImGui::IsItemHovered()) {
ImGui::SetTooltip("when enabled, the pitch macro of an instrument is in frequency/period space.");
}
ImGui::Checkbox("Reset arpeggio phase on new note",&e->song.resetArpPhaseOnNewNote);
if (ImGui::IsItemHovered()) {
ImGui::SetTooltip("when enabled, the arpeggio phase is reset on a new note."); // TODO: Better description
}
ImGui::EndTabItem();
}
ImGui::EndTabBar();