diff --git a/src/sfizz/Voice.cpp b/src/sfizz/Voice.cpp index 1a0823fa..3315fb69 100644 --- a/src/sfizz/Voice.cpp +++ b/src/sfizz/Voice.cpp @@ -980,6 +980,10 @@ void Voice::Impl::panStageMono(AudioSpan buffer) noexcept (*modulationSpan)[i] += mod[i]; } pan(*modulationSpan, leftBuffer, rightBuffer); + + // add +3dB (10^(3/20)) to compensate for the pan stage (-3dB per stage) + applyGain1(1.4125375446227544f, leftBuffer); + applyGain1(1.4125375446227544f, rightBuffer); } void Voice::Impl::panStageStereo(AudioSpan buffer) noexcept @@ -1020,9 +1024,9 @@ void Voice::Impl::panStageStereo(AudioSpan buffer) noexcept } pan(*modulationSpan, leftBuffer, rightBuffer); - // add +3dB to compensate for the 2 pan stages (-3dB each stage) - applyGain1(1.4125375446227544f, leftBuffer); - applyGain1(1.4125375446227544f, rightBuffer); + // add +6dB (10^(6/20)) to compensate for the 2 pan stages (-3dB per stage) + applyGain1(1.9952623149688797f, leftBuffer); + applyGain1(1.9952623149688797f, rightBuffer); } void Voice::Impl::filterStageMono(AudioSpan buffer) noexcept