Sound
To add sound to your project, use Sound
blocks. For example, you can create a continuous background soundtrack, or add sounds that play at regular intervals.
First, select a sound from the Sound Library, or record your own sound.
To add sound to your project, use Sound
blocks. For example, you can create a continuous background soundtrack, or add sounds that play at regular intervals.
First, select a sound from the Sound Library, or record your own sound.
Select the sprite that you want to have the new sound, then select the Sounds tab. Each sprite starts with a default sound:
Scratch has a library of sounds that you can add to your sprites. Click on the Choose a Sound icon to open the Sound Library:
To play a sound, hold your mouse cursor (or your finger, if you are using a tablet) over the Play icon:
Click on any sound to add it to your sprite. You will be taken straight back to the Sounds tab and you will be able to see the sound that you have just added:
If you switch to the Code tab and look at the Sound
blocks menu, you will be able to select the new sound:
Tip: You can also add sounds to the Stage.
Select the sprite that you want to have the new recorded sound, then select the Sounds tab:
Go to the Choose a Sound menu and select the Record option:
When you are ready, click the Record button to start recording your sound:
Click the Stop recording button to stop recording your sound:
Your new recording will be shown. You can Re-record your sound if you are not happy with it.
Drag the orange circles to crop your sound; the part of the sound with a blue background (between the orange circles) will be the part that is kept:
When you are happy with your recording, click the Save button. You will be taken straight back to the Sounds tab and you will be able to see the sound that you have just added:
If you switch to the Code tab and look at the Sound
blocks menu, you will be able to select the new sound:
Add code to run Sound
blocks where you want sound in your project.
Click on the green flag to hear the sounds.
Radio soundtrack: See inside
You can use a play sound until done
block inside a forever
loop. Once the sound has finished, the forever
loop makes the sound start again from the beginning.
This code uses a single long sound clip repeated as a soundtrack:
whenclicked
forever
playsound
Dance Snare Beatuntildone
Note: When you choose a new sound, if you select the Loops category, Scratch will only show you the sounds that are suitable for a single looping soundtrack.
Click on the green flag to hear the sounds.
Champ performance: See inside
Use a forever
block to create a looped sound. You can:
Football sounds: See inside
Click on the green flag to hear the sounds.
In this project, the Stage has code to play a sound at regular intervals:
The Whistle sprite also plays a sound at regular intervals:
Once you have chosen your sounds, you may want to change the volume
, pitch
, or pan
(so you hear the sound from the left- or right-hand speaker).
You can also use the Text to Speech
extension: