From 76662a3a51413b459fe9d2ca46256df11d13f1df Mon Sep 17 00:00:00 2001 From: Tobias Doerffel Date: Mon, 13 Apr 2009 16:13:18 +0200 Subject: [PATCH] InstrumentTrack: fixed calculation in midiPitch() InstrumentTrack::midiPitch() returned 16384 instead of 16383 if pitch was set to +100 cents. This commit fixes the calculation. --- include/instrument_track.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/instrument_track.h b/include/instrument_track.h index 7b7fab9bf..074ca0c52 100644 --- a/include/instrument_track.h +++ b/include/instrument_track.h @@ -108,7 +108,7 @@ public: // translate pitch to midi-pitch [0,16383] inline int midiPitch( void ) const { - return (int)( ( m_pitchModel.value()+100 ) * 81.92 ); + return (int)( ( m_pitchModel.value()+100 ) * 16383 ) / 200; } // play everything in given frame-range - creates note-play-handles