Scratch Music Maker
Time: 15–25 minutes
What You’ll Need:
A computer or laptop
A Scratch account
Speakers or headphones (to hear your masterpieces!)
Project Overview
Turn your keyboard into a musical instrument! In this project, you will learn how to use Event Blocks to trigger sounds and animations. By the end, you'll have a drum, a bell, and a whistle that react instantly when you press specific keys.
Instructions
1. Prepare Your Orchestra
Go to Scratch and click Create.
Delete the default cat sprite.
Click Choose a Sprite and add three different items:
Search for Drum.
Search for Bell.
Search for Whistles (or any bird sprite).
Choose a Backdrop like "Concert" or "Theater" to set the stage.
2. Code the Drum (The Beat)
We want the drum to play a sound and "pulse" (grow and shrink) when you hit the Spacebar.
Select the Drum sprite.
Drag out the following blocks:
when [space] key pressed
play drum (1) for (0.25) beats
(Note: You may need to add the "Music" extension by clicking the blue icon in the bottom-left corner to see this block!)
change size by (10)
wait (0.1) seconds
set size to (100)%
3. Code the Bell (The Melody)
The bell will ring whenever you press the "A" key.
Select the Bell sprite.
Go to the Sounds tab at the top and ensure the "Bell" sound is loaded.
Go back to the Code tab and add:
when [a] key pressed
play sound [Bell] until done
4. Code the Whistle (The High Note)
The whistle (or bird) will chirp when you press the "D" key.
Select the Whistle/Bird sprite.
Add the following blocks:
when [d] key pressed
play sound [Bird] until done
How to Play
Click the Green Flag (though these blocks work even if it isn't clicked!).
Tap your Spacebar to lay down a beat.
Press A and D to add the bell and whistle sounds!