Third Play: Music! Sounds
Quick References for all Sound blocks
play sound (sound name) until done: This block plays the specified sound until it is finished. The script will pause until the sound has completed playing.
start sound (sound name): This block starts playing the specified sound but does not wait for it to finish before moving on to the next code block.
stop all sounds: This block stops all currently playing sounds immediately.
change [ ] effect by (number): This block alters the specified sound effect, such as pitch, by the given amount. For example, changing the pitch can make the sound higher or lower.
set [ ] effect to (number): This block sets the specified sound effect, like pitch, to a particular value. It can be used to achieve a specific alteration in the sound's pitch or pan left/right.
clear sound effects: This block removes any sound effects that have been applied, resetting the sound to its original state without any alterations.
change volume by (number): This block changes the volume of the sprite's sounds by the specified amount, increasing or decreasing the volume.
set volume to (number) %: This block sets the volume of the sprite's sounds to a specified percentage of the original volume.
volume: This reporter block gives the current volume level of the sprite's sounds as a percentage. When the checkbox is checked, it will display the volume level on the stage.
Sounds
Just like sprites or costumes, you can use the sound effect from Scratch, edit, upload, or record your sounds in Scratch.
Sound effect is crucial for a good game. You can also find music instruments in the sound bank.
play sound(sound name) until done
start sound (sound name)
Play sound until done will play the specified sound and pause until it finishes. Start sound also plays the specified sound but does not wait and move on to the next code block.
Example:
play sound (Meow) until done
Start sound (Meow2)
Click the green flag to start: the cat will "Meow" first, then start the background music
Click the cat to make it say "Meow" twice in different tone, you will hear the second one before the first one end.
stop all sounds
This block will stop all current playing sound. But you can still hear new sounds if they are played after this block is executed.
Example:
stop all sounds
Click the green flag to start: the cat will "Meow" first, then start the background music
Click the stop button to stop all sounds. You click cat to play again.
change/set/clear sound effect
Just like looks effects, you can change, set, or clear sound effects: pitch and pan left/right. You will need a headphone to hear the pan left/right effect.
Example:
Change pitch effect by -10
Set pan left/right effect to 80
Pitch Up⬆️ and Pan Right ⬇️
Click the Pitch Up button to hear 10 piano notes increasing 10 in pitch each time. Click the Pitch Down button to hear 10 Trumpet not decreasing 10 in pitch each time.
Click the Pan l/r 80 to hear the second string accent pan right 80.
change/set volume
volume
Just like size in looks, you can change or set the volume of sounds. 100% corresponding to the original volume of the sound. The volume bubble stores the volume of a sprite.
Example:
Change volume by 20
Set volume to 10%
Click the green flag to start: the Drum Kit volume will be set to 10%.
Click the Drum Kit🥁 to hear 5 drum Bass increasing 20 in volume each time.