diff --git a/src/dexed.cpp b/src/dexed.cpp index e3eb539..bfd3f2e 100644 --- a/src/dexed.cpp +++ b/src/dexed.cpp @@ -52,7 +52,7 @@ Dexed::Dexed(double rate) : lvtk::Synth(p_n_ports, p_midi_in) engineOpl=new EngineOpl; engineMsfa=new FmCore; - for(i=0; ikeyup(); - } + notes_off(); return(true); break; } @@ -831,12 +814,23 @@ void Dexed::setMonoMode(bool mode) { } void Dexed::panic(void) { + for(uint8_t i=0;ioscSync(); + } + } + } +} + +void Dexed::notes_off(void) { for(uint8_t i=0;ioscSync(); + if(voices[i].live==true&&voices[i].keydown==true) { + voices[i].keydown=false; } } } diff --git a/src/dexed.h b/src/dexed.h index 7e04b9e..441a2a8 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 notes_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 3427080..4014f7b 100644 --- a/src/dexed.mk +++ b/src/dexed.mk @@ -5,7 +5,7 @@ ###################################### DEXED_DEPENDENCIES = lvtk -DEXED_VERSION = da0fabe3de43de10c1e36899e751791888a7f4e3 +DEXED_VERSION = #da0fabe3de43de10c1e36899e751791888a7f4e3 DEXED_BUNDLES = dexed.lv2 DEXED_SITE = $(call github,dcoredump,dexed,$(DEXED_VERSION)) DEXED_TARGET_MAKE = $(TARGET_MAKE_ENV) $(TARGET_CONFIGURE_OPTS) $(MAKE) MOD=1