From 61e6e56ee1fbc003f348266f0d60f75d64ea1b69 Mon Sep 17 00:00:00 2001 From: JP Cimalando Date: Sun, 24 Feb 2019 18:11:05 +0100 Subject: opal: fix the computation of KSL --- src/chips/opal/opal.hpp | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) (limited to 'src/chips/opal') diff --git a/src/chips/opal/opal.hpp b/src/chips/opal/opal.hpp index f554920..c383bd5 100644 --- a/src/chips/opal/opal.hpp +++ b/src/chips/opal/opal.hpp @@ -1237,12 +1237,9 @@ void Opal::Operator::SetFrequencyMultiplier(uint16_t scale) { //================================================================================================== void Opal::Operator::SetKeyScale(uint16_t scale) { - if (scale > 0) - KeyScaleShift = 3 - scale; - - // No scaling, ensure it has no effect - else - KeyScaleShift = 15; + /* libADLMIDI: KSL computation fix */ + const unsigned KeyScaleShiftTable[4] = {8, 1, 2, 0}; + KeyScaleShift = KeyScaleShiftTable[scale]; ComputeKeyScaleLevel(); } -- cgit v1.2.3