diff --git a/src/mididevice.cpp b/src/mididevice.cpp index 5f231d6..7f2cc19 100644 --- a/src/mididevice.cpp +++ b/src/mididevice.cpp @@ -355,6 +355,25 @@ void CMIDIDevice::MIDIMessageHandler (const u8 *pMessage, size_t nLength, unsign if( m_pConfig->GetMIDIRXProgramChange() && ( m_pSynthesizer->GetPerformanceSelectChannel() == Disabled) ) { //printf("Program Change to %d (%d)\n", ucChannel, m_pSynthesizer->GetPerformanceSelectChannel()); m_pSynthesizer->ProgramChange (pMessage[1], nTG); + + /* TODO: Depending on whether we get a MSB or LSB, we need to change the performance directory + or do a program change. This is not yet implemented. Pseudo code: + + switch (pMessage[1]) + { + case MIDI_CC_BANK_SELECT_MSB: + CString sDir; + sDir.Format ("performance/%d", pMessage[2]); + // Check if we find a performance directory that starts with that name; if yes, use it + m_pConfig->SetPerformanceDir (sDir.c_str ()); + break; + + case MIDI_CC_BANK_SELECT_LSB: + // Check if we find a performance file that starts with that name; if yes, use it + m_pSynthesizer->ProgramChange (pMessage[1], nTG); + break; + } + */ } break;