>From 2d6bc54fa0cf64ff6ca9be6ce575fdb427ca784a Mon Sep 17 00:00:00 2001 From: Graham Breed Date: Mon, 11 Jul 2011 10:23:52 +0100 Subject: [PATCH 3/3] Formatting from Neil --- lily/midi-item.cc | 6 +++--- 1 files changed, 3 insertions(+), 3 deletions(-) diff --git a/lily/midi-item.cc b/lily/midi-item.cc index 02bdd7a..aa96849 100644 --- a/lily/midi-item.cc +++ b/lily/midi-item.cc @@ -199,8 +199,8 @@ int Midi_note::get_semitone_pitch () const { double tune = double ((audio_->pitch_.tone_pitch () - + audio_->transposing_.tone_pitch ()) * Rational (2)); - return (tune > 0)? int (tune + 0.5): int(tune - 0.5); + + audio_->transposing_.tone_pitch ()) * Rational (2)); + return int (rint (tune)); } string @@ -213,7 +213,7 @@ Midi_note::to_string () const // print warning if fine tuning was needed, HJJ if (get_fine_tuning () != 0) { - finetune = PITCH_WHEEL_CENTER + get_fine_tuning(); + finetune = PITCH_WHEEL_CENTER + get_fine_tuning (); str += ::to_string ((char) (0xE0 + channel_)); str += ::to_string ((char) (finetune & 0x7F)); -- 1.7.0.4