Audio player
Plays an attached WAV asset as one stream for loops, beds and backing tracks, following the transport or running free.
- Source
- Since 0.2.0
- sample
- wav
- loop
- backing track
- transport
- playback
Plays one recording into the patch: a drum loop, an ambient bed or a backing track. Attach a WAV file to the node and it plays when the Toy plays.
What it does#
The player reads the attached file between Start and End at the chosen Rate. In Loop it repeats that region, crossfading at the seam; in Once it plays the region and stops. With Transport sync it plays only while the transport rolls and starts again from the top whenever the transport starts, so a take and its offline render hear exactly the same audio.
Starting, stopping and restarting fade over Fade so nothing clicks. Stopping returns to the start. The engine decodes and resamples the file once, when the Toy is prepared; until a file is attached the node is silent, and the inspector says why when the file is missing or cannot be played.
It plays WAV files only (16, 24 or 32-bit integer or 32 and 64-bit float, one to eight channels, 8 to 192 kHz). Lanes map as on the Sampler.
When to use it#
Use it for any recording that plays as it is, not from the keys: loops, beds, backing tracks, sound effects started by a clock or a button. To play a recording across a keyboard, use the Sampler. Video stays on the Media player.
Ports#
| Port | Direction | Signal | Lanes |
|---|---|---|---|
audio | Output | Audio | Inferred from the cable |
Parameters#
| Parameter | Label | Range | Default | Unit | Scale | Notes |
|---|---|---|---|---|---|---|
playing | Playing | 0 to 1 | 1 | linear | Plays or stops. Stopping fades out and returns to the start; a cable into @playing starts and stops it. Choices: 0 Stopped, 1 Playing. | |
restart | Restart | 0 to 1 | 0 | linear | A rise through 0.5, such as a clock pulse, jumps back to the start with a short crossfade. | |
loop | Loop | 0 to 1 | 1 | linear | Once stops at the region's end; Loop repeats the region with a crossfade at the seam. Choices: 0 Once, 1 Loop. | |
start | Start | 0 to 1 | 0 | linear | Start of the region, as a fraction of the file. | |
end | End | 0 to 1 | 1 | linear | End of the region, as a fraction of the file. At or before Start the player is silent. | |
rate | Rate | -4 to 4 | 1 | × | linear | Speed and pitch together. 1 plays as recorded; negative values play backwards from the end. |
gain | Gain | -60 to 12 | 0 | dB | linear | Output level. -60 dB is silent. |
sync | Sync | 0 to 1 | 1 | linear | Free plays whenever Playing is on. Transport also needs the transport rolling and restarts when it starts. Choices: 0 Free, 1 Transport. | |
fade_ms | Fade | 0 to 100 | 5 | ms | linear | De-click time for starts, stops, restarts and loop seams. |
asset: asset.
Playing (playing)#
Plays or stops. Stopping fades out and returns to the start. A control cable into @playing starts and stops it from the patch.
Restart (restart)#
A rise through 0.5 jumps back to the start with a crossfade. Cable a clock pulse (ctl.clock) into @restart to re-sync a loop every bar, or bind it to a Frame trigger.
Loop (loop), Start (start) and End (end)#
The region, as fractions of the file, and whether it repeats. In Loop the seam crossfades with the material just before Start; where the file has none (Start at 0) the seam fades out and back in instead. In Once the region plays to its end and the player stays silent until the next restart or start.
Rate (rate)#
Speed and pitch together: 1 plays as recorded, 2 an octave up at double speed, and negative values play backwards from End.
Gain (gain)#
Output level, from −60 dB (silent) to +12 dB.
Sync (sync)#
Free plays whenever Playing is on. Transport also needs the transport rolling and restarts each time it starts, which keeps loops aligned with the bar and replays deterministic.
Fade (fade_ms)#
The de-click time, up to 100 ms, for starts, stops, restarts and loop seams. Set it to 0 for a loop that is already seamless.
Tips#
- Trim a loop to whole bars so it stays on the beat at Rate 1.
- A loop recorded at another tempo drifts against the transport; Rate changes its pitch too, since the player does not time-stretch.
- Put a Gain or a compressor after a backing track to sit it under live parts.
See also#
Sampler, Media player, Gain, Cables.
Help patches
Each help patch is an ordinary Toy that teaches one idea. The diagram shows the Patch; the preview shows its Frame. Open it in TuneToys to play and edit it.
1. Loop a groove
beginner Teaches: playing, gain, rate
A one-bar drum loop that plays with the transport.
Connections as text
- Audio player audio output connected to Patch outputs audio input
- The groove is one bar at 120 BPM. It loops while Playing is on and the transport rolls.
- Rate changes speed and pitch together; below 0 it plays backwards.
2. Trim, loop and restart
intermediate Teaches: start, end, loop, restart, fade_ms
A region of the loop, played once or repeated, with a restart button.
Connections as text
- Audio player audio output connected to Patch outputs audio input
- End 0.5 keeps the first half bar: kick, snare and their hats.
- Restart jumps back to Start; Fade crossfades restarts, stops and the loop seam.
3. Free or with the transport
intermediate Teaches: sync
Free plays on its own; Transport plays while the transport rolls and restarts when it starts.
Connections as text
- Audio player audio output connected to Patch outputs audio input
- Transport sync starts the loop from the top each time the transport starts, so a take replays the same audio.
- Free keeps playing whatever the transport does.
Related nodes
- Sampler Plays an attached WAV asset as an instrument of up to eight voices in the Toy's tuning, with a playback region, a sustain loop and ADSR.
- Gain A clean stereo gain stage.
- Media player Plays a video asset or an open stream URL (MP4, WebM; HLS where the browser plays it natively) as one video stream with play, loop and rate controls.