Skip to content

Build-A-Band with Raspberry Pi

Create your own virtual band using Raspberry Pi, Scratch 3, and sprite-based music programming.

  • Raspberry Pi
  • Beginner
  • 30–45 minutes
  • 7 steps

Shop this project

Cart

You'll need

Prices from vilros.com. Tax and shipping at checkout.

Before you start, you'll need

  • Raspberry Pi (any model)
  • Keyboard and mouse
  • Monitor
  • Internet connection (for online Scratch) or Scratch 3 Desktop

Start Scratch 3

About 3 minutes

Open Scratch and set up your project.

  1. On Raspberry Pi, go to the Programming menu and open Scratch 3.
  2. Alternatively, use the online editor at scratch.mit.edu.
  3. Delete the default cat sprite (right-click → Delete).
  4. Click File → Save Project and name it 'MyBand'.

You should see

Scratch 3 is open with a blank stage.

Add a drum kit sprite

About 5 minutes

Create your first band member with a drum.

  1. Click 'Choose a Sprite' and search for 'Drum'.
  2. Select a drum kit sprite and add it to the stage.
  3. Drag it to the left side of the stage.
  4. Click the 'Add Extension' button (bottom left) and add the 'Music' extension.

You should see

A drum sprite is on the stage and the Music extension is loaded.

Program the drums

About 7 minutes

Make the drum play when clicked.

  1. With the drum sprite selected, go to the Code tab.
  2. Drag a 'when this sprite clicked' block (yellow Events) to the scripts area.
  3. From Music blocks, attach 'play drum (1) Snare Drum for 0.25 beats'.
  4. Click the drum sprite on the stage to test the sound.
  5. Duplicate the code (right-click → Duplicate) and change to a different drum sound and beat length.

You should see

Clicking the drum sprite plays drum sounds.

Add a singer sprite

About 5 minutes

Create a vocalist for your band.

  1. Click 'Choose a Sprite' and select a person sprite (any character you like).
  2. Drag it to the center of the stage.
  3. Click the 'Sounds' tab.
  4. Click 'Choose a Sound' → Voice, and add a singing sound.

You should see

A singer sprite is on stage with a voice sound added.

Program the singer

About 5 minutes

Make the singer play a voice when clicked.

  1. Go to the Code tab with the singer sprite selected.
  2. Add a 'when this sprite clicked' block.
  3. From Sound blocks, attach 'start sound [your voice sound]'.
  4. From Looks blocks, add 'switch costume to [costume2]' to make the singer change appearance.
  5. Add a 'wait 1 seconds' block.
  6. Add 'switch costume to [costume1]' to return to normal.
  7. Test by clicking the singer.

You should see

Clicking the singer plays a voice and changes costume.

Design the stage backdrop

About 5 minutes

Give your band a performance venue.

  1. Click 'Choose a Backdrop' (bottom right, next to sprites).
  2. Browse to 'Indoors' and select a stage or concert hall backdrop.
  3. The backdrop appears behind all sprites.

You should see

Your band has a stage backdrop.

Add more instruments

About 10 minutes

Build out your full band.

  1. Add more sprites: guitars, pianos, bass, or backup singers.
  2. For each sprite, add sounds from the Sound library (Music category).
  3. Program each sprite with 'when this sprite clicked' and 'play sound' blocks.
  4. Experiment with different instrument sounds and timing.
  5. Try using 'when space key pressed' to trigger multiple instruments at once.
  6. Add 'play note (60) for (0.5) beats' blocks for melodic instruments.

You should see

You have a full band with multiple clickable instruments.

It didn't work
  • Sounds don't play or are cut off.

    Use 'play sound until done' instead of 'start sound' to ensure sounds complete before the next action.

What to do next

Stuck? Contact Vilros Support with your board model and what you see on screen.