Audio Source
Loads an audio file as a standalone audio layer, with the same time-mapping controls as VideoSource (speed, reverse, loop) plus per-frame amplitude and frequency outputs for driving visual effects.
Category: Source Menu path: Source > Audio Source
Ports
| Port | Type | Direction | Description |
|---|---|---|---|
out | audio | output | The decoded audio for the current time. Wire to Output.audio_in. |
amplitude | scalar | output | Per-frame RMS amplitude of the audio at the playhead. Range roughly [0, 1]; useful for driving visual reactions. |
frequency | vec2 | output | Per-frame spectral centroid / spread (low, high). Useful for splitting "bass" vs "treble" visual responses. |
Parameters
| Param | Type | Default | Description |
|---|---|---|---|
path | string | "" | Absolute path to the source file. Supports audio formats ffmpeg can decode (MP3, WAV, AAC, FLAC, OGG, M4A, AIFF) and video files (MP4, MOV, AVI, WEBM, MKV, …) — for video, the first audio stream is extracted. The file picker offers an "Audio & Video" filter so you can point an AudioSource straight at a video to use only its audio. |
trackIndex | scalar | 0 | Which audio track to read when the source has multiple. Most files only have one — leave at 0. |
level | scalar | 1.0 | Pre-mix gain on this source's audio. Final mix gain is layered: level × Output.audioGain. |
timeMode | enum | Layer | Composition: audio time follows the comp playhead. Layer (default): audio time is relative to the layer's start, so moving the clip slides the audio with it. |
speed | scalar | 1.0 | Playback speed multiplier. 2.0 = double speed (and pitch). Clamped to >= 0. |
reverse | boolean | false | Play the audio backwards. Applied after looping. |
startOffset | scalar | 0 | Skip this many comp-frames into the source audio before playback begins. Matches VideoSource's startOffset semantics — wire the same scalar into both to keep audio + video in sync when paired. |
loopMode | enum | None | None: silence after the clip ends. Loop: wraps to the beginning. PingPong: forward then backward, repeating. |
Expose Channels
When enabled (E button on node header), adds input ports that override params via edge connections:
| Port | Type | Overrides |
|---|---|---|
level_in | scalar | level |
speed_in | scalar | speed |
startOffset_in | scalar | startOffset |
Note: live preview (amplitude / frequency outputs and the in-app monitor) reflects these overrides immediately. The exported audio mix reads keyframed param values directly; if you need an override to apply to export, keyframe the param instead of (or in addition to) wiring an input.
How It Works
AudioSource uses ffmpeg to decode samples on demand and feeds them into Caddis's audio mix bus. The visual outputs (amplitude, frequency) are computed from a short analysis window around the current playhead — typically the audio frame that aligns with the current video frame — and are continuous (sub-frame stable) so animations driven by them don't pop.
Time mapping mirrors VideoSource: in Layer mode (the default), sample 0 of the audio aligns with the layer's start; in Composition mode the audio is locked to the comp playhead regardless of where the layer sits. The formula is the same — audio_time = (comp_or_layer_time * speed) with looping and reverse applied last.
amplitude is a one-pole-smoothed RMS over a 30 ms window; spikes get softened so you can wire it straight into a Transform2D scale without harsh strobing. frequency returns { x: low-band centroid, y: high-band centroid } from a coarse FFT — enough to drive "kick triggers this, hi-hat triggers that" workflows without setting up filtering yourself.
Dragging an audio file from the Assets panel auto-creates an AudioSource layer with the clip trimmed to the audio's duration.
Usage Examples
Basic: Add music to a comp
Drag an audio file onto the timeline. A new layer is created with AudioSource → Output.audio_in already wired. The visual side of the Output node is left unwired so the layer renders transparent — it just contributes audio.
Amplitude-reactive visuals
Wire AudioSource.amplitude → Transform2D.scale (with a Math node to bias and scale the value) so a logo pulses on every kick. Because amplitude is smoothed, you don't need to add your own easing.
Bass-driven blur
Wire AudioSource.frequency → BreakVector → Blur.blur (X channel for low-end). A low-frequency-only response lets the visual breathe on bass without reacting to hi-hats or vocals.
Sync to a music track
Set timeMode to Composition when you want the audio locked to the comp's clock (e.g. precise sync to keyframes). Default Layer mode is better when you're sliding the audio clip around to find the right offset.
Tips
Output.audioGainandOutput.audioMuteare the layer's master controls. They only appear in the Output node's Properties when something is wired toaudio_in.- Multiple AudioSource layers can play simultaneously — their audio is summed in the mix bus.
- Use
speedfor pitch + time changes together; for pitch-preserving time stretching, render the audio externally first. - The
amplitudeoutput is render-time only — it samples the audio that will actually play through the speakers, so muted layers still produce a value (useOutput.audioMutefor silent-but-still-reactive effects).
Related Nodes
- VideoSource — uses the same time-mapping conventions; videos with audio tracks auto-wire an AudioSource on import.
- Output — receives the audio mix on
audio_inand applies layer gain / pan / mute. - Math — shape the
amplitudevalue (threshold, bias, ease) before feeding it to a visual param. - BreakVector — split
frequencyinto independent low / high bands.