From caad51fda1c429ed74d347244b2b86d6771bc62b Mon Sep 17 00:00:00 2001 From: probonopd Date: Sun, 27 Feb 2022 15:51:14 +0100 Subject: [PATCH] MIDI numbering starts with 0, user interface with 1 Consistent with DX7 https://commons.wikimedia.org/wiki/File:Yamaha_DX7II-D_-_display_angled_(2017-02-22_17.34.46_by_deepsonic).jpg https://github.com/probonopd/MiniDexed/issues/11 --- src/minidexed.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/minidexed.cpp b/src/minidexed.cpp index 9ac0984..ed1e447 100644 --- a/src/minidexed.cpp +++ b/src/minidexed.cpp @@ -164,7 +164,7 @@ void CMiniDexed::MIDIPacketHandler (unsigned nCable, u8 *pPacket, unsigned nLeng return; } - printf ("Select voice bank %u\n", (unsigned) pPacket[2]); + printf ("Select voice bank %u\n", (unsigned) pPacket[2]+1); // MIDI numbering starts with 0, user interface with 1 s_pThis->m_SysExFileLoader.SelectVoiceBank (pPacket[2]); } @@ -176,7 +176,7 @@ void CMiniDexed::MIDIPacketHandler (unsigned nCable, u8 *pPacket, unsigned nLeng if(pPacket[1] > 31) { return; } - printf ("Loading voice %u\n", (unsigned) pPacket[1]); + printf ("Loading voice %u\n", (unsigned) pPacket[1]+1); // MIDI numbering starts with 0, user interface with 1 uint8_t Buffer[156]; s_pThis->m_SysExFileLoader.GetVoice (pPacket[1], Buffer); s_pThis->loadVoiceParameters(Buffer); @@ -187,7 +187,7 @@ void CMiniDexed::MIDIPacketHandler (unsigned nCable, u8 *pPacket, unsigned nLeng // Print to optional HD44780 display s_pThis->LCDWrite("\x1B[?25l"); // cursor off CString String; - String.Format ("\n\r%i\n\r%s", pPacket[1], buf_name); + String.Format ("\n\r%i\n\r%s", pPacket[1]+1, buf_name); // MIDI numbering starts with 0, user interface with 1 s_pThis->LCDWrite ((const char *) String); return; }