Skip to content

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

PortTypeDirectionDescription
outaudiooutputThe decoded audio for the current time. Wire to Output.audio_in.
amplitudescalaroutputPer-frame RMS amplitude of the audio at the playhead. Range roughly [0, 1]; useful for driving visual reactions.
frequencyvec2outputPer-frame spectral centroid / spread (low, high). Useful for splitting "bass" vs "treble" visual responses.

Parameters

ParamTypeDefaultDescription
pathstring""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.
trackIndexscalar0Which audio track to read when the source has multiple. Most files only have one — leave at 0.
levelscalar1.0Pre-mix gain on this source's audio. Final mix gain is layered: level × Output.audioGain.
timeModeenumLayerComposition: 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.
speedscalar1.0Playback speed multiplier. 2.0 = double speed (and pitch). Clamped to >= 0.
reversebooleanfalsePlay the audio backwards. Applied after looping.
startOffsetscalar0Skip 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.
loopModeenumNoneNone: 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:

PortTypeOverrides
level_inscalarlevel
speed_inscalarspeed
startOffset_inscalarstartOffset

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.audioGain and Output.audioMute are the layer's master controls. They only appear in the Output node's Properties when something is wired to audio_in.
  • Multiple AudioSource layers can play simultaneously — their audio is summed in the mix bus.
  • Use speed for pitch + time changes together; for pitch-preserving time stretching, render the audio externally first.
  • The amplitude output is render-time only — it samples the audio that will actually play through the speakers, so muted layers still produce a value (use Output.audioMute for silent-but-still-reactive effects).
  • VideoSource — uses the same time-mapping conventions; videos with audio tracks auto-wire an AudioSource on import.
  • Output — receives the audio mix on audio_in and applies layer gain / pan / mute.
  • Math — shape the amplitude value (threshold, bias, ease) before feeding it to a visual param.
  • BreakVector — split frequency into independent low / high bands.