From: Heikki Tauriainen Date: Sat, 28 Dec 2013 09:49:58 +0000 (+0200) Subject: Support for controlling MIDI expression X-Git-Tag: release/2.19.12-1~15^2~4 X-Git-Url: https://git.donarmstrong.com/?a=commitdiff_plain;h=60afb018b9ec6c6969fac90a31974a4e30cfd712;p=lilypond.git Support for controlling MIDI expression --- diff --git a/lily/audio-item.cc b/lily/audio-item.cc index 8204d45d1c..4d63ff8d23 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 b704743853..bd996a582c 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 4269baf7e2..f1bd36f71a 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 4909217c43..514436c79c 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 b88c8f59f8..5f92397dca 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).")