On Wed, 2014-08-06 at 10:52 +0100, James wrote:

> I don't make the decision who has commit access but if you do want it 
> someone hopefully will pipe up here on this list. But if you do have a 
> git formatted patch I can push it for you.

Here it is.  Thanks for the help!

-- 
Heikki Tauriainen

>From f3d8c075180901aeae5cf4610deca5b601a6fc2b Mon Sep 17 00:00:00 2001
From: Heikki Tauriainen <g034...@welho.com>
Date: Sat, 28 Dec 2013 11:49:58 +0200
Subject: [PATCH] Support for controlling MIDI expression

---
 lily/audio-item.cc                      | 1 +
 lily/include/audio-item.hh              | 2 +-
 lily/midi-control-function-performer.cc | 1 +
 lily/midi-item.cc                       | 1 +
 scm/define-context-properties.scm       | 3 +++
 5 files changed, 7 insertions(+), 1 deletion(-)

diff --git a/lily/audio-item.cc b/lily/audio-item.cc
index 8204d45..4d63ff8 100644
--- a/lily/audio-item.cc
+++ b/lily/audio-item.cc
@@ -217,6 +217,7 @@ Audio_control_function_value_change::context_properties_[] = {
   // property name, enum constant, lower bound for range, upper bound for range
   { "midiBalance",     BALANCE,      -1.0, 1.0 },
   { "midiPanPosition", PAN_POSITION, -1.0, 1.0 },
+  { "midiExpression",  EXPRESSION,    0.0, 1.0 },
   { "midiReverbLevel", REVERB_LEVEL,  0.0, 1.0 },
   { "midiChorusLevel", CHORUS_LEVEL,  0.0, 1.0 },
   // extra element to signify the end of the mapping, must be kept last
diff --git a/lily/include/audio-item.hh b/lily/include/audio-item.hh
index b704743..bd996a5 100644
--- a/lily/include/audio-item.hh
+++ b/lily/include/audio-item.hh
@@ -144,7 +144,7 @@ public:
   // Supported control functions.
   enum Control
   {
-    BALANCE = 0, PAN_POSITION, REVERB_LEVEL, CHORUS_LEVEL,
+    BALANCE = 0, PAN_POSITION, EXPRESSION, REVERB_LEVEL, CHORUS_LEVEL,
     // pseudo value for representing the size of the enum; must be kept last
     NUM_CONTROLS
   };
diff --git a/lily/midi-control-function-performer.cc b/lily/midi-control-function-performer.cc
index 4269baf..f1bd36f 100644
--- a/lily/midi-control-function-performer.cc
+++ b/lily/midi-control-function-performer.cc
@@ -125,6 +125,7 @@ ADD_TRANSLATOR (Midi_control_function_performer,
                 /* read */
                 "midiBalance "
                 "midiPanPosition "
+                "midiExpression "
                 "midiReverbLevel "
                 "midiChorusLevel ",
 
diff --git a/lily/midi-item.cc b/lily/midi-item.cc
index 4909217..514436c 100644
--- a/lily/midi-item.cc
+++ b/lily/midi-item.cc
@@ -393,6 +393,7 @@ Midi_control_function_value_change::to_string () const
 
       {  8, 40 }, // balance
       { 10, 42 }, // pan position
+      { 11, 43 }, // expression
       { 91, -1 }, // reverb level (only coarse resolution available)
       { 93, -1 }  // chorus level (only coarse resolution available)
     };
diff --git a/scm/define-context-properties.scm b/scm/define-context-properties.scm
index b88c8f5..5f92397 100644
--- a/scm/define-context-properties.scm
+++ b/scm/define-context-properties.scm
@@ -458,6 +458,9 @@ associated with the current context.  Ranges from@tie{}@w{-1} to@tie{}1,
 where the values@tie{}@w{-1} (@code{#LEFT}),@tie{}0 (@code{#CENTER})
 and@tie{}1 (@code{#RIGHT}) correspond to hard left, center, and hard
 right, respectively.")
+     (midiExpression ,number? "Expression control for the MIDI
+channel associated with the current context.  Ranges from 0
+to@tie{}1 (0=off,@tie{}1=full effect).")
      (midiReverbLevel ,number? "Reverb effect level for the MIDI
 channel associated with the current context.  Ranges from 0
 to@tie{}1 (0=off,@tie{}1=full effect).")
-- 
2.0.1

_______________________________________________
lilypond-devel mailing list
lilypond-devel@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-devel

Reply via email to