Scratch is a fun and free way for kids to learn how to code. With Scratch, you can create cool games, stories, and animations by dragging and dropping blocks of code. It’s easy to use and perfect for beginners who want to be creative and solve problems.
In this tutorial, I will teach you how to add music to Scratch projects. You can choose from the library of background music or add your own audio files to make your project even more exciting. With Scratch, you can let your imagination run wild and make something that you can be proud of. So, let’s get started and make some music in Scratch!
How to Add Music in Scratch
Set a mood with the right song or use sound effects to enhance your game using these simple steps.
1. Go to Scratch.mit.edu and click “Sign In”
If you don’t have an account, click “Join Scratch” to create one for free.
2. Create a New Project
Once you are logged in, click the “Create” button at the top of the page.
Name your project something like “My Drum Kit”. Then, delete the Scratch cat by pressing the trash bin icon next to the cat.
3. Choose a Backdrop
Go to the bottom-right of your screen and click on the circular blue “Choose a Backdrop” button.
Click on the backdrop of your choice from the options.
Recommended: How to Make a Game on Scratch
4. Add an Instrument Sprite
Go to the bottom-right of your screen and click on the circular blue “Choose a Sprite” button.
Type drum into the search bar at the top of the page to find all of the drumkit parts. Start by adding the “Drum Kit” sprite, then the “Drum-cymbal” and “Drum-snare“.
Click and drag these wherever you would like.
5. Add “When This Sprite Clicked” block
Then click on the “Drum Kit” sprite and drag a “when this sprite clicked” block from the Events category (Yellow Blocks) into the code area.
6. Add “start sound” block
Go to the Sound category, then click and drag the “start sound” block and connect it to under the “when this sprite clicked” block.
7. Copy Code to Other Sprites
Click and drag this code into the other sprites in the sprites list at the bottom right of the page. This is essentially a copy-paste of your code so you don’t have to find the same blocks for every instrument. When you click on the other instruments, you should then see the same code.
8. Change Each Sprite’s Sound
Click on each sprite and select a different sound in the “start sound” block by clicking on the name of the sound. Now click on each sprite in your drumset to enjoy your music!
Play Background Music in Scratch
You can also play music or sounds continuously in your project using a simple loop.
1. Add a New Sprite
In your project, click the “Choose a sprite” button on the bottom right of the screen. Then select a new sprite, such as a radio, that will play music in the background.
2. Add a “when this sprite clicked” block
From the Events category, click and drag a “when this sprite clicked” block into the code area.
3. Add “play sound until done” block
Next, go to the Sound category and drag a “play sound until done” block into the “forever” block.
4. Add a “set volume to” block
You can also control how loud the background music is by using a “set volume to” block in the Sounds category. Put this above the “forever” block. You can change how loud it is by changing the value in the textbox to less than 100.
5. Edit in the “Sounds” tab
Click on the “Sounds” tab on the left side of the screen, above where the code blocks are. This is where you can find and edit sounds for your project!
6. Choose a Sound
In the “Sounds” tab, click on the circular blue “Choose a Sound” button on the bottom-left of the screen.
7. Add a loop
Click on the “Loops” category and click a sound you like. A loop is a repeating section of sound or music.
8. Update “play sound until done” block
Click on the “Code” tab and edit the “play sound until done” block to have the new sound.
9. Start the music
Now, click on the radio to start the background music! Have fun playing alongside the music with your drum set.
Add Custom Audio in Scratch
Record your own audio, like your voice or favorite instrument, using a microphone and add it to your Scratch project.
1. Choose a Sound
Click on the instrument in your project you want to add the custom sound to. Then, click on the “Sounds” tab.
2. Select Record
Go to the circular blue “Record” button on the bottom-left of the screen.
3. Allow your microphone
There might be a pop-up asking if Scratch can use your microphone in your browser. Click Allow.
4. Record Your Audio
Click the “Record” button and when you are done, click “Stop recording“. Then, click the “Save” button.
7. Update “start sound” block
Go back to the “Code” tab and click on “recording1” in the “start sound” block. You’ve just made your own custom audio!
Try adding music to some of these projects!
- Flying Space Cat – Assist Space Cat in its space exploration mission by developing an enjoyable crystal-collecting game using Scratch programming platform.
- Code a Rocket Landing Game – Finish this Scratch programming tutorial designed for children and create a game where you safely land a rocket.
- Valentines Day Card Scratcher – Create a Valentine’s Day scratch-off card with a personal touch by following this easy-to-follow Scratch programming tutorial.
- Holidays Advent Calendar – Use Scratch to program a customized Advent Calendar for the holiday season and gradually unveil presents, treats, or activities to share with your friends adn family.
- Halloween Candy Collector Game – Follow this simple Scratch programming tutorial and create a personalized game where you collect candies on Halloween.
Download Free Printable Scratch Coding Tutorials PDF
Get the Rocketship Landing game and Flying Space Cat Scratch tutorials in a printable format.
Intro to Scratch Coding
At CodeWizardsHQ, we know that getting started with technology and programming early on is important for success. Our elementary school coding program uses Scratch to introduce students to programming and get them excited about coding.
In our first course, Animation and Games with Scratch, students learn key programming concepts like variables, loops, and conditionals. By the end of the course, they will be able to create their own games and animations using Scratch. This prepares them for more advanced coding and a bright future in the world of technology. Our elementary school coding program allows students to develop their skills and creativity while having fun and learning something new!
Ready to level up your child’s learning experience? Take a coding class with CodeWizardsHQ: