Rock band - Scratch
- Get link
- X
- Other Apps
Rock band
Introduction
Learn how to code your own musical instruments!
What you will make
Click the green flag to begin. Then, click on the singer or the drum to hear what they sound like.
What you will need
Hardware
- A computer capable of running Scratch 3
Software
Sprites
Before you can start coding, you’ll need to add in a ‘thing’ to code. In Scratch, these ‘things’ are called sprites.
Open a new Scratch project.
Online: open a new online Scratch project at rpf.io/scratch-new.
Offline: open a new project in the offline editor.
If you need to download and install the Scratch offline editor, you can find it at rpf.io/scratchoff.
It looks like this:
The cat sprite that you can see is the Scratch mascot. You don’t need it for this game, so get rid of it by clicking on the X in the corner.
Next, click on Choose sprite from library to open up a list of all the Scratch sprites.
Scroll down until you see a drum sprite. Click on a drum to add it to your project.
Click and drag the drum to the bottom of the Stage.
Give your program a name by typing into the text box at the top.
Then click on File, and then on Save now to save your project.
If you are not online or don’t have a Scratch account, you can save a copy of your project by clicking on Save to your computer instead.
The Stage
The Stage is the area on the right, and is where your project comes to life. Think of it as a performance area, just like a real stage!
At the moment, the stage is white and looks pretty boring! Add a backdrop to it by clicking on Choose a backdrop.
Click on Indoors in the list at the top. Then click on a theatre backdrop.
Your stage should now look similar to this:
Making a drum
Now you will add code to your drum so that the drum makes a sound when it’s clicked.
You can find the code blocks in the Scripts tab, and they are all colour-coded!
First add the Music extension so you can play instruments.
Click on the Add extension button in the bottom left-hand corner.
Click on the Music extension to add it.