From MiniScript Wiki
Jump to navigation Jump to search is a method that takes up to 3 parameters to play a previous setup Sound. It loops the sound if Sound.loop is true.


The method has the following signature: v, p, s

Parameter Description
v Volume, sets volume between 0 and 1
p Pan, sets pan between -1 (full left) and 1 (full right)
s Speed, sets the playback speed multiplier

The default of all the parameters is 1.

Example for backroundmusic loop

Load some background music from a file, set it to loop, and then play it on volume 0.2.

background_loop_track = file.loadSound("/usr/sound/background_loop.wav")
background_loop_track.loop = 1 0.2, 1, 1

Sound Example 1 from

pew = new Sound
pew.init 0.3, [8000,100], [1,0]

See also: Sound