groupAudio
play(time?: number): void
Start playing audio.
sincev3000.0
seek(time: number): void
Seek time.
sincev3000.0
Stop the sound.
sincev3001.0
If the sound is paused.
sincev2000.1
Playback speed of the sound. 1.0 means normal playback speed, 2.0 means twice as fast.
Detune the sound. Every 100 means a semitone.
// tune down a semitone
music.detune = -100
// tune up an octave
music.detune = 1200
Volume of the sound. 1.0 means full volume, 0.5 means half volume.
pan?: 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.
loop: boolean
If the audio should start again when it ends.
time(): number
The current playing time (not accurate if speed is changed).
The total duration.
onEnd(action: ()=>void): KEventController
Register an event that runs when audio ends.
sincev3000.0
then(action: ()=>void): KEventController
connect(node?: AudioNode): void
Disconnect the audio node from whatever it is currently connected to
and connect it to the passed-in audio node, or to Kaplay's default volume node
if no node is passed.