A sonoscript script is a list of instructions, one per line. Blank lines and
# comments are ignored, so scripts can be annotated freely.
# fade a bell in over the intro
insert bell at 2s gain -3dB
delete from 4s to 4.8s
replace from 6s to 7s with siren
Every time is resolved to a number of seconds. Four forms are accepted:
| Form | Example | Meaning |
|---|---|---|
| bare seconds | 2, 2.5 |
seconds |
| seconds unit | 2s, 2.5s |
seconds |
| milliseconds | 500ms |
0.5 s |
| minutes:seconds | 1:30, 0:04.5 |
90 s, 4.5 s |
insert <voice> at <time> [gain <dB>] [for <duration>]
Splice a synthesised voice into the clip. gain scales it (a bare number or a
value with a dB suffix); for sets how long the voice is rendered (otherwise a
short default is used).
insert siren at 0:03 gain -6dB for 1.5s
delete from <time> to <time>
delete "<label>" near <time>
The first form removes an explicit window. The second removes the detected sound
event whose centre is nearest near — handy when you know what to remove but
not exactly where.
replace from <time> to <time> with <voice> [gain <dB>]
Remove a region and drop a voice of the same length in its place.
bell, beep, siren, noise, click, chirp. List them at any time with:
sonoscript list-voicesWherever audio is joined — after a delete, or on either side of an insert or
replace — a short equal-power crossfade is applied so the edit does not click.
The width is Editor.crossfade_seconds (10 ms by default).