aboutsummaryrefslogtreecommitdiff
path: root/src/adlmidi_opl3.cpp
diff options
context:
space:
mode:
authorWohlstand <admin@wohlnet.ru>2020-09-02 10:29:58 +0300
committerWohlstand <admin@wohlnet.ru>2020-09-02 10:30:14 +0300
commit8bb875fa7ae4ecf81fceb6043ebd2e026aa499fb (patch)
tree0695b85e399cd95551591a1f89c1f6eb876c5d1e /src/adlmidi_opl3.cpp
parentefdf769050aaf344ddac660386009b58fa156ad2 (diff)
downloadlibADLMIDI-8bb875fa7ae4ecf81fceb6043ebd2e026aa499fb.tar.gz
libADLMIDI-8bb875fa7ae4ecf81fceb6043ebd2e026aa499fb.tar.bz2
libADLMIDI-8bb875fa7ae4ecf81fceb6043ebd2e026aa499fb.zip
Fixed the "Fixed" variant of Apogee volume model
Diffstat (limited to 'src/adlmidi_opl3.cpp')
-rw-r--r--src/adlmidi_opl3.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/adlmidi_opl3.cpp b/src/adlmidi_opl3.cpp
index 43bab86..1e78227 100644
--- a/src/adlmidi_opl3.cpp
+++ b/src/adlmidi_opl3.cpp
@@ -681,11 +681,12 @@ void OPL3::touchNote(size_t c,
{
uint_fast32_t mod = tlCar;
+ tlMod = 63 - tlMod;
+ tlMod *= velocity + 0x80;
+
if(m_volumeScale == Synth::VOLUME_APOGEE_FIXED || mode > 1)
mod = tlMod; // Fix the AM voices bug
- tlMod = 63 - tlMod;
- tlMod *= velocity + 0x80;
// NOTE: Here is a bug of Apogee Sound System that makes modulator
// to not work properly on AM instruments. The fix of this bug, you
// need to replace the tlCar with tmMod in this formula.