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.