From f7522790004e268ac3bd3ea8bfd97f6e3ed34469 Mon Sep 17 00:00:00 2001 From: Wohlstand Date: Tue, 20 May 2025 22:37:54 +0300 Subject: adlmidi_midiplay.cpp: Fixed the channels logic Reworked the "disable arpeggio" logic that still make troubles even option is disabled --- src/adlmidi_midiplay.cpp | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/src/adlmidi_midiplay.cpp b/src/adlmidi_midiplay.cpp index 9db4b67..22019c8 100644 --- a/src/adlmidi_midiplay.cpp +++ b/src/adlmidi_midiplay.cpp @@ -1545,6 +1545,13 @@ void MIDIplay::prepareChipChannelForNewNote(size_t c, const MIDIchannel::NoteInf // UNLESS we're going to do arpeggio MIDIchannel::notes_iterator i (m_midiChannels[jd.loc.MidCh].ensure_find_activenote(jd.loc.note)); + if(!m_setup.enableAutoArpeggio) + { + // Kill the note + noteUpdate(j->value.loc.MidCh, i, Upd_Off, static_cast(c)); + continue; + } + // Check if we can do arpeggio. if(((jd.vibdelay_us < 70000) || (jd.kon_time_until_neglible_us > 20000000)) && jd.ins == ins) { @@ -1587,9 +1594,6 @@ void MIDIplay::killOrEvacuate(size_t from_channel, { uint16_t cs = static_cast(c); - if(!m_setup.enableAutoArpeggio) - break; // Arpeggio disabled completely - if(c >= maxChannels) break; -- cgit v1.2.3