feat: adaptive snap release for upward compressor stage - #22
Merged
Conversation
Agent-Logs-Url: https://github.com/huberp/phu-compressor/sessions/c815b2c6-8199-4138-9158-565e7af7f972 Co-authored-by: huberp <4027454+huberp@users.noreply.github.com>
… initial visibility Agent-Logs-Url: https://github.com/huberp/phu-compressor/sessions/c815b2c6-8199-4138-9158-565e7af7f972 Co-authored-by: huberp <4027454+huberp@users.noreply.github.com>
huberp
approved these changes
May 1, 2026
huberp
approved these changes
May 1, 2026
Owner
|
@copilot revert this PR from main and apply it to branch "release-0.5.0" |
Copilot AI
added a commit
that referenced
this pull request
May 1, 2026
* feat: implement adaptive snap release for upward compressor stage Agent-Logs-Url: https://github.com/huberp/phu-compressor/sessions/c815b2c6-8199-4138-9158-565e7af7f972 Co-authored-by: huberp <4027454+huberp@users.noreply.github.com> * fix: address review feedback - named constant for snap threshold, fix initial visibility Agent-Logs-Url: https://github.com/huberp/phu-compressor/sessions/c815b2c6-8199-4138-9158-565e7af7f972 Co-authored-by: huberp <4027454+huberp@users.noreply.github.com> --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: huberp <4027454+huberp@users.noreply.github.com>
2 tasks
huberp
added a commit
that referenced
this pull request
May 1, 2026
* feat: implement adaptive snap release for upward compressor stage Agent-Logs-Url: https://github.com/huberp/phu-compressor/sessions/c815b2c6-8199-4138-9158-565e7af7f972 * fix: address review feedback - named constant for snap threshold, fix initial visibility Agent-Logs-Url: https://github.com/huberp/phu-compressor/sessions/c815b2c6-8199-4138-9158-565e7af7f972 --------- Co-authored-by: Copilot <198982749+Copilot@users.noreply.github.com> Co-authored-by: huberp <4027454+huberp@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
During silence, the upward stage's
gainEnvaccumulates a large boost. When a transient arrives,targetGainDbdrops to zero immediately butgainEnvdecays at the normal (slow) release rate — amplifying the transient for several milliseconds. Fix: detect the silence-to-transient event (>6 dB downward jump in target) and substitute a fast "snap" release coefficient for that decay cycle.DSP (
CompressorStage.h)snapReleaseMs/snapReleaseCoeff/snapReleaseEnabledstateupdateCoefficients()now precomputessnapReleaseCoeffgenv − targetGainDb > kSnapReleaseThresholdDb(6 dB, hardcoded detection threshold — not user-visible)Parameters (
PluginProcessor.h/.cpp)up_snap_release_enabled—AudioParameterBool, default offup_snap_release—AudioParameterFloat, 0.5–50 ms, default 5 msCompressorStageeach block viaOttCompressordelegating settersUI (
PluginEditor.h/.cpp)