diff --git a/src/minidexed.cpp b/src/minidexed.cpp index 609b688..1219241 100644 --- a/src/minidexed.cpp +++ b/src/minidexed.cpp @@ -1786,14 +1786,17 @@ void CMiniDexed::getSysExVoiceDump(uint8_t* dest, uint8_t nTG) dest[162] = 0xF7; // SysEx end } -void CMiniDexed::setMasterVolume (float32_t vol) +void CMiniDexed::setMasterVolume(float32_t vol) { - if(vol < 0.0) - vol = 0.0; - else if(vol > 1.0) - vol = 1.0; + if (vol < 0.0) + vol = 0.0; + else if (vol > 1.0) + vol = 1.0; - nMasterVolume=vol; + // Apply logarithmic scaling to match perceived loudness + vol = powf(vol, 2.0f); + + nMasterVolume = vol; } std::string CMiniDexed::GetPerformanceFileName(unsigned nID)