ferraus envelope
Keyframed automation of gain, pan, or pitch
Synopsis
ferraus envelope <input> [options] [-o <output>]
What it does
Draws an automation curve through 'time=value' keyframes (times as 2s, 1:30, 4b, end, or -5s from the end) and applies it: gain in dB (interpolated in dB), pan from -100 (left) to 100 (right) or L30/R60/center (a mono input becomes stereo with a constant-power -3 dB law; a stereo input is balanced), or pitch in cents (duration-preserving granular shift; good for speech and monophonic lines, rougher on dense mixes). Values hold before the first and after the last keyframe; keyframes are hit sample-accurately.
This command is also an fx stage and a pipeline op: ferraus fx in.wav -o out.wav --fx "envelope:key=value".
Examples
A one-second fade in, then unity gain
ferraus envelope in.wav --points 0s=-60dB,1s=0dB,end=0dB -o faded-in.wav
Sweep a mono source from left to right
ferraus envelope mono.wav --target pan --points 0s=-100,4s=100 --curve spline -o sweep.wav
Bend up a semitone and back
ferraus envelope vox.wav --target pitch --points 0s=0,2s=+100cents,4s=0 -o bend.wav
Options
| Flag | Type | Default | Meaning |
|---|---|---|---|
--points | list | 0s=0dB,2s=-6dB,end=-60dB | Keyframes as time=value, e.g. 0s=0dB,2s=-6dB,end=-60dB (pan: 0s=-100,4s=100; pitch: 0s=0,2s=+100cents) |
--curve | linear | spline | linear | Straight segments, or a smooth curve through the keyframes |
--target | gain | pan | pitch | gain | What the keyframes control |
--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_envelope - Schema:
ferraus schema envelope - Pipeline:
{ op: envelope, args: { ... } }(flag names with_instead of-) - fx stage: yes
{"command": "envelope", "defaults": {"points": "0s=0dB,2s=-6dB,end=-60dB", "curve": "linear", "target": "gain", "mix": "100%"}}