]> git.donarmstrong.com Git - lilypond.git/blobdiff - lily/midi-item.cc
Run grand replace for 2015.
[lilypond.git] / lily / midi-item.cc
index 54d00ff683d59ce4f1ffc98975c492e91de9c26b..b19527f5bfce7d05af94564d7f37fc8a8fe48e53 100644 (file)
@@ -1,7 +1,7 @@
 /*
   This file is part of LilyPond, the GNU music typesetter.
 
-  Copyright (C) 1997--2012 Jan Nieuwenhuizen <janneke@gnu.org>
+  Copyright (C) 1997--2015 Jan Nieuwenhuizen <janneke@gnu.org>
 
   LilyPond is free software: you can redistribute it and/or modify
   it under the terms of the GNU General Public License as published by
@@ -193,8 +193,10 @@ Midi_time_signature::to_string () const
 Midi_note::Midi_note (Audio_note *a)
   : Midi_channel_item (a),
     audio_ (a),
-    dynamic_byte_ (a->dynamic_ && a->dynamic_->volume_ >= 0
-                   ? Byte (a->dynamic_->volume_ * 0x7f) : Byte (0x5a))
+    dynamic_byte_ (min (max (Byte ((a->dynamic_ && a->dynamic_->volume_ >= 0
+                                    ? a->dynamic_->volume_ * 0x7f : 0x5a)
+                                   + a->extra_velocity_),
+                             Byte (0)), Byte (0x7f)))
 {
 }
 
@@ -391,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)
     };