ferraus fft-filter
Filter by a drawn magnitude curve
Synopsis
ferraus fft-filter <input> [options] [-o <output>]
What it does
Draws a magnitude response from 'frequency:gain' points (joined linearly over log-frequency and held flat beyond the ends), designs a linear-phase FIR of half the FFT size, and applies it by FFT overlap-add without shifting the signal.
This command is also an fx stage and a pipeline op: ferraus fx in.wav -o out.wav --fx "fft-filter:key=value".
Examples
Steep band-limit between 80 Hz and 12 kHz
ferraus fft-filter in.wav --curve "20Hz:-30dB,80Hz:0dB,12kHz:0dB,16kHz:-30dB" -o band.wav
Narrow cut around 400 Hz with a long filter
ferraus fft-filter in.wav --curve "200Hz:0dB,400Hz:-8dB,800Hz:0dB" --fft 16384 -o out.wav
A gentle radio-voice band shape
ferraus fft-filter voice.wav --curve "100Hz:-12dB,300Hz:0dB,3kHz:0dB,5kHz:-12dB" -o radio.wav
A shallow bass dip, with a long FFT for resolution in the low end
ferraus fft-filter mix.wav --curve "40Hz:0dB,60Hz:-4dB,90Hz:0dB" --fft 32768 -o mix_dip.wav
Options
| Flag | Type | Default | Meaning |
|---|---|---|---|
--curve | text | 20Hz:0dB,120Hz:-6dB,1kHz:0dB,8kHz:+3dB | Points as frequency:gain, e.g. "20Hz:0dB,120Hz:-6dB,1kHz:0dB,8kHz:+3dB" |
--fft | integer | 4096 | FFT size (power of two); the filter is half as long Range: 256..65536. |
--mix | percent | 100% | Dry/wet balance: 0% returns the input unchanged, 100% is fully processed |
Global options
Every command also accepts the global options (-o, --json, --dry-run, --overwrite, --progress, ...). See Global options.
Exit codes
| Code | Meaning |
|---|---|
| 0 | Success |
| 1 | Processing failed |
| 2 | Usage or parameter error |
| 3 | Input missing or unreadable |
| 4 | Unsupported format or codec |
| 8 | Cancelled |
| 70 | Internal error (bug) |
Common mistakes
- Forgetting that outputs are never overwritten: pass
--overwriteor a new-opath when re-running.
For models
- MCP tool:
ferraus_fft_filter - Schema:
ferraus schema fft-filter - Pipeline:
{ op: fft-filter, args: { ... } }(flag names with_instead of-) - fx stage: yes
{"command": "fft-filter", "defaults": {"curve": "20Hz:0dB,120Hz:-6dB,1kHz:0dB,8kHz:+3dB", "fft": "4096", "mix": "100%"}}