Skip to content

Smooth native EQ shape transitions and clamp cutoff using the new sample rate - #1214

Open
jiri-god wants to merge 1 commit into
kushview:mainfrom
jiri-god:fix/eq-shape-transitions
Open

jiri-god wants to merge 1 commit into
kushview:mainfrom
jiri-god:fix/eq-shape-transitions

Conversation

@jiri-god

@jiri-god jiri-god commented Oct 29, 2026 •

Copy link
Copy Markdown

Switching the native EQ's filter shape changes coefficients immediately while reusing its current state, producing a discontinuity. Preparation also clamps a newly requested cutoff using the previous sample rate before resetting the filter for the new rate.

This crossfades the old and new filter outputs over 10 ms with separate old coefficients/state. An ongoing transition finishes before the processor's repeated parameter updates accept the latest requested shape. Frequency/Q/gain smoothing uses a sample-rate-derived 10 ms interval rather than a fixed 500 samples. Preparation establishes the new rate before updating parameters and resets the settled state afterward. Coefficient dispatch uses a switch instead of replacing a std::function on shape changes.

Validation on Apple Silicon macOS, RelWithDebInfo:

  • Added continuity and finite-output tests at 44.1, 48 and 192 kHz, including rapid shape changes.
  • On unmodified d0226686, the first-sample discontinuity is approximately 0.096 / 0.088 / 0.023 respectively for a settled unity DC signal switching to high-pass.
  • A second regression prepares at 24 kHz, requests 20 kHz cutoff and prepares at 48 kHz. Unmodified code retains the old-rate clamp: the 20 kHz magnitude is 1.540 rather than 1.995 for a 6 dB bell.
  • With this patch: all 59 CTest suites pass (3.36 s).

Independent native-EQ change based directly on main. This does not affect third-party plugin DSP. Linux/Windows validation is pending CI.

Combined validation: the four independent branches (#1211–#1214) merge without conflicts and all 62 CTest suites pass together on Apple Silicon macOS (4.06 s). Upstream Build/REUSE runs currently report action_required pending maintainer approval for this fork; no cross-platform CI success is claimed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant