diff --git a/src/deluge/dsp/master_compressor/master_compressor.h b/src/deluge/dsp/master_compressor/master_compressor.h index 392f425e9c..4a22fe962b 100644 --- a/src/deluge/dsp/master_compressor/master_compressor.h +++ b/src/deluge/dsp/master_compressor/master_compressor.h @@ -37,12 +37,12 @@ class MasterCompressor { //attack/release in ms int32_t getAttack() { return attackms; } void setAttack(int32_t attack) { - a_ = (-1000.0 / 44100) / (float(attack)); + a_ = (-1000.0 / 44100) / (5 + float(attack) / 2); attackms = attack; }; int32_t getRelease() { return releasems; } void setRelease(int32_t release) { - r_ = (-1000.0 / 44100) / (float(10 * release)); + r_ = (-1000.0 / 44100) / (50 + 4 * float(release)); releasems = release; }; q31_t getThreshold() { return rawThreshold; } diff --git a/src/deluge/model/global_effectable/global_effectable.cpp b/src/deluge/model/global_effectable/global_effectable.cpp index 5ca54c9cef..60a9c9a032 100644 --- a/src/deluge/model/global_effectable/global_effectable.cpp +++ b/src/deluge/model/global_effectable/global_effectable.cpp @@ -358,9 +358,10 @@ ActionResult GlobalEffectable::modEncoderActionForNonExistentParam(int32_t offse case CompParam::ATTACK: current = AudioEngine::mastercompressor.getAttack() - 64; current += offset; - current = std::clamp(current, -63, 64); + current = std::clamp(current, -64, 64); ledLevel = (64 + current); - displayLevel = ((ledLevel)*kMaxMenuValue) / 128; + //in ms + displayLevel = 5 + (ledLevel >> 1); AudioEngine::mastercompressor.setAttack(current + 64); break; @@ -368,9 +369,9 @@ ActionResult GlobalEffectable::modEncoderActionForNonExistentParam(int32_t offse case CompParam::RELEASE: current = AudioEngine::mastercompressor.getRelease() - 64; current += offset; - current = std::clamp(current, -63, 64); + current = std::clamp(current, -64, 64); ledLevel = (64 + current); - displayLevel = ((ledLevel)*kMaxMenuValue) / 128; + displayLevel = 50 + 4 * ledLevel; AudioEngine::mastercompressor.setRelease(current + 64); break;