The Filter node from #335 only knew low-pass, high-pass and band-pass
and had a Resonance from 0 to 1. It now has every type Web Audio
offers, a Q as a plain factor and a slope up to 48 dB per octave.
- Types: low-pass, high-pass, band-pass, notch, low shelf, high shelf,
peaking and all-pass. The cutoff row is now labelled Frequency, its
key stays `cutoff`.
- Q from 0.1 to 30, 0.707 by default, replaces Resonance. Web Audio
takes the Q of a low- or high-pass in dB, so it is converted when the
voice is wired. No project used the node.
- Gain in dB is an input only for the shelves and the peak. It is a
derived port, so the sound FX compiler now resolves derived ports.
- Slope 12, 24 or 48 dB/oct runs 1, 2 or 4 filters in a row. They
share one cutoff carried by a ConstantSource, only the last has the
Q. Shelves, peak and all-pass hide the row.
- The Chip Presets get the Q their resonance gave before. Mutate moves
Q in octaves and gain by up to a dB.
- bindStage in the instrument compiler binds every amount of a stage
generically, so new stages need no case of their own there.
Finding: FLAT_Q was in dB and the delay damping used it. It is a
factor now, the damping takes it through passQ and is unchanged.
Tests:
- Unit envelope 13, sound-library 96 (2 new), chip-presets 14,
soundfx 45, all green.
- Counter-checks: the Q on every filter in a row, the gain row for
every type. Each turns one test red.
- e2e 34 (melektaus-atx): ALL PASSED, 76 checks (1 new). Chrome
offline, 2 kHz through a low-pass at 1 kHz: -12.37 dB at 12 dB/oct,
-49.5 dB at 48. A +6 dB peak gives 6.00 dB, a notch -124 dB.
- The gate runs once on the last commit of this series.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>