gearmulator

Emulation of classic VA synths of the late 90s/2000s that are based on Motorola 56300 family DSPs
Log | Files | Refs | Submodules | README | LICENSE

commit 4b56cb17f3bea40b329ae0861ab680d527ff2b09
parent ef13742979d562ea5461b74ea3f1284220e509d8
Author: dsp56300 <dsp56300@users.noreply.github.com>
Date:   Sun, 25 Jul 2021 00:30:16 +0200

fix midi clock being sent as three-byte midi block confuses DSP

Diffstat:
Msource/virusLib/microcontroller.cpp | 22++++++++++++++++++++--
1 file changed, 20 insertions(+), 2 deletions(-)

diff --git a/source/virusLib/microcontroller.cpp b/source/virusLib/microcontroller.cpp @@ -794,8 +794,26 @@ bool Microcontroller::sendMIDItoDSP(uint8_t _a, uint8_t _b, uint8_t _c, bool can if(cancelIfFull && (needsToWaitForHostBits(1,1) || m_hdi08.dataRXFull())) return false; writeHostBitsWithWait(1,1); - TWord buf[3] = {static_cast<TWord>(_a)<<16, static_cast<TWord>(_b)<<16, static_cast<TWord>(_c)<<16}; - m_hdi08.writeRX(buf,3); + + switch (_a) + { + case M_TIMINGCLOCK: + case M_START: + case M_CONTINUE: + case M_STOP: + { + const auto temp = static_cast<TWord>(_a) << 16; + m_hdi08.writeRX(&temp, 1); + } + break; + default: + { + TWord buf[3] = { static_cast<TWord>(_a) << 16, static_cast<TWord>(_b) << 16, static_cast<TWord>(_c) << 16 }; + m_hdi08.writeRX(buf, 3); + } + break; + } + return true; }