SoundBuilder
class SoundBuilder 
Constructors
constructor
public new SoundBuilderaudio: stringSoundBuilder: SoundBuilder
Begin configuring a sound to be played back.
Parameters
audio: stringSoundBuilder
Methods
detune
public detunecents: number: SoundBuilder
Pitch shift the played sound.
This also affects the duration of the sound.
Parameters
cents: numberThe pitch shift in cents.
gain
public gaindb: number: SoundBuilder
Set the amplification of the played sound.
Parameters
db: numberThe gain in dB.
play
public playoffset?: number: void
Play the configured sound at the current frame.
Parameters
offset?: numberAn offset in seconds from the current frame. Defaults to 0.
playbackRate
public playbackRaterate: number: SoundBuilder
Change the playback rate of the sound.
This also affects the perceived pitch of the sound.
Parameters
rate: numberThe new playback rate. Must be greater than 0.
trim
public trimstart?: numberend?: number: SoundBuilder
Trim the audio file to a specific portion of it.