Distinguish between MSB and LSB on program change

Depending on whether we get a MSB or LSB, we need to change the performance directory or do a program change
switch_perf_dir
probonopd 5 months ago committed by GitHub
parent a8fed895cb
commit 9a0404aed7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 19
      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;

Loading…
Cancel
Save