SoundInstances

Family: Sound · One form

What it does

SoundInstances takes soundID (an integer), and answers an integer. soundID is the id of a Sound object, the one LoadSound returned: it is how the call knows what to act on.

Syntax

SoundInstances(soundID integer) → integer

Parameters

NameType
soundIDinteger

Every form returns

integer

Example · generated

sound = LoadSound("assets/sound.wav")DO  Print(SoundInstances(sound))  Sync()LOOP

LoadSound is there to give the call something to act on; SoundInstances is the line that matters. The DO … LOOP is not decoration: a classic BASIC program ends the moment it runs out of lines, and Sync() is what draws the frame.

37 commands in Sound