From 65ebb88a5f02c11a859772c2c88589cb13cff560 Mon Sep 17 00:00:00 2001 From: BeZo Date: Sun, 19 Jun 2022 21:38:18 +0200 Subject: [PATCH] Forgot to add these files --- build.sh | 50 +++++++++++++++++++++------------------- rebuild.sh | 2 +- src/mididevice.cpp | 7 +++--- src/minidexed.cpp | 2 +- src/minidexed.h | 1 + src/serialmididevice.cpp | 6 +++++ 6 files changed, 39 insertions(+), 29 deletions(-) diff --git a/build.sh b/build.sh index 6752a10..1eb5325 100755 --- a/build.sh +++ b/build.sh @@ -21,33 +21,35 @@ if [ "${RPI}" -gt "1" ]; then OPTIONS="${OPTIONS} -o ARM_ALLOW_MULTI_CORE" fi +if [ ! -z "${BUILDCIRCLE}" ] ; then # 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 .. +fi # Build MiniDexed echo "Build MiniDexed" diff --git a/rebuild.sh b/rebuild.sh index 99358dd..a6743ff 100644 --- a/rebuild.sh +++ b/rebuild.sh @@ -1,7 +1,7 @@ export RPI=3 export CLEAN="true" - +export BUILDCIRCLE="true" export PATH=$(readlink -f ./gcc-*/bin/):$PATH # Build dependencies and MiniDexed diff --git a/src/mididevice.cpp b/src/mididevice.cpp index b7f215c..a80e494 100644 --- a/src/mididevice.cpp +++ b/src/mididevice.cpp @@ -580,6 +580,7 @@ void CMIDIDevice::SendSystemExclusiveConfig() configdump[count++] = m_pSynthesizer->GetParameter(CMiniDexed::ParameterReverbLowPass) & 0x7F; configdump[count++] = m_pSynthesizer->GetParameter(CMiniDexed::ParameterReverbDiffusion) & 0x7F; configdump[count++] = m_pSynthesizer->GetParameter(CMiniDexed::ParameterReverbLevel) & 0x7F; + configdump[count++] = m_pSynthesizer->getMasterVolume() & 0x7F; for ( uint8_t instance = 0 ; instance < CConfig::ToneGenerators; instance++) { @@ -616,7 +617,7 @@ void CMIDIDevice::SendSystemExclusiveConfig() // send voice dump to all MIDI interfaces for(Iterator = s_DeviceMap.begin(); Iterator != s_DeviceMap.end(); ++Iterator) { - Iterator->second->Send (configdump, sizeof(configdump)*sizeof(uint8_t)); + Iterator->second->Send (configdump, count); LOGDBG("Send SYSEX config dump to \"%s\"",Iterator->first.c_str()); } } @@ -629,7 +630,7 @@ void CMIDIDevice::SendProgramChange(uint8_t pgm, uint8_t nTG) // send voice dump to all MIDI interfaces for(Iterator = s_DeviceMap.begin(); Iterator != s_DeviceMap.end(); ++Iterator) { - Iterator->second->Send (PgmChange, sizeof(PgmChange)*sizeof(uint8_t)); + Iterator->second->Send (PgmChange, 2); LOGDBG("Send Program Change %i to \"%s\"",pgm&0x7f,Iterator->first.c_str()); } } @@ -648,7 +649,7 @@ void CMIDIDevice::SendCtrlChange(uint8_t ctrl, uint8_t val, uint8_t nTG) // send voice dump to all MIDI interfaces for(Iterator = s_DeviceMap.begin(); Iterator != s_DeviceMap.end(); ++Iterator) { - Iterator->second->Send (CtrlMsg, sizeof(CtrlMsg)*sizeof(uint8_t)); + Iterator->second->Send (CtrlMsg, 3); LOGDBG("Send Ctrl change %02X = %i to \"%s\"",ctrl&0x7f, val&0x7f,Iterator->first.c_str()); } } diff --git a/src/minidexed.cpp b/src/minidexed.cpp index 357a51e..b383fbf 100644 --- a/src/minidexed.cpp +++ b/src/minidexed.cpp @@ -391,7 +391,7 @@ void CMiniDexed::SetPan (unsigned nPan, unsigned nTG) tg_mixer->pan(nTG,mapfloat(nPan,0,127,0.0f,1.0f)); reverb_send_mixer->pan(nTG,mapfloat(nPan,0,127,0.0f,1.0f)); - m_SerialMIDI.SendCtrlChange(MIDI_CC_PAN_POSITION, nPan, nTG); + m_SerialMIDI.SendCtrlChange(MIDI_CC_PAN_POSITION, m_nPan[nTG], nTG); m_UI.ParameterChanged (); } diff --git a/src/minidexed.h b/src/minidexed.h index 6945845..8fc9fed 100644 --- a/src/minidexed.h +++ b/src/minidexed.h @@ -166,6 +166,7 @@ public: bool DoSavePerformance (void); void setMasterVolume (float32_t vol); + uint8_t getMasterVolume() { return (127*nMasterVolume); } private: int16_t ApplyNoteLimits (int16_t pitch, unsigned nTG); // returns < 0 to ignore note diff --git a/src/serialmididevice.cpp b/src/serialmididevice.cpp index aed64a6..0e06bc9 100644 --- a/src/serialmididevice.cpp +++ b/src/serialmididevice.cpp @@ -161,5 +161,11 @@ void CSerialMIDIDevice::Process (void) void CSerialMIDIDevice::Send (const u8 *pMessage, size_t nLength, unsigned nCable) { +// for (size_t i= 0; i < nLength; i++) +// { +// printf("%02X, ",pMessage[i]); +// if ( (i+1)%16 == 0 ) printf("\n"); +// } +// printf("\n"); m_SendBuffer.Write (pMessage, nLength); }