Simulator: ||music:set volume||
works on the LEGO® MINDSTORMS® Education EV3. It might not work in the simulator on every browser.
set Volume
Set the volume for the sound synthesizer.
The synthesizer volume controls the level of the sound playing on current sound output of the board (speaker or pin).
music.setVolume(128)
Parameters
volume
: the volume of of the sounds played to the sound output. The volume number can be between0
for silent and255
for the loudest sound.
Example
Play a tyrannosaurus roar at half volume.
music.setVolume(50)
music.playSoundEffect(sounds.animalsTRexRoar)
See also
music