From 61a301a24c2ed2246a8e47e6a56fa827d3c3c8d5 Mon Sep 17 00:00:00 2001 From: Jennifer Wilcox Date: Wed, 18 Jan 2023 14:08:48 -0600 Subject: [PATCH 1/2] Ignore clock and active sensing on serial MIDI (#417) * Ignore clock and active sensing on serial MIDI Fixes #416 I'm not entirely sure this is the correct way to fix it. But it does seem to fix the problem I was seeing. I can now completely mash the keyboard and no notes will get stuck on. * Handle all system real time messages in serial --- src/serialmididevice.cpp | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/serialmididevice.cpp b/src/serialmididevice.cpp index 186efc3..883fd4d 100644 --- a/src/serialmididevice.cpp +++ b/src/serialmididevice.cpp @@ -98,7 +98,13 @@ void CSerialMIDIDevice::Process (void) continue; } - if(m_nSysEx > 0) + // System Real Time messages may appear anywhere in the byte stream, so handle them specially + if(uchData == 0xF8 || uchData == 0xFA || uchData == 0xFB || uchData == 0xFC || uchData == 0xFE || uchData == 0xFF) + { + MIDIMessageHandler (&uchData, 1); + continue; + } + else if(m_nSysEx > 0) { m_SerialMessage[m_nSysEx++]=uchData; if ((uchData & 0x80) == 0x80 || m_nSysEx >= MAX_MIDI_MESSAGE) From ad9689a719504227201676e38ee32fdebd64711e Mon Sep 17 00:00:00 2001 From: Kevin <68612569+diyelectromusic@users.noreply.github.com> Date: Fri, 20 Jan 2023 17:49:27 +0000 Subject: [PATCH 2/2] Fix for Issue #369 to correctly recognise ChannelsSwapped config setting (#381) Co-authored-by: probonopd --- src/minidexed.cpp | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/src/minidexed.cpp b/src/minidexed.cpp index 0240ea5..328eab4 100644 --- a/src/minidexed.cpp +++ b/src/minidexed.cpp @@ -948,13 +948,7 @@ void CMiniDexed::ProcessSound (void) assert (CConfig::ToneGenerators == 8); - // swap stereo channels if needed uint8_t indexL=0, indexR=1; - if (m_bChannelsSwapped) - { - indexL=1; - indexR=0; - } // BEGIN TG mixing float32_t tmp_float[nFrames*2]; @@ -1003,6 +997,13 @@ void CMiniDexed::ProcessSound (void) } // END adding reverb + // swap stereo channels if needed prior to writing back out + if (m_bChannelsSwapped) + { + indexL=1; + indexR=0; + } + // Convert dual float array (left, right) to single int16 array (left/right) for(uint16_t i=0; i