@maruaudio/dsp/filters/stereo-high-lowpass is a wet-only stereo pair of filter sections, a high-pass and a low-pass, each with independent left and right @maru/filters-biquad histories at the fixed Butterworth Q 0.7071. A cutoff of exactly 0 is the explicit Off state: an Off section does not tick its biquads and copies its inputs to its outputs exactly.
const state = initStereoHighLowpassNode(48000)
setStereoHighLowpassHighpassCutoffHz(state, 80)
stereoHighLowpassNodeTick(state, left, right) // state.lowpassOutLeft,...RightParameters
| Setter | Range the setter enforces | Default | Unit |
|---|---|---|---|
setStereoHighLowpassHighpassCutoffHz | 0, negative or non-finite is Off; otherwise 10 to 0.45 × the rate, rounded to f32 | Off | Hz |
setStereoHighLowpassLowpassCutoffHz | Same | Off | Hz |
A setter recomputes coefficients only when the section turns on or the f32 cutoff changes. Turning a section Off clears only that section's histories; turning it on starts from cleared histories.
Lifecycle
initStereoHighLowpassNode(sampleRate) (rate bounded to about 22.2 Hz to 384 kHz, NaN gives 48 kHz; both sections Off) → setters → either stereoHighLowpassNodeTick (high-pass then low-pass in series) or the two section ticks, stereoHighLowpassHighpassTick and stereoHighLowpassLowpassTick, called separately → resetStereoHighLowpassNode, or the per-section resets, which clear histories and outputs and keep the cutoffs. There is no prepare step.
When to use it
Trimming rumble and top end from a stereo bus or effect return. The split ticks let a caller blend a section's output against its input, for example to fade a section out before setting it Off.
Limits
- Stereo, sample tick, no delay lines, buffers or latency.
- Changes apply at once. The leaf owns neither a blend nor a dry path; a click-free Off is the caller's job: blend back to the input, then set 0.