Interface
AudioPlayOpt
:Audio play configurations.
paused
?: booleanIf audio should start out paused.
since
v3000.0
loop
?: booleanIf audio should be played again from start when its ended.
volume
?: numberVolume of audio. 1.0 means full volume, 0.5 means half volume.
speed
?: numberPlayback speed. 1.0 means normal playback speed, 2.0 means twice as fast.
detune
?: numberDetune the sound. Every 100 means a semitone.
// play a random note in the octave
play("noteC", {
detune: randi(0, 12) * 100,
})
seek
?: numberThe start time, in seconds.
pan
?: numberThe stereo pan of the sound. -1.0 means fully from the left channel, 0.0 means centered, 1.0 means fully right. Defaults to 0.0.