feat(volume-leveling): add volume leveling control and dsp processing#481
Open
bule2015 wants to merge 16 commits into
Open
feat(volume-leveling): add volume leveling control and dsp processing#481bule2015 wants to merge 16 commits into
bule2015 wants to merge 16 commits into
Conversation
6789230 to
3550451
Compare
The resource script contained a duplicated block of tray icon declarations. Keeping the cleanup separate keeps the volume leveling review focused on the new DSP and UI changes.
Add DSP state, API plumbing, and SOS processing for the new volume leveling control. This commit keeps the audio path changes isolated so reviewers can focus on the algorithm without the settings UI mixed in.
Load and persist the new volume leveling setting through FxController, and add a slider to the audio settings pane. Keeping the UI wiring separate from the DSP commit makes the review boundary between behavior and presentation explicit.
Increase the dialog height enough to keep the new control visible, but base the pane layout on the actual component height so the extra space stays bounded. This stays separate from the volume leveling UI commit because it is a follow-up layout adjustment.
Add field comments for the volume leveling RMS target and gain so the new SOS state matches the surrounding documentation style. This keeps the change reviewable as a pure documentation follow-up with no behavior changes.
3550451 to
6907ef5
Compare
Preset reloads were replaying EQ state from band 1 onward, which left the lowest band stale. Separating this fix from volume leveling keeps the audio regression review easy to follow.
Slow the gain-reduction attack in volume leveling. This reduces how quickly the DSP pulls level down on rising material, which keeps playback from feeling overly constrained while leaving the existing release path intact.
Refine volume leveling with short-window averaging and bounded prediction. Use a 6-buffer RMS history to stabilize the detector, add a small clamped look-ahead step, and drop the prediction offset on buffers where the prior prediction clearly missed.
ba45039 to
65fd4c2
Compare
add a sidechain high-pass detector and two-stage release behavior so low-end buildup and large gain rebounds do not collapse harmonics. also cap per-buffer gain reduction and reset sidechain state with volume leveling state. Made-with: Cursor
add tonality and headroom state to the sos handle. initialize and reset the new state alongside the existing volume leveling fields so later dsp changes can use it safely.
use tonal balance and recent headroom pressure to steer volume leveling. this updates the sos volume leveling path to estimate muffled versus clear material, adjust the effective target rms and ceiling, and smooth the resulting headroom score over time.
limit tonal upward and downward adjustments when recent headroom is tight. this keeps the tonal detector from pushing target rms or ceiling changes too hard when the mix is already close to the output ceiling.
Cache the sample-rate-dependent coefficients used by the volume leveling detector and sidechain paths. This avoids recalculating the same values on every buffer while keeping the existing equations and output behavior unchanged.
Keep a retained quiet gain floor after volume leveling spends at least 10 seconds outputting very quiet material. This preserves the gain reached by quiet boosting instead of dropping back immediately once the output becomes audible, while still respecting the existing peak-safe ceiling protection.
Track a rolling 30-second post-leveling peak window and use it to slowly raise the retained quiet floor when there is still safe output headroom. This lets extremely quiet material move closer to the output ceiling over time without bypassing the existing peak-safe gain limiting and hard ceiling clamp.
ealtun21
added a commit
to ealtun21/fxsound-app
that referenced
this pull request
Jun 3, 2026
…und2#481) adds a volume leveling slider (0–4 dB) in audio settings backed by a full dsp-side implementation in the sos processing layer: - sidechain high-pass filter (120 hz) isolates program content from sub-bass energy before computing rms - tonal detection (low / body / presence / air bands) adjusts the effective target and ceiling based on whether content is muffled or clear; avoids over-brightening classical and over-darkening edm - gradient prediction smooths gain changes and backs off quickly when the prediction misses, preventing pumping artefacts - headroom tracker (60 s window) biases the target up when the ceiling is rarely touched and down when it is under repeated pressure - quiet-floor retention: after 10 s of very-quiet content the leveler boosts gain up to 10x and retains a gain floor so resumed silence does not immediately collapse volume - per-buffer gain ramp eliminates zipper noise; hard ceiling clip guards against digital overs - surround support: lfe channel (index 3) excluded from analysis and gain application; stereo path uses -1 sentinel (all channels) - fixes setPreset band loop to start at band 0 not band 1 - always runs graphiceqprocess for valid channel counts so normalization gain is applied even when eq is bypassed Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Member
|
Please retarget this PR to develop/windows branch |
7d4566c to
715ded6
Compare
Author
|
I retargeted this PR to the updated base branch and merged the latest changes. The merge conflicts have been resolved, and I updated the implementation to follow the recent Settings dialog changes, including keeping the volume leveling controls aligned with the new Audio/Equalizer settings layout. |
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.
Summary
This PR adds a new Volume Leveling control to FxSound and wires it through the DSP path.
Changes
Volume Levelingslider to the audio settings UI with a0.0to4.0 dBrangeFxControllerand restore it on startup and reset-to-defaultsDfxDspGraphicEq/SOSprocessing pathresources.rc