From 6e30ae3369b7780597952478176f823e05a1ec5b Mon Sep 17 00:00:00 2001 From: Tobias Doerffel Date: Wed, 8 Apr 2009 23:36:43 +0200 Subject: [PATCH] InstrumentTrack::masterKey(): fixed miscalculation Global master pitch wasn't taken into account correctly when calculating master key of a given key. Made MIDI based instruments behave in the opposite direction regarding pitch when changing global master pitch. Thanks to Skiessi for pointing out this issue. --- src/tracks/instrument_track.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/tracks/instrument_track.cpp b/src/tracks/instrument_track.cpp index 65f758a5b..64e9f4d26 100644 --- a/src/tracks/instrument_track.cpp +++ b/src/tracks/instrument_track.cpp @@ -524,7 +524,7 @@ void instrumentTrack::updatePitch( void ) int instrumentTrack::masterKey( int _midi_key ) const { - int key = m_baseNoteModel.value() + engine::getSong()->masterPitch(); + int key = m_baseNoteModel.value() - engine::getSong()->masterPitch(); return tLimit( _midi_key - ( key - DefaultKey ), 0, NumKeys ); }