aboutsummaryrefslogtreecommitdiff
path: root/src/adlmidi_opl3.cpp
diff options
context:
space:
mode:
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.