]> git.donarmstrong.com Git - lilypond.git/commitdiff
Support for controlling MIDI expression
authorHeikki Tauriainen <g034737@welho.com>
Sat, 28 Dec 2013 09:49:58 +0000 (11:49 +0200)
committerJames Lowe <pkx166h@gmail.com>
Fri, 8 Aug 2014 05:47:53 +0000 (06:47 +0100)
lily/audio-item.cc
lily/include/audio-item.hh
lily/midi-control-function-performer.cc
lily/midi-item.cc
scm/define-context-properties.scm

index 8204d45d1cb85ed498d0d78feefbb867999832c7..4d63ff8d23b4e646df87ad8638f91c097eb49af6 100644 (file)
@@ -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
index b70474385329c45437ffaf707abf9db223cedc10..bd996a582c1a273ee54e9988c57a7e1538202b0c 100644 (file)
@@ -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
   };
index 4269baf7e26c97f1b9b26d3e80a34de98317c581..f1bd36f71af2aa58339180f5cdf35d43fe72f5b3 100644 (file)
@@ -125,6 +125,7 @@ ADD_TRANSLATOR (Midi_control_function_performer,
                 /* read */
                 "midiBalance "
                 "midiPanPosition "
+                "midiExpression "
                 "midiReverbLevel "
                 "midiChorusLevel ",
 
index 4909217c4319c108cca8aba6b22ea9533e5c9b37..514436c79c6a2763533713850a2e91d2ac219516 100644 (file)
@@ -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)
     };
index b88c8f59f891ce93809c67ba60e081b367afe1c9..5f92397dca3bbe9ad206af59cd302dd9aed82c71 100644 (file)
@@ -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).")