From da0fabe3de43de10c1e36899e751791888a7f4e3 Mon Sep 17 00:00:00 2001 From: Holger Wirtz Date: Sat, 4 Feb 2017 13:49:20 +0000 Subject: [PATCH] Fix for MID controller handling. --- src/dexed.cpp | 11 ++++++++++- src/dexed.h | 1 + src/dexed.mk | 2 +- 3 files changed, 12 insertions(+), 2 deletions(-) diff --git a/src/dexed.cpp b/src/dexed.cpp index c9dbffb..c5fbdae 100644 --- a/src/dexed.cpp +++ b/src/dexed.cpp @@ -581,7 +581,7 @@ void Dexed::ProcessMidiMessage(const uint8_t *buf, uint32_t buf_size) { break; case 120: TRACE("MIDI all-sound-off: %d %d",ctrl,value); - panic(); + all_sound_off(); break; } break; @@ -842,6 +842,15 @@ void Dexed::panic(void) { } } +void Dexed::all_sound_off(void) { + for(uint8_t i=0;iinit(data, 0, 0, feedback_bitdepth); + if ( voices[i].dx7_note != NULL ) { + voices[i].dx7_note->oscSync(); + } + } +} + //============================================================================== DexedVoice::DexedVoice(double rate) : m_key(lvtk::INVALID_KEY), m_rate(rate) diff --git a/src/dexed.h b/src/dexed.h index 8a12249..69a5a68 100644 --- a/src/dexed.h +++ b/src/dexed.h @@ -96,6 +96,7 @@ class Dexed : public lvtk::Synth void keyup(uint8_t pitch); void keydown(uint8_t pitch, uint8_t velo); void panic(void); + void all_sound_off(void); static const uint8_t MAX_ACTIVE_NOTES = 32; uint8_t max_notes=MAX_ACTIVE_NOTES; diff --git a/src/dexed.mk b/src/dexed.mk index 4bce986..1548062 100644 --- a/src/dexed.mk +++ b/src/dexed.mk @@ -5,7 +5,7 @@ ###################################### DEXED_DEPENDENCIES = lvtk -DEXED_VERSION = dcbbb1ee7aa196b45efc8d1bd6c3fc3855a182f6 +DEXED_VERSION = d8fcf2d029401bcebb2326a34d01b263dc555c48 DEXED_BUNDLES = dexed.lv2 DEXED_SITE = $(call github,dcoredump,dexed,$(DEXED_VERSION)) DEXED_TARGET_MAKE = $(TARGET_MAKE_ENV) $(TARGET_CONFIGURE_OPTS) $(MAKE) MOD=1