]> git.donarmstrong.com Git - lilypond.git/blobdiff - lily/midi-item.cc
nitpicks
[lilypond.git] / lily / midi-item.cc
index 10b7f2715c0c1674c322fd795056367c489db336..82283201eba622755de6b9064a45498eecea6d21 100644 (file)
@@ -140,9 +140,6 @@ Midi_instrument::to_string () const
   Byte program_byte = 0;
   bool found = false;
 
-  /*
-    UGH. don't use eval.
-  */
   SCM proc = ly_lily_module_constant ("midi-program");
   SCM program = scm_call_1 (proc, ly_symbol2scm (audio_->str_.c_str ()));
   found = (program != SCM_BOOL_F);
@@ -258,7 +255,8 @@ Midi_note::get_length () const
 int
 Midi_note::get_fine_tuning () const
 {
-  Rational tune = audio_->pitch_.tone_pitch () * Rational (2);
+  Rational tune = (audio_->pitch_.tone_pitch ()
+                  + audio_->transposing_.tone_pitch ()) * Rational (2);
   tune -= Rational (get_semitone_pitch ());
 
   tune *= 100;
@@ -268,8 +266,8 @@ Midi_note::get_fine_tuning () const
 int
 Midi_note::get_semitone_pitch () const
 {
-  return int (rint (double (audio_->pitch_.tone_pitch () *  Rational (2, 1))))
-    + audio_->transposing_;
+  return int (double ((audio_->pitch_.tone_pitch ()
+                      + audio_->transposing_.tone_pitch ()) * Rational (2)));
 }
 
 string