Sound

Sound
Extension Description
Sound blocks are related to playing various sounds, whether they be MIDI notes or saved sounds.

Introduction

Sound is one of the ten categories of default Scratch blocks. They are color-coded pink/magenta and are used to control sound (and formerly MIDI) functions.

Sounds are used for many things, and many different types are used. Sounds effects may be used in games, and music can be used in the background or as part of an intro or outro.

Read More

PictoBlox Blocks

The block will play the specified sound, pausing its script until the sound has finished playing.
The block will play the specified sound, with no pause to its script.
The block will stop any sounds currently being played on all sprites and the Stage. Pressing the Stop button will also stop all sounds, but is rarely used as it also stops all the other scripts running in the project.
The options for the Change () Effect by () block’s drop-down menu are pan left/right and pitch. The input is for selecting how much the sound will be changed. A positive number will make the sound effect have more effect, while a negative number will make it smaller.
It changes Sound Effects.
It clears any sound effects currently in place. However, it does not stop the sound currently being played.
The block changes the volume of a sprite by the specified amount.
The block sets its sprite’s volume to the specified amount. It only affects the sprite (or the Stage) that the block is in.
The block holds a sprite’s or the Stage’s volume. This block can be displayed as a Stage monitor.
All articles loaded
No more articles to load

Python Functions

The function will play the specified sound, pausing its script until the sound has finished playing.
Syntax: playuntildone(sound_name = “Grunt”)
The function will play the specified sound, with no pause to its script.
Syntax: play(sound_name = “Grunt”)
The function will stop any sounds currently being played on all sprites and the Stage. Pressing the Stop button will also stop all sounds, but is rarely used as it also stops all the other scripts running in the project.
Syntax: stopallsounds()
The function changes the specified sound effect by the values. The input is for selecting how much the sound will be changed. A positive number will make the sound effect have more effect, while a negative number will make it smaller.
Syntax: changesoundeffect(effect_name = “PITCH”, effect_value = 10)
The function changes the specified sound effect to the value. The input is for selecting how much the sound will be changed. A positive number will make the sound effect have more effect, while a negative number will make it smaller.
Syntax: setsoundeffect(effect_name = “PITCH”, effect_value = 100)
The function clears any sound effects currently in place. However, it does not stop the sound currently being played.
Syntax: clearsoundeffects()
The function changes the volume of a sprite by the specified amount.
Syntax: changevolume(volume = -10)
The function sets its sprite’s volume to the specified amount. It only affects the sprite (or the Stage) that the block is in.
Syntax: setvolumeto(volume = 100)
The function holds a sprite’s or the Stage’s volume. This block can be displayed as a Stage monitor.
Syntax: setvolume()
All articles loaded
No more articles to load

Python Coding Examples

All articles loaded
No more articles to load
Table of Contents