commit 7f9224776a20e189163c3d7d16a9a9cc8fbe788b
parent b5f1c7a9ed056b28ecf51e04c949a013228578a0
Author: dsp56300 <dsp56300@users.noreply.github.com>
Date: Thu, 15 Aug 2024 14:40:01 +0200
filter program change messages as they will select uninitialized flash chip content
Diffstat:
2 files changed, 6 insertions(+), 0 deletions(-)
diff --git a/doc/changelog.txt b/doc/changelog.txt
@@ -27,6 +27,8 @@ NodalRed2x:
- [Imp] Added support for physical MIDI ports
- [Imp] Added support for .nl2 patch dump format that includes patch names
+- [Fix] MIDI Program Change messages caused corrupted audio
+
1.3.18
Framework:
diff --git a/source/nord/n2x/n2xLib/n2xdevice.cpp b/source/nord/n2x/n2xLib/n2xdevice.cpp
@@ -90,6 +90,10 @@ namespace n2x
{
if(_ev.sysex.empty())
{
+ // drop program change messages. We do not have any valid presets in the device, this will select garbage
+ if((_ev.a & 0xf0) == synthLib::M_PROGRAMCHANGE)
+ return true;
+
m_state.receive(_response, _ev);
auto e = _ev;
e.offset += m_numSamplesProcessed + getExtraLatencySamples();