Audio play configurations.
?: boolean If audio should start out paused.
?: boolean If audio should be played again from start when its ended.
?: number Volume of audio. 1.0 means full volume, 0.5 means half volume.
?: number Playback speed. 1.0 means normal playback speed, 2.0 means twice as fast.
?: number Detune the sound. Every 100 means a semitone.
// play a random note in the octave
play("noteC", {
detune: randi(0, 12) * 100,
})
?: number The start time, in seconds.
?: number The 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.