|
|
@ -174,7 +174,6 @@ void CMIDIDevice::MIDIMessageHandler (const u8 *pMessage, size_t nLength, unsign |
|
|
|
{ |
|
|
|
{ |
|
|
|
float32_t nMasterVolume=((pMessage[5] & 0x7c) & ((pMessage[6] & 0x7c) <<7))/(1<<14); |
|
|
|
float32_t nMasterVolume=((pMessage[5] & 0x7c) & ((pMessage[6] & 0x7c) <<7))/(1<<14); |
|
|
|
LOGNOTE("Master volume: %f",nMasterVolume); |
|
|
|
LOGNOTE("Master volume: %f",nMasterVolume); |
|
|
|
printf("Master volume: %f",nMasterVolume); |
|
|
|
|
|
|
|
m_pSynthesizer->setMasterVolume(nMasterVolume); |
|
|
|
m_pSynthesizer->setMasterVolume(nMasterVolume); |
|
|
|
} |
|
|
|
} |
|
|
|
else |
|
|
|
else |
|
|
@ -188,7 +187,6 @@ void CMIDIDevice::MIDIMessageHandler (const u8 *pMessage, size_t nLength, unsign |
|
|
|
if (m_ChannelMap[nTG] == ucSysExChannel || m_ChannelMap[nTG] == OmniMode) |
|
|
|
if (m_ChannelMap[nTG] == ucSysExChannel || m_ChannelMap[nTG] == OmniMode) |
|
|
|
{ |
|
|
|
{ |
|
|
|
LOGNOTE("MIDI-SYSEX: channel: %u, len: %u, TG: %u",m_ChannelMap[nTG],nLength,nTG); |
|
|
|
LOGNOTE("MIDI-SYSEX: channel: %u, len: %u, TG: %u",m_ChannelMap[nTG],nLength,nTG); |
|
|
|
printf("MIDI-SYSEX: channel: %lu, len: %lu, TG: %lu\n",m_ChannelMap[nTG],nLength,nTG); |
|
|
|
|
|
|
|
HandleSystemExclusive(pMessage, nLength, nCable, nTG); |
|
|
|
HandleSystemExclusive(pMessage, nLength, nCable, nTG); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
@ -338,9 +336,7 @@ void CMIDIDevice::HandleSystemExclusive(const uint8_t* pMessage, const size_t nL |
|
|
|
sysex_return = m_pSynthesizer->checkSystemExclusive(pMessage, nLength, nTG); |
|
|
|
sysex_return = m_pSynthesizer->checkSystemExclusive(pMessage, nLength, nTG); |
|
|
|
uint8_t instanceID = pMessage[2]&0xF; |
|
|
|
uint8_t instanceID = pMessage[2]&0xF; |
|
|
|
LOGDBG("SYSEX handler return value: %d", sysex_return); |
|
|
|
LOGDBG("SYSEX handler return value: %d", sysex_return); |
|
|
|
printf("SYSEX handler return value: %d\n", sysex_return); |
|
|
|
|
|
|
|
printf("TG %i\n", nTG); |
|
|
|
|
|
|
|
printf("%02X\n", instanceID); |
|
|
|
|
|
|
|
switch (sysex_return) |
|
|
|
switch (sysex_return) |
|
|
|
{ |
|
|
|
{ |
|
|
|
case -1: |
|
|
|
case -1: |
|
|
@ -433,9 +429,11 @@ void CMIDIDevice::HandleSystemExclusive(const uint8_t* pMessage, const size_t nL |
|
|
|
break; |
|
|
|
break; |
|
|
|
/* BeZo patches */ |
|
|
|
/* BeZo patches */ |
|
|
|
case 80: // Set midi channel
|
|
|
|
case 80: // Set midi channel
|
|
|
|
m_ChannelMap[instanceID] = pMessage[5]; |
|
|
|
LOGDBG("Set midi channel for TG %i", instanceID); |
|
|
|
|
|
|
|
m_pSynthesizer->SetMIDIChannel(pMessage[5], instanceID); |
|
|
|
break; |
|
|
|
break; |
|
|
|
case 81: // Reverb level
|
|
|
|
case 81: // Reverb level
|
|
|
|
|
|
|
|
LOGDBG("Set Reverb Level for TG %i", instanceID); |
|
|
|
m_pSynthesizer->SetReverbSend (maplong (pMessage[5], 0, 127, 0, 99), instanceID); |
|
|
|
m_pSynthesizer->SetReverbSend (maplong (pMessage[5], 0, 127, 0, 99), instanceID); |
|
|
|
break; |
|
|
|
break; |
|
|
|
case 82: // Compressor toggle
|
|
|
|
case 82: // Compressor toggle
|
|
|
@ -443,6 +441,7 @@ void CMIDIDevice::HandleSystemExclusive(const uint8_t* pMessage, const size_t nL |
|
|
|
case 83: // Transpose
|
|
|
|
case 83: // Transpose
|
|
|
|
break; |
|
|
|
break; |
|
|
|
case 84: // Detune
|
|
|
|
case 84: // Detune
|
|
|
|
|
|
|
|
LOGDBG("Set detune for TG %i", instanceID); |
|
|
|
if (pMessage[5] == 0) |
|
|
|
if (pMessage[5] == 0) |
|
|
|
{ |
|
|
|
{ |
|
|
|
// "0 to 127, with 0 being no celeste (detune) effect applied at all."
|
|
|
|
// "0 to 127, with 0 being no celeste (detune) effect applied at all."
|
|
|
@ -454,10 +453,12 @@ void CMIDIDevice::HandleSystemExclusive(const uint8_t* pMessage, const size_t nL |
|
|
|
} |
|
|
|
} |
|
|
|
break; |
|
|
|
break; |
|
|
|
case 85: // Panning
|
|
|
|
case 85: // Panning
|
|
|
|
|
|
|
|
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 86: // Volume
|
|
|
|
m_pSynthesizer->SetVol(pMessage[5], instanceID); |
|
|
|
LOGDBG("Set volume for TG %i", instanceID); |
|
|
|
|
|
|
|
m_pSynthesizer->SetVolume(pMessage[5], instanceID); |
|
|
|
break; |
|
|
|
break; |
|
|
|
case 87: // Pitch Bend
|
|
|
|
case 87: // Pitch Bend
|
|
|
|
break; |
|
|
|
break; |
|
|
|