Audio File

Load an audio file (mp3, wav, flac, ogg, aiff). `waveform` follows the playhead; `buffer` is the whole decoded file.

What it does

Audio File loads a sound file from disk (mp3, wav, flac, ogg, or aiff) and decodes it into two outputs. waveform is a time-sliced signal carrying whatever samples are under the playhead, and animates as the timeline plays. buffer is the whole decoded file at once, for consumers that need random access rather than a moving playhead: granular effects, scrubbing, whole-file analysis.

Start and End trim the file to a window. Speed changes how fast waveform plays through it, and negative values reverse it. Loop Mode decides what happens when playback reaches the out-point, and Trigger restarts playback on demand. The file's sample rate, duration and channel count are also reported as plain numbers.

When to use it

ParameterTypeDefault
file_pathString"String::new()"
startNumber0
endNumber0
speedNumber1
loop_modeString"Once"
triggerOneOf([Boolean, Number])

Gotchas

Start and End are baked into the file's load and decode step, so changing them re-loads and re-cooks the file rather than shifting playback. Expect a brief recompute when dragging the trim handles, not an instant scrub.

Worked example

  1. Add an Audio File node and set File Path to your sound file.

  2. Drag the in/out handles on the scrub bar (or set Start/End directly) to trim to the section you want.

  3. Set Loop Mode to Loop if the sound should repeat, or leave it at Once for a one-shot.

  4. Wire waveform into a Playback or Audio Output node to hear it play; wire buffer instead if the downstream node needs the whole file (e.g. a granular or analysis node).

  5. Pulse Trigger from another node's output to restart playback from the trim start on demand.

See also

Audio Input · Audio Output · Vision Analyze · Numbers, signals & audio