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

Open in TuneToys

Audio player as the Patch draws it, at default values: inlets on the left, outlets on the right.

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#

PortDirectionSignalLanes
audioOutputAudioInferred from the cable

Parameters#

ParameterLabelRangeDefaultUnitScaleNotes
playingPlaying0 to 11linearPlays or stops. Stopping fades out and returns to the start; a cable into @playing starts and stops it. Choices: 0 Stopped, 1 Playing.
restartRestart0 to 10linearA rise through 0.5, such as a clock pulse, jumps back to the start with a short crossfade.
loopLoop0 to 11linearOnce stops at the region's end; Loop repeats the region with a crossfade at the seam. Choices: 0 Once, 1 Loop.
startStart0 to 10linearStart of the region, as a fraction of the file.
endEnd0 to 11linearEnd of the region, as a fraction of the file. At or before Start the player is silent.
rateRate-4 to 41×linearSpeed and pitch together. 1 plays as recorded; negative values play backwards from the end.
gainGain-60 to 120dBlinearOutput level. -60 dB is silent.
syncSync0 to 11linearFree plays whenever Playing is on. Transport also needs the transport rolling and restarts when it starts. Choices: 0 Free, 1 Transport.
fade_msFade0 to 1005mslinearDe-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.

Patch: Audio player audio output connected to Patch outputs audio input.
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.
Frame preview: Loop a grooveFrame “Loop a groove” with 4 elements: knob Gain, text heading, toggle Playing, knob Rate.0 dBGainLOOP A GROOVEPlaying1 ×Rate
Frame preview (static). Controls show their default values.

Open in TuneToys

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.

Patch: Audio player audio output connected to Patch outputs audio input.
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.
Frame preview: Trim, loop and restartFrame “Trim, loop and restart” with 6 elements: knob End, knob Fade, text heading, segmented Loop, trigger Restart, knob Start.0.5End5 msFadeTRIM, LOOP AND RESTARTOnceLoopLoopRestart0Start
Frame preview (static). Controls show their default values.

Open in TuneToys

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.

Patch: Audio player audio output connected to Patch outputs audio input.
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.
Frame preview: Free or with the transportFrame “Free or with the transport” with 2 elements: text heading, segmented Sync.FREE OR WITH THE TRANSPORTFreeTransportSync
Frame preview (static). Controls show their default values.

Open in TuneToys

  • 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.

Edit this page on GitHub

esc

↑ ↓ move↩ open⌘↩ new tabesc close