|
|
@ -377,6 +377,8 @@ void CMiniDexed::BankSelectLSB (unsigned nBankLSB, unsigned nTG) |
|
|
|
|
|
|
|
|
|
|
|
void CMiniDexed::ProgramChange (unsigned nProgram, unsigned nTG) |
|
|
|
void CMiniDexed::ProgramChange (unsigned nProgram, unsigned nTG) |
|
|
|
{ |
|
|
|
{ |
|
|
|
|
|
|
|
assert (m_pConfig); |
|
|
|
|
|
|
|
|
|
|
|
nProgram=constrain((int)nProgram,0,31); |
|
|
|
nProgram=constrain((int)nProgram,0,31); |
|
|
|
|
|
|
|
|
|
|
|
assert (nTG < CConfig::ToneGenerators); |
|
|
|
assert (nTG < CConfig::ToneGenerators); |
|
|
@ -387,7 +389,16 @@ void CMiniDexed::ProgramChange (unsigned nProgram, unsigned nTG) |
|
|
|
|
|
|
|
|
|
|
|
assert (m_pTG[nTG]); |
|
|
|
assert (m_pTG[nTG]); |
|
|
|
m_pTG[nTG]->loadVoiceParameters (Buffer); |
|
|
|
m_pTG[nTG]->loadVoiceParameters (Buffer); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (m_pConfig->GetMIDIAutoVoiceDumpOnPC()) |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
// Only do the voice dump back out over MIDI if we have a specific
|
|
|
|
|
|
|
|
// MIDI channel configured for this TG
|
|
|
|
|
|
|
|
if (m_nMIDIChannel[nTG] < CMIDIDevice::Channels) |
|
|
|
|
|
|
|
{ |
|
|
|
m_SerialMIDI.SendSystemExclusiveVoice(nProgram,0,nTG); |
|
|
|
m_SerialMIDI.SendSystemExclusiveVoice(nProgram,0,nTG); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
m_UI.ParameterChanged (); |
|
|
|
m_UI.ParameterChanged (); |
|
|
|
} |
|
|
|
} |
|
|
@ -474,6 +485,8 @@ void CMiniDexed::SetResonance (int nResonance, unsigned nTG) |
|
|
|
void CMiniDexed::SetMIDIChannel (uint8_t uchChannel, unsigned nTG) |
|
|
|
void CMiniDexed::SetMIDIChannel (uint8_t uchChannel, unsigned nTG) |
|
|
|
{ |
|
|
|
{ |
|
|
|
assert (nTG < CConfig::ToneGenerators); |
|
|
|
assert (nTG < CConfig::ToneGenerators); |
|
|
|
|
|
|
|
assert (uchChannel < CMIDIDevice::ChannelUnknown); |
|
|
|
|
|
|
|
|
|
|
|
m_nMIDIChannel[nTG] = uchChannel; |
|
|
|
m_nMIDIChannel[nTG] = uchChannel; |
|
|
|
|
|
|
|
|
|
|
|
for (unsigned i = 0; i < CConfig::MaxUSBMIDIDevices; i++) |
|
|
|
for (unsigned i = 0; i < CConfig::MaxUSBMIDIDevices; i++) |
|
|
@ -1321,7 +1334,7 @@ void CMiniDexed::getSysExVoiceDump(uint8_t* dest, uint8_t nTG) |
|
|
|
|
|
|
|
|
|
|
|
dest[0] = 0xF0; // SysEx start
|
|
|
|
dest[0] = 0xF0; // SysEx start
|
|
|
|
dest[1] = 0x43; // ID=Yamaha
|
|
|
|
dest[1] = 0x43; // ID=Yamaha
|
|
|
|
dest[2] = GetTGParameter(TGParameterMIDIChannel, nTG); // Sub-status and MIDI channel
|
|
|
|
dest[2] = 0x00 | m_nMIDIChannel[nTG]; // 0x0c Sub-status 0 and MIDI channel
|
|
|
|
dest[3] = 0x00; // Format number (0=1 voice)
|
|
|
|
dest[3] = 0x00; // Format number (0=1 voice)
|
|
|
|
dest[4] = 0x01; // Byte count MSB
|
|
|
|
dest[4] = 0x01; // Byte count MSB
|
|
|
|
dest[5] = 0x1B; // Byte count LSB
|
|
|
|
dest[5] = 0x1B; // Byte count LSB
|
|
|
|