diff options
author | Tarek Soliman | 2017-12-23 15:40:30 -0600 |
---|---|---|
committer | Tarek Soliman | 2018-01-03 10:40:23 -0600 |
commit | 50d79c5f265aad592ae7f17209653ccbb1fde488 (patch) | |
tree | 1951526e3ff2910acb0588f3a23ba0e9e7e66544 /audio/softsynth/mt32/Part.cpp | |
parent | bb5e8d3a11711d409f89739cf3f054cd5bac8c4f (diff) | |
download | scummvm-rg350-50d79c5f265aad592ae7f17209653ccbb1fde488.tar.gz scummvm-rg350-50d79c5f265aad592ae7f17209653ccbb1fde488.tar.bz2 scummvm-rg350-50d79c5f265aad592ae7f17209653ccbb1fde488.zip |
MT32: Update to munt 2.3.0
This uses upstream commit 939cc986d9ffd044f8c6149361127ad5d94e430f
Closes gh-1091
Diffstat (limited to 'audio/softsynth/mt32/Part.cpp')
-rw-r--r-- | audio/softsynth/mt32/Part.cpp | 17 |
1 files changed, 12 insertions, 5 deletions
diff --git a/audio/softsynth/mt32/Part.cpp b/audio/softsynth/mt32/Part.cpp index 9b5119ee8b..9c85ce5599 100644 --- a/audio/softsynth/mt32/Part.cpp +++ b/audio/softsynth/mt32/Part.cpp @@ -1,5 +1,5 @@ /* Copyright (C) 2003, 2004, 2005, 2006, 2008, 2009 Dean Beeler, Jerome Fisher - * Copyright (C) 2011-2016 Dean Beeler, Jerome Fisher, Sergey V. Mikayev + * Copyright (C) 2011-2017 Dean Beeler, Jerome Fisher, Sergey V. Mikayev * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by @@ -340,10 +340,13 @@ void RhythmPart::setPan(unsigned int midiPan) { void Part::setPan(unsigned int midiPan) { // NOTE: Panning is inverted compared to GM. - // CM-32L: Divide by 8.5 - patchTemp->panpot = Bit8u((midiPan << 3) / 68); - // FIXME: MT-32: Divide by 9 - //patchTemp->panpot = Bit8u(midiPan / 9); + if (synth->controlROMFeatures->quirkPanMult) { + // MT-32: Divide by 9 + patchTemp->panpot = Bit8u(midiPan / 9); + } else { + // CM-32L: Divide by 8.5 + patchTemp->panpot = Bit8u((midiPan << 3) / 68); + } //synth->printDebug("%s (%s): Set pan to %d", name, currentInstr, panpot); } @@ -352,6 +355,10 @@ void Part::setPan(unsigned int midiPan) { * Applies key shift to a MIDI key and converts it into an internal key value in the range 12-108. */ unsigned int Part::midiKeyToKey(unsigned int midiKey) { + if (synth->controlROMFeatures->quirkKeyShift) { + // NOTE: On MT-32 GEN0, key isn't adjusted, and keyShift is applied further in TVP, unlike newer units: + return midiKey; + } int key = midiKey + patchTemp->patch.keyShift; if (key < 36) { // After keyShift is applied, key < 36, so move up by octaves |