AudioBufferPlayer_v2 Op

AudioBufferPlayer

Play back audio data stored in an AudioBuffer


Typically connected to a Ops.WebAudio.AudioBuffer, which holds the sample / audio file.
In contrast to the Web Audio AudioBufferSourceNode, which can only play back an AudioBuffer once, this op can play back multiple times (every time the playback finished a new AudioBufferSourceNode is being created internally).


Full Name
  • Ops.WebAudio.AudioBufferPlayer_v2
Visibility
  • Core Op - Official cables op
License
  • MIT
AuthorgithubTest Patches


Example Patch AudioBuffer Play Stop Seek

Shows how to play / pause / seek an audio file
Open In Editor

INPUT PORTS


Audio Buffer (Object:audioBuffer)

The audio buffer (typically from an audio file) which contains the audio data. In most cases you need to create a AudioBuffer op to load your audio sample and connect it to this port.

Playback Controls

Start / Stop (Number:boolean )

When set the playback is started

Loop (Number:boolean )

Weather or not the playback should start from the beginning once the end has been reached. Please note that some browsers have problems doing a perfect loop with certain file types. If you e.g. use an MP3-file as AudioBuffer Google Chrome might produce a slight gap between the loops. Ogg-files sometimes work better.

Restart (Trigger)

trigger to restart the playback

Time Controls

Offset (Number)

Shifts the playback position

Miscellaneous

Playback Rate (Number)

How fast / slow the audio should be played back, 1 is normal speed, 2 double speed, 0.5 half speed.

Detune (Number)

How much the sound should be detuned in cents. -100 means one semitone lower, 100 one semitone higher, 1200 is one octave higher (12 * 100).

OUTPUT PORTS


Audio Out (Object)

The audio out object

Is Playing (boolean Number)

returns true if audio file is playing, false if not

Loading (boolean Number)

true if currently loading an audio source


Patches using AudioBufferPlayer_v2

  • Examples
  • Public
  • My Patches

Changelog


cloned op from Ops.WebAudio.AudioBufferPlayeruser avatarsimod - 2020-11-16 17:40
Ops.User.cables.AudioBufPlayer_v2 renamed to Ops.WebAudio.AudioBufferPlayer_v2user avatarsimod - 2020-11-17 14:52
removed non-working start/stop ports, fixed restartuser avatarstephan - 2022-05-16 15:24