Audio
Audio tags in the page, recorded effects, the synth fallback, and the offline mix.
Audio is <audio> tags in the page. The renderer never plays them live. It reads them and mixes one ffmpeg graph onto the video (harness/media/page-audio.mjs).
<audio src="assets/music.mp3" loop data-at="0" data-gain="-3" data-fade-out="0.4"></audio>
<audio data-synth="pluck" data-at="0.85" data-gain="-8"></audio>
<audio data-synth="swell" data-at="1.66" data-gain="-6"></audio>
<audio src="assets/vo.wav" data-role="vo" data-at="1.0"></audio>| Attribute | Meaning |
|---|---|
src | an audio file, relative to the page |
data-synth | a synth voice from core/audio/kit.mjs, in place of src |
data-at | start time in seconds |
data-gain | gain in dB. Without it, a synth voice takes its soft default |
data-fade-out | fade-out length in seconds |
loop | marks a music file the user gives. No synth bed: data-synth="bed" is refused |
data-role="vo" | a voiceover. It ducks a music track by 18 dB while it plays |
Synth voices
pluck, chime, sparkle, droplet, bloom, success, ready, whoosh, riser, swell, impact, drop.
Each voice is synthesized from parameters with a seeded generator, so a cue gives the same bytes on every machine. Default gains: UI cues (pluck, chime, sparkle, droplet, bloom, success, ready) -6 dB, whoosh, riser and swell -4 dB, and the weight voices impact and drop -2 dB.
The mix
The mix is as written. It sums the cues at their gains. It does not normalise. At the default gains, a film lands near -20 LUFS. A safety limiter at -1 dBTP never raises a level. Add <meta name="loudness" content="-14"> to normalise to a delivery target.
Taste
Sound is felt, not noticed. Use real recorded effects first (resources/README.md lists sites); a synth voice is the fallback. A few soft ticks and at most one swell beat many hits. Cue the first and the last key word, not every word. Use impact or drop only when the brief asks for weight. The mix warns when one cue peaks more than 6 dB above the median cue.
Name each beat once in CSS (--beat-2: 1.85s) and read it in every delay of that beat. One edit then moves the beat.
Check it
bin/vawe critique <page> runs page-check. It reports a cue with no onset in the rendered audio (cue-not-heard), a cue more than two frames from its data-at (cue-onset-drift), and a cue off the cut it belongs to (sound-off-hit).
To draft with sound, add --audio: bin/vawe dev <page> --audio. A draft is silent by default.