Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Master comp UI improvements #655

Merged
Merged
Prev Previous commit
Next Next commit
popup values out of 50
m-m-adams committed Oct 30, 2023

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
commit 2daef7f08429d0011230a77b3c9cf159a70c475c
8 changes: 4 additions & 4 deletions src/deluge/model/global_effectable/global_effectable.cpp
Original file line number Diff line number Diff line change
@@ -337,7 +337,7 @@ ActionResult GlobalEffectable::modEncoderActionForNonExistentParam(int32_t offse
current = (AudioEngine::mastercompressor.rawThreshold >> 24) - 64;
current += offset;
current = std::clamp(current, -64, 64);
displayLevel = 64 + current;
displayLevel = ((64 + current) * 50) / 128;
AudioEngine::mastercompressor.rawThreshold = lshiftAndSaturate<24>(current + 64);
indicator_leds::setKnobIndicatorLevel(1, displayLevel);
}
@@ -349,7 +349,7 @@ ActionResult GlobalEffectable::modEncoderActionForNonExistentParam(int32_t offse
current += offset;
//this range is ratio of 2 to 20
current = std::clamp(current, -64, 64);
displayLevel = current + 64;
displayLevel = ((current + 64) * 50) / 128;

AudioEngine::mastercompressor.rawRatio = lshiftAndSaturate<24>(current + 64);
break;
@@ -358,7 +358,7 @@ ActionResult GlobalEffectable::modEncoderActionForNonExistentParam(int32_t offse
current = getLookupIndexFromValue(AudioEngine::mastercompressor.attack >> 2, attackRateTable, 50);
current += offset;
current = std::clamp(current, 1, 50);
displayLevel = (current * 128) / 50;
displayLevel = current;

AudioEngine::mastercompressor.attack = attackRateTable[current] << 2;
break;
@@ -368,7 +368,7 @@ ActionResult GlobalEffectable::modEncoderActionForNonExistentParam(int32_t offse
current = getLookupIndexFromValue(AudioEngine::mastercompressor.release, releaseRateTable, 50);
current += offset;
current = std::clamp(current, 0, 50);
displayLevel = (current * 128) / 50;
displayLevel = current;

AudioEngine::mastercompressor.release = releaseRateTable[current];