Patches to support TG settings using sysex.

pull/287/head
BeZo 2 years ago
parent a1c9ec0e76
commit b13c1f2705
  1. 49
      build.sh
  2. 15
      src/mididevice.cpp

@ -22,34 +22,35 @@ if [ "${RPI}" -gt "1" ]; then
fi
# Build circle-stdlib library
cd circle-stdlib/
if [ ! -z "${CLEAN}" ] ; then
make mrproper || true
fi
./configure -r ${RPI} --prefix "${TOOLCHAIN_PREFIX}" ${OPTIONS} -o KERNEL_MAX_SIZE=0x400000
make -j
#cd circle-stdlib/
#if [ ! -z "${CLEAN}" ] ; then
#make mrproper || true
#fi
#./configure -r ${RPI} --prefix "${TOOLCHAIN_PREFIX}" ${OPTIONS} -o KERNEL_MAX_SIZE=0x400000
#make -j
# Build additional libraries
cd libs/circle/addon/display/
if [ ! -z "${CLEAN}" ] ; then
make clean || true
fi
make -j
cd ../sensor/
if [ ! -z "${CLEAN}" ] ; then
make clean || true
fi
make -j
cd ../Properties/
if [ ! -z "${CLEAN}" ] ; then
make clean || true
fi
make -j
cd ../../../..
cd ..
#cd libs/circle/addon/display/
#if [ ! -z "${CLEAN}" ] ; then
#make clean || true
#fi
#make -j
#cd ../sensor/
#if [ ! -z "${CLEAN}" ] ; then
#make clean || true
#fi
#make -j
#cd ../Properties/
#if [ ! -z "${CLEAN}" ] ; then
#make clean || true
#fi
#make -j
#cd ../../../..
#cd ..
# Build MiniDexed
echo "Build MiniDexed"
cd src
if [ ! -z "${CLEAN}" ] ; then
make clean || true

@ -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);
LOGNOTE("Master volume: %f",nMasterVolume);
printf("Master volume: %f",nMasterVolume);
m_pSynthesizer->setMasterVolume(nMasterVolume);
}
else
@ -188,7 +187,6 @@ void CMIDIDevice::MIDIMessageHandler (const u8 *pMessage, size_t nLength, unsign
if (m_ChannelMap[nTG] == ucSysExChannel || m_ChannelMap[nTG] == OmniMode)
{
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);
}
}
@ -338,9 +336,7 @@ void CMIDIDevice::HandleSystemExclusive(const uint8_t* pMessage, const size_t nL
sysex_return = m_pSynthesizer->checkSystemExclusive(pMessage, nLength, nTG);
uint8_t instanceID = pMessage[2]&0xF;
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)
{
case -1:
@ -433,9 +429,11 @@ void CMIDIDevice::HandleSystemExclusive(const uint8_t* pMessage, const size_t nL
break;
/* BeZo patches */
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;
case 81: // Reverb level
LOGDBG("Set Reverb Level for TG %i", instanceID);
m_pSynthesizer->SetReverbSend (maplong (pMessage[5], 0, 127, 0, 99), instanceID);
break;
case 82: // Compressor toggle
@ -443,6 +441,7 @@ void CMIDIDevice::HandleSystemExclusive(const uint8_t* pMessage, const size_t nL
case 83: // Transpose
break;
case 84: // Detune
LOGDBG("Set detune for TG %i", instanceID);
if (pMessage[5] == 0)
{
// "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;
case 85: // Panning
LOGDBG("Set panning for TG %i", instanceID);
m_pSynthesizer->SetPan(pMessage[5], instanceID);
break;
case 86: // Volume
m_pSynthesizer->SetVol(pMessage[5], instanceID);
LOGDBG("Set volume for TG %i", instanceID);
m_pSynthesizer->SetVolume(pMessage[5], instanceID);
break;
case 87: // Pitch Bend
break;

Loading…
Cancel
Save