]> git.donarmstrong.com Git - lilypond.git/blobdiff - lily/midi-item.cc
texi2html: Use only one <pre class="example"> for @example -> valid HTML now
[lilypond.git] / lily / midi-item.cc
index 3d2d67a38e6b56319516a4322d78ee35842ffb4f..63b6be6b1103447ae02772b3090e9f90d5839c37 100644 (file)
@@ -3,7 +3,7 @@
 
   source file of the GNU LilyPond music typesetter
 
-  (c) 1997--2007 Jan Nieuwenhuizen <janneke@gnu.org>
+  (c) 1997--2009 Jan Nieuwenhuizen <janneke@gnu.org>
 */
 
 #include "midi-item.hh"
@@ -169,7 +169,7 @@ Midi_time_signature::to_string () const
 Midi_note::Midi_note (Audio_note *a)
 {
   audio_ = a;
-  dynamic_byte_ = 0x7f;
+  dynamic_byte_ = 0x5a;
 }
 
 
@@ -201,9 +201,6 @@ Midi_note::to_string () const
   // print warning if fine tuning was needed, HJJ
   if (get_fine_tuning () != 0)
     {
-      warning (_f ("experimental: temporarily fine tuning (of %d cents) a channel.",
-                  get_fine_tuning ()));
-
       finetune = PITCH_WHEEL_CENTER;
       // Move pitch wheel to a shifted position.
       // The pitch wheel range (of 4 semitones) is multiplied by the cents.
@@ -217,7 +214,7 @@ Midi_note::to_string () const
 
   str += ::to_string ((char) status_byte);
   str += ::to_string ((char) (get_semitone_pitch () + c0_pitch_));
-  str += ::to_string ((char)dynamic_byte_);
+  str += ::to_string ((char) dynamic_byte_);
 
   return str;
 }
@@ -228,17 +225,14 @@ Midi_note_off::Midi_note_off (Midi_note *n)
   on_ = n;
   channel_ = n->channel_;
 
-  // Anybody who hears any difference, or knows how this works?
-  //  0 should definitely be avoided, notes stick on some sound cards.
-  // 64 is supposed to be neutral
-
-  aftertouch_byte_ = 64;
+  // use note_on with velocity=0 instead of note_off
+  aftertouch_byte_ = 0;
 }
 
 string
 Midi_note_off::to_string () const
 {
-  Byte status_byte = (char) (0x80 + channel_);
+  Byte status_byte = (char) (0x90 + channel_);
 
   string str = ::to_string ((char)status_byte);
   str += ::to_string ((char) (get_semitone_pitch () + Midi_note::c0_pitch_));