From 3231eb877d7fac5ee42fe2b7ff8da50b85abb3c4 Mon Sep 17 00:00:00 2001 From: probonopd Date: Wed, 23 Apr 2025 02:39:59 +0200 Subject: [PATCH] Leave SendSystemExclusiveVoice unchanged for now --- src/mididevice.cpp | 29 +++++++++++------------------ src/minidexed.cpp | 2 +- 2 files changed, 12 insertions(+), 19 deletions(-) diff --git a/src/mididevice.cpp b/src/mididevice.cpp index af01f68..d657103 100644 --- a/src/mididevice.cpp +++ b/src/mididevice.cpp @@ -2,7 +2,7 @@ // mididevice.cpp // // MiniDexed - Dexed FM synthesizer for bare metal Raspberry Pi -// Copyright (C) 2022-25 The MiniDexed Team +// Copyright (C) 2022 The MiniDexed Team // // Original author of this class: // R. Stange @@ -738,24 +738,17 @@ void CMIDIDevice::HandleSystemExclusive(const uint8_t* pMessage, const size_t nL void CMIDIDevice::SendSystemExclusiveVoice(uint8_t nVoice, const unsigned nCable, uint8_t nTG) { - LOGDBG("SendSystemExclusiveVoice: nVoice=%u, nCable=%u, nTG=%u", nVoice, nCable, nTG); - if (nTG >= m_pConfig->GetToneGenerators()) { - LOGERR("SendSystemExclusiveVoice: Invalid TG index %u", nTG); - return; - } uint8_t voicedump[163]; - memset(voicedump, 0, sizeof(voicedump)); + // Get voice sysex dump from TG m_pSynthesizer->getSysExVoiceDump(voicedump, nTG); - LOGDBG("SysEx dump header: %02X %02X %02X %02X %02X %02X ... end: %02X", - voicedump[0], voicedump[1], voicedump[2], voicedump[3], voicedump[4], voicedump[5], voicedump[162]); - - // Only send to the device (MIDI cable) on which the dump was requested - TDeviceMap::const_iterator Iterator = s_DeviceMap.find(m_DeviceName); - if (Iterator != s_DeviceMap.end()) { - LOGDBG("Sending SysEx voice dump to device: %s, size: %u", Iterator->first.c_str(), (unsigned)sizeof(voicedump)); - Iterator->second->Send (voicedump, sizeof(voicedump)); - } else { - LOGERR("SendSystemExclusiveVoice: Device not found for name %s", m_DeviceName.c_str()); + + TDeviceMap::const_iterator Iterator; + + // send voice dump to all MIDI interfaces + for(Iterator = s_DeviceMap.begin(); Iterator != s_DeviceMap.end(); ++Iterator) + { + Iterator->second->Send (voicedump, sizeof(voicedump)*sizeof(uint8_t)); + // LOGDBG("Send SYSEX voice dump %u to \"%s\"",nVoice,Iterator->first.c_str()); } -} +} diff --git a/src/minidexed.cpp b/src/minidexed.cpp index 6d4863f..134d241 100644 --- a/src/minidexed.cpp +++ b/src/minidexed.cpp @@ -2,7 +2,7 @@ // minidexed.cpp // // MiniDexed - Dexed FM synthesizer for bare metal Raspberry Pi -// Copyright (C) 2022-25 The MiniDexed Team +// Copyright (C) 2022 The MiniDexed Team // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by