SFX synth
Makes sound effects from maths, not from files, so there is nothing to license or download, and the same seed always gives the same sound. A small mixer places them on a timeline, sample-accurately, with an optional voice and music bed.
When to use it
- A video needs short functional sounds tied to things that happen on screen: text typed, cards landing, cuts, reveals, checkmarks.
- A voice needs mixing with a music bed that ducks while it speaks.
- Not for music, ambiences or realistic foley (footsteps, doors, crowds).
Commands
node skills/sfx-synth/scripts/sfx.mjs list
node skills/sfx-synth/scripts/sfx.mjs render <effect> --out fx.wav [--seed N] [--note SEMITONES] [--duration S] [--light]
node skills/sfx-synth/scripts/sfx.mjs mix --timeline timeline.json --out mix.wav \
[--voice voice.wav] [--music bed.mp3 --music-db -12 --duck-db 8] [--lufs -14] [--duration S]
Needs Node 20+ and ffmpeg. No npm install.
Effects
| Name | Length | Use |
|---|---|---|
whoosh | 0.36 s | Fast moves, cuts, things flying in or out. |
whoosh_soft | 0.60 s | Panels sliding in, gentle transitions. |
swish | 0.20 s | Sending a message, a quick swipe. |
pop | 0.14 s | Rising blip. Pitched with note, so a run can climb a scale. |
pop_soft | 0.22 s | Small elements appearing. |
tick | 0.10 s | Counters, list items. Pitched with note. |
check | 0.16 s | Checkmarks, confirmations. |
chime | 1.00 s | Success, a light reveal. |
rise_ding | 0.95 s | A quick rise that lands on a ding. |
drop | 0.60 s | Something dropping into place. |
riser | 1.10 s | Tension before a hit. Length set with duration. |
impact | 1.50 s | Reveals, title hits. |
impact_bright | 0.70 s | Low hit with sparkle. |
impact_soft | 0.50 s | Soft landings. |
thud | 1.10 s | Heavy objects settling, a key word landing. |
block | 0.22 s | A card dropping onto a surface. |
typing | 1.40 s | A burst of soft typing, when single keys are not timed. |
key, key_space, key_enter, key_backspace, key_shift | 0.30 s | Mechanical keyboard, one press each (down-stroke and release). |
sfx.mjs list prints the same table from the code; trust it over this one.
Timeline
A JSON array, times in seconds from the start of the mix:
[
{ "t": 1.20, "sfx": "key", "gain": 0.5, "pan": -0.2 },
{ "t": 3.70, "sfx": "riser", "gain": 0.4, "duration": 1.1 },
{ "t": 4.80, "sfx": "impact", "gain": 0.8 }
]
| Key | Default | Meaning |
|---|---|---|
t | required | When the effect starts. |
sfx | required | Effect name. |
gain | 0.5 | Linear level. Every effect is normalised to the same peak, so 1.0 is full scale. |
db | Level in dB instead of gain (-6 equals gain 0.5). | |
pan | 0 | -1 left to 1 right. |
seed | varies per event | Fix it to get exactly the same variant again. |
note | 0 | Semitones, for pop and tick. |
duration | Seconds, for riser. | |
light | false | Thinner key press, for the key* effects. |
How to design a soundtrack
- Sound only what means something: a cut, a click, a stamp, a reveal. Decorative motion stays silent. One or two sounds per second is already busy.
- Take times from the same data as the picture. If a card lands at 2.40 s in the video plan, the
blockgoes att: 2.40. Never time by ear. tis the start of the sound. Most effects peak within a few milliseconds, sotis the visual event. The exception isriser: it must END on the hit, so start it athit - durationand put animpactat the hit.- Keys: one event per character,
key_spacefor spaces,key_enterto submit,key_backspaceto delete. Events without aseedeach get a different variant automatically, which is what makes typing sound real. Pan slightly with the position of the key or the text. - Levels: keys 0.4 to 0.5, pops and ticks 0.25 to 0.35, whooshes 0.3 to 0.4, impacts 0.6 to 0.8. Under a voice, halve them.
- Runs of pops climb with
note: 0, 2, 4, 7, 9, 12.
Mixing
- The voice is copied as it is, starting at
--voice-at(default 0). Effects and music are added under it. --musicloops to the length of the mix.--music-dbis its loudness relative to the voice (or to the target when there is no voice);--duck-dbis how much further it drops while the voice is speaking. It comes back up in pauses longer than about 0.3 s.--lufsapplies one constant gain to the whole mix to reach the target (default -14 LUFS, the usual target for social video), then a limiter at -1.5 dBFS. Use--lufs noneto leave the levels as mixed, for example when the voice was already normalised and must not change.- Length:
--duration, else the end of the voice, else the end of the last effect. - The command prints a JSON report with the final loudness and peak. Check that
lufsis within half a unit of the target.
Then mux the mix with the picture, for example html-render ... --audio mix.wav.