From d244387b22e042a4510b35d049283936a5a06b90 Mon Sep 17 00:00:00 2001 From: Holger Wirtz Date: Fri, 13 Jan 2017 19:27:42 +0000 Subject: [PATCH] Another fix for the initialization of the pitch-wheel. --- src/dexed.cpp | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/dexed.cpp b/src/dexed.cpp index f4343c1..018eaef 100644 --- a/src/dexed.cpp +++ b/src/dexed.cpp @@ -41,7 +41,7 @@ Dexed::Dexed(double rate) : lvtk::Synth(p_n_ports, p_midi_in) voices[i].live = false; } - for(i=0;i(data[i]); TRACE("%d->%f",i,data_float[i]); @@ -49,8 +49,8 @@ Dexed::Dexed(double rate) : lvtk::Synth(p_n_ports, p_midi_in) currentNote = 0; controllers.values_[kControllerPitch] = 0x2000; - controllers.values_[kControllerPitchRange] = data[155]; - controllers.values_[kControllerPitchStep] = data[156]; + controllers.values_[kControllerPitchRange] = 0; + controllers.values_[kControllerPitchStep] = 0; controllers.modwheel_cc = 0; controllers.foot_cc = 0; controllers.breath_cc = 0; @@ -110,6 +110,8 @@ void Dexed::activate(void) TRACE("Hi"); Plugin::activate(); + controllers.values_[kControllerPitchRange] = data[155]; + controllers.values_[kControllerPitchStep] = data[156]; TRACE("Bye"); } @@ -317,7 +319,6 @@ void Dexed::set_params(void) onParam(143,*p(p_pitch_mod_sensitivity)); onParam(144,*p(p_transpose)); // 10 bytes (145-154) are the name of the patch - // 155 is reserved for bit-mask of enabled OPs (normaly 0x3f every time) // Controllers (added at the end of the data[]) onParam(155,*p(p_pitch_bend_range)); onParam(156,*p(p_pitch_bend_step));