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 and click “Sign In”

If you don’t have an account, click “Join Scratch” to create one for free.

Sign in to Scratch

2. Create a New Project

Once you are logged in, click the “Create” button at the top of the page.

Create a new Scratch project

Name your project something like “My Drum Kit”. Then, delete the Scratch cat by pressing the trash bin icon next to the cat.

Name your scratch project

3. Choose a Backdrop

Go to the bottom-right of your screen and click on the circular blue “Choose a Backdrop” button.

Choose a backdrop in Scratch

Click on the backdrop of your choice from the options.

Select your background

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.

Choose a scratch music sprite

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.

When this sprite clicked block

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.

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.

Copy code to scratch sprites

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!

Change each sprite's 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.

playing background music in scratch, add radio

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.

when this sprite clicked block

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.

play until done 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!

Scratch sounds tab

6. Choose a Sound

In the “Sounds” tab, click on the circular blue “Choose a Sound” button on the bottom-left of the screen.

Choose a sound

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.

Add a music loop

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.

play sound until done block

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 music loop in scratch

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.

Sound tab in scratch

2. Select Record

Go to the circular blue “Record” button on the bottom-left of the screen.

record music

3. Allow your microphone

There might be a pop-up asking if Scratch can use your microphone in your browser. Click Allow.

Allow your microphone

4. Record Your Audio

Click the “Record” button and when you are done, click “Stop recording“. Then, click the “Save” button.

Record your music in scratch

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!

start sound block

Try adding music to some of these projects!

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: