Small sysex changes

pull/287/head
BeZo 2 years ago
parent 6d189f84e5
commit d8316fd2ca
  1. 114
      src/mididevice.cpp

@ -368,59 +368,59 @@ void CMIDIDevice::HandleSystemExclusive(const uint8_t* pMessage, const size_t nL
break; break;
case 64: case 64:
LOGDBG("SysEx Function parameter change: %d Value %d",pMessage[4],pMessage[5]); LOGDBG("SysEx Function parameter change: %d Value %d",pMessage[4],pMessage[5]);
m_pSynthesizer->setMonoMode(pMessage[5],nTG); m_pSynthesizer->setMonoMode(pMessage[5], instanceID);
break; break;
case 65: case 65:
LOGDBG("SysEx Function parameter change: %d Value %d",pMessage[4],pMessage[5]); LOGDBG("SysEx Function parameter change: %d Value %d",pMessage[4],pMessage[5]);
m_pSynthesizer->setPitchbendRange(pMessage[5],nTG); m_pSynthesizer->setPitchbendRange(pMessage[5],instanceID);
break; break;
case 66: case 66:
LOGDBG("SysEx Function parameter change: %d Value %d",pMessage[4],pMessage[5]); LOGDBG("SysEx Function parameter change: %d Value %d",pMessage[4],pMessage[5]);
m_pSynthesizer->setPitchbendStep(pMessage[5],nTG); m_pSynthesizer->setPitchbendStep(pMessage[5],instanceID);
break; break;
case 67: case 67:
LOGDBG("SysEx Function parameter change: %d Value %d",pMessage[4],pMessage[5]); LOGDBG("SysEx Function parameter change: %d Value %d",pMessage[4],pMessage[5]);
m_pSynthesizer->setPortamentoMode(pMessage[5],nTG); m_pSynthesizer->setPortamentoMode(pMessage[5],instanceID);
break; break;
case 68: case 68:
LOGDBG("SysEx Function parameter change: %d Value %d",pMessage[4],pMessage[5]); LOGDBG("SysEx Function parameter change: %d Value %d",pMessage[4],pMessage[5]);
m_pSynthesizer->setPortamentoGlissando(pMessage[5],nTG); m_pSynthesizer->setPortamentoGlissando(pMessage[5],instanceID);
break; break;
case 69: case 69:
LOGDBG("SysEx Function parameter change: %d Value %d",pMessage[4],pMessage[5]); LOGDBG("SysEx Function parameter change: %d Value %d",pMessage[4],pMessage[5]);
m_pSynthesizer->setPortamentoTime(pMessage[5],nTG); m_pSynthesizer->setPortamentoTime(pMessage[5],instanceID);
break; break;
case 70: case 70:
LOGDBG("SysEx Function parameter change: %d Value %d",pMessage[4],pMessage[5]); LOGDBG("SysEx Function parameter change: %d Value %d",pMessage[4],pMessage[5]);
m_pSynthesizer->setModWheelRange(pMessage[5],nTG); m_pSynthesizer->setModWheelRange(pMessage[5],instanceID);
break; break;
case 71: case 71:
LOGDBG("SysEx Function parameter change: %d Value %d",pMessage[4],pMessage[5]); LOGDBG("SysEx Function parameter change: %d Value %d",pMessage[4],pMessage[5]);
m_pSynthesizer->setModWheelTarget(pMessage[5],nTG); m_pSynthesizer->setModWheelTarget(pMessage[5],instanceID);
break; break;
case 72: case 72:
LOGDBG("SysEx Function parameter change: %d Value %d",pMessage[4],pMessage[5]); LOGDBG("SysEx Function parameter change: %d Value %d",pMessage[4],pMessage[5]);
m_pSynthesizer->setFootControllerRange(pMessage[5],nTG); m_pSynthesizer->setFootControllerRange(pMessage[5],instanceID);
break; break;
case 73: case 73:
LOGDBG("SysEx Function parameter change: %d Value %d",pMessage[4],pMessage[5]); LOGDBG("SysEx Function parameter change: %d Value %d",pMessage[4],pMessage[5]);
m_pSynthesizer->setFootControllerTarget(pMessage[5],nTG); m_pSynthesizer->setFootControllerTarget(pMessage[5],instanceID);
break; break;
case 74: case 74:
LOGDBG("SysEx Function parameter change: %d Value %d",pMessage[4],pMessage[5]); LOGDBG("SysEx Function parameter change: %d Value %d",pMessage[4],pMessage[5]);
m_pSynthesizer->setBreathControllerRange(pMessage[5],nTG); m_pSynthesizer->setBreathControllerRange(pMessage[5],instanceID);
break; break;
case 75: case 75:
LOGDBG("SysEx Function parameter change: %d Value %d",pMessage[4],pMessage[5]); LOGDBG("SysEx Function parameter change: %d Value %d",pMessage[4],pMessage[5]);
m_pSynthesizer->setBreathControllerTarget(pMessage[5],nTG); m_pSynthesizer->setBreathControllerTarget(pMessage[5],instanceID);
break; break;
case 76: case 76:
LOGDBG("SysEx Function parameter change: %d Value %d",pMessage[4],pMessage[5]); LOGDBG("SysEx Function parameter change: %d Value %d",pMessage[4],pMessage[5]);
m_pSynthesizer->setAftertouchRange(pMessage[5],nTG); m_pSynthesizer->setAftertouchRange(pMessage[5],instanceID);
break; break;
case 77: case 77:
LOGDBG("SysEx Function parameter change: %d Value %d",pMessage[4],pMessage[5]); LOGDBG("SysEx Function parameter change: %d Value %d",pMessage[4],pMessage[5]);
m_pSynthesizer->setAftertouchTarget(pMessage[5],nTG); m_pSynthesizer->setAftertouchTarget(pMessage[5],instanceID);
break; break;
/* BeZo patches */ /* BeZo patches */
case 78: // bank select case 78: // bank select
@ -435,19 +435,23 @@ void CMIDIDevice::HandleSystemExclusive(const uint8_t* pMessage, const size_t nL
LOGDBG("Set midi channel for TG %i", instanceID); LOGDBG("Set midi channel for TG %i", instanceID);
m_pSynthesizer->SetMIDIChannel(pMessage[5], instanceID); m_pSynthesizer->SetMIDIChannel(pMessage[5], instanceID);
break; break;
case 81: // Reverb level case 81: // Set Cutoff
LOGDBG("Set Reverb Level for TG %i", instanceID); LOGDBG("Set Cutoff for TG %i", instanceID);
m_pSynthesizer->SetReverbSend (maplong (pMessage[5], 0, 127, 0, 99), instanceID); m_pSynthesizer->SetCutoff(pMessage[5], instanceID);
break; break;
case 82: // Compressor toggle case 82: // Set Reso
LOGDBG("Set Compressor "); LOGDBG("Set Resonanece for TG %i", instanceID);
m_pSynthesizer->SetParameter (CMiniDexed::ParameterCompressorEnable, maplong (pMessage[5], 0, 127, 0, 1) ); m_pSynthesizer->SetResonance(pMessage[5], instanceID);
break;
case 83: // Reverb level
LOGDBG("Set Reverb Level for TG %i", instanceID);
m_pSynthesizer->SetReverbSend (pMessage[5], instanceID);
break; break;
case 83: // Transpose case 84: // Transpose
LOGDBG("Set Transpose for TG %i", instanceID); LOGDBG("Set Transpose for TG %i", instanceID);
// m_pSynthesizer->SetTranspose (maplong (pMessage[5], 0, 127, 0, 99), instanceID); // m_pSynthesizer->SetTranspose (pMessage[5], instanceID);
break; break;
case 84: // Detune case 85: // Detune
LOGDBG("Set detune for TG %i", instanceID); LOGDBG("Set detune for TG %i", instanceID);
if (pMessage[5] == 0) if (pMessage[5] == 0)
{ {
@ -459,32 +463,48 @@ void CMIDIDevice::HandleSystemExclusive(const uint8_t* pMessage, const size_t nL
m_pSynthesizer->SetMasterTune (maplong (pMessage[5], 1, 127, -99, 99), instanceID); m_pSynthesizer->SetMasterTune (maplong (pMessage[5], 1, 127, -99, 99), instanceID);
} }
break; break;
case 85: // Panning case 86: // Panning
LOGDBG("Set panning for TG %i", instanceID); LOGDBG("Set panning for TG %i", instanceID);
m_pSynthesizer->SetPan(pMessage[5], instanceID); m_pSynthesizer->SetPan(pMessage[5], instanceID);
break; break;
case 86: // Volume case 87: // Note Limit Low
LOGDBG("Set volume for TG %i", instanceID); LOGDBG("Set Note Limit High mode for TG %i", instanceID);
m_pSynthesizer->SetVolume(pMessage[5], instanceID);
break; break;
case 87: // Pitch Bend case 88: // Note Limit High
LOGDBG("Set Note Limit High mode for TG %i", instanceID);
break; break;
case 88: // Portamento case 89: // Compressor toggle
LOGDBG("Set portamento mode for TG %i", instanceID); LOGDBG("Set Compressor ");
m_pSynthesizer->setPortamentoMode(pMessage[5],instanceID); m_pSynthesizer->SetParameter (CMiniDexed::ParameterCompressorEnable, pMessage[5] );
break; break;
case 89: // Mono Mode case 90: // Reverb toggle
LOGDBG("Set Mono mode for TG %i", instanceID); LOGDBG("Set Reverb Enable");
m_pSynthesizer->setMonoMode(pMessage[5],instanceID); m_pSynthesizer->SetParameter (CMiniDexed::ParameterReverbEnable, pMessage[5] );
break; break;
case 90: // Set Cutoff case 91: // Reverb Size
LOGDBG("Set Cutoff for TG %i", instanceID); LOGDBG("Set Reverb Size");
m_pSynthesizer->SetCutoff(pMessage[5], instanceID); m_pSynthesizer->SetParameter (CMiniDexed::ParameterReverbSize, pMessage[5] );
break;
case 92: // Reverb Low Damp
LOGDBG("Set Reverb Low Damp");
m_pSynthesizer->SetParameter (CMiniDexed::ParameterReverbLowDamp, pMessage[5]);
break;
case 93: // Reverb High Damp
LOGDBG("Set Reverb High Damp");
m_pSynthesizer->SetParameter (CMiniDexed::ParameterReverbHighDamp, pMessage[5] );
break;
case 94: // Reverb Lowpass
LOGDBG("Set Reverb Low pass");
m_pSynthesizer->SetParameter (CMiniDexed::ParameterReverbLowPass, pMessage[5]);
break;
case 95: // Reverb Diffusion
LOGDBG("Set Reverb Diffusion");
m_pSynthesizer->SetParameter (CMiniDexed::ParameterReverbDiffusion, pMessage[5] );
break;
case 96: // Reverb Master Level
LOGDBG("Set Reverb Master Level");
m_pSynthesizer->SetParameter (CMiniDexed::ParameterReverbLevel, pMessage[5] );
break; break;
case 91: // Set Reso
LOGDBG("Set Resonanece for TG %i", instanceID);
m_pSynthesizer->SetResonance(pMessage[5], instanceID);
break;
case 600: // Config requestnTG case 600: // Config requestnTG
LOGDBG("Config request received\n"); LOGDBG("Config request received\n");
SendSystemExclusiveConfig(); SendSystemExclusiveConfig();
@ -545,12 +565,22 @@ void CMIDIDevice::SendSystemExclusiveVoice(uint8_t nVoice, uint8_t nTG)
void CMIDIDevice::SendSystemExclusiveConfig() void CMIDIDevice::SendSystemExclusiveConfig()
{ {
uint8_t count = 0; uint8_t count = 0;
uint8_t configdump[196]; uint8_t configdump[204];
configdump[count++] = 0xF0; configdump[count++] = 0xF0;
configdump[count++] = 0x43; configdump[count++] = 0x43;
configdump[count++] = 0x31; configdump[count++] = 0x31;
// FX Settings
configdump[count++] = ((m_pSynthesizer->GetParameter(CMiniDexed::ParameterCompressorEnable) & 0x7F)<<1) |
m_pSynthesizer->GetParameter(CMiniDexed::ParameterReverbEnable) & 0x7F;
configdump[count++] = m_pSynthesizer->GetParameter(CMiniDexed::ParameterReverbSize) & 0x7F;
configdump[count++] = m_pSynthesizer->GetParameter(CMiniDexed::ParameterReverbHighDamp) & 0x7F;
configdump[count++] = m_pSynthesizer->GetParameter(CMiniDexed::ParameterReverbLowDamp) & 0x7F;
configdump[count++] = m_pSynthesizer->GetParameter(CMiniDexed::ParameterReverbLowPass) & 0x7F;
configdump[count++] = m_pSynthesizer->GetParameter(CMiniDexed::ParameterReverbDiffusion) & 0x7F;
configdump[count++] = m_pSynthesizer->GetParameter(CMiniDexed::ParameterReverbLevel) & 0x7F;
for ( uint8_t instance = 0 ; instance < CConfig::ToneGenerators; instance++) for ( uint8_t instance = 0 ; instance < CConfig::ToneGenerators; instance++)
{ {
configdump[count++] = m_pSynthesizer->GetTGParameter(CMiniDexed::TGParameterVoiceBank, instance) & 0x7F; configdump[count++] = m_pSynthesizer->GetTGParameter(CMiniDexed::TGParameterVoiceBank, instance) & 0x7F;

Loading…
Cancel
Save