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.
This commit is contained in:
@@ -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<int>( _midi_key - ( key - DefaultKey ), 0, NumKeys );
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user