[SCM] calf/master: + Fluidsynth: pass control change and pitch bend messages

js at users.alioth.debian.org js at users.alioth.debian.org
Tue May 7 15:39:18 UTC 2013


The following commit has been merged in the master branch:
commit 44f9650ac023fdb3cef619e8ad357c5b23c2f659
Author: Krzysztof Foltman <wdev at foltman.com>
Date:   Wed Feb 4 22:48:13 2009 +0000

    + Fluidsynth: pass control change and pitch bend messages

diff --git a/src/calf/modules_dev.h b/src/calf/modules_dev.h
index 6a31dae..b819ea3 100644
--- a/src/calf/modules_dev.h
+++ b/src/calf/modules_dev.h
@@ -58,14 +58,12 @@ public:
     /// Handle MIDI Note Off message (by sending it to fluidsynth)
     void note_off(int note, int vel);
     /// Handle pitch bend message.
-    /*
     inline void pitch_bend(int value)
     {
-        pitchbend = pow(2.0, value / 8192.0);
+        fluid_synth_pitch_bend(synth, 0, value + 0x2000);
     }
-    */
     /// Handle control change messages.
-    // void control_change(int controller, int value);
+    void control_change(int controller, int value);
     /// Update variables from control ports.
     void params_changed() {
     }
diff --git a/src/fluidsynth.cpp b/src/fluidsynth.cpp
index f283d8e..97674db 100644
--- a/src/fluidsynth.cpp
+++ b/src/fluidsynth.cpp
@@ -89,6 +89,11 @@ void fluidsynth_audio_module::note_off(int note, int vel)
     fluid_synth_noteoff(synth, 0, note);
 }
 
+void fluidsynth_audio_module::control_change(int controller, int value)
+{
+    fluid_synth_cc(synth, 0, controller, value);
+}
+
 uint32_t fluidsynth_audio_module::process(uint32_t offset, uint32_t nsamples, uint32_t inputs_mask, uint32_t outputs_mask)
 {
     fluid_synth_write_float(synth, nsamples, outs[0], offset, 1, outs[1], offset, 1);

-- 
calf audio plugins packaging



More information about the pkg-multimedia-commits mailing list