Skip to content

Please update your browser

Your browser version is not supported by this site. CS First may not work properly. Learn more


Music is often an important part of telling stories. The right music played at a key point in a story can help your audience connect with your characters and plot by conveying emotions like fright, happiness, excitement, or anger. In this add-on, you’ll learn how to use the “note” and “drum” blocks to create a song. Then, you’ll experiment with them to code your very own song for your story.

To start, click on the stage where you’ll be programming your song.

First, your song needs a strong foundation. You’ll start your song by programming the beat. To begin, drag out a “play drum” block.

Click it to test it. You should hear a drum sound.

Click the drum dropdown menu, and select a different drum sound. You can choose any drum sound you like for your song and your story. Great! Drum beats work by looping sound, which means the drum sound will play over and over to create a beat for the song. To loop the beat, click control, select a forever loop, and place it around the “play drum” block.

Click it to test. *rattling drum sound* Okay, so now you have a looping drum sound.

Now, it’s time to create the other parts of your song.

They repeat a pattern every time you count to four, so add three more drum blocks to this loop...

and play around with the drum options.

You’re going to layer other sounds on top of this beat, so change the “beat” value of each block to 1 to ensure that everything gets layered correctly.

If you want your beat to play faster, drag out a “set tempo to” block and choose a faster tempo. When a drummer plays, though, they usually hit more than one drum at a time. To make your beat more complex, right click and duplicate the block stack you just made, and again tinker with the drum values until you have a beat you like. Consider repeating the same drum value a few times in a loop.

Now that you have two drum sounds playing, sync them together using a “when flag clicked” event. Click the flag to hear how they sound together.

*drum beat* Continue to try different drums until you have a sound you like for your story. Remember, though, you can always come back to the drums to make them sound different.

Next, you need to program a melody to play on top of the beat you just created.

Drag out a “play note” block. You’re going to loop this sound, too, so place a “forever” block around it. Click the block stack to hear how one note sounds when it is looped.

*rapid drum beat* Again, add three more notes to this loop to create a four count.

Make sure the beat value is 1 to match the drumbeat. Try out some different notes until you have a melody you like.

*piano note* *quick piano melody* Then sync it with the drum beat using a green flag event.

*piano melody with drum beat* To make this song fit your story and sound the way you want it to, experiment with a few different instruments for the melody. Place a “set instrument” block before the loop, and tinker with the various instruments to see how they sound in your song.

Choose an Add-On
Write a Song
Write a song to connect with your audience.
Add a Credits Scene
Make a credits scene to thank everyone who helped you with your story.
Easter Egg
Make an Easter Egg that changes the appearance of a sprite.
Add a Second Scene
Add another scene to your story.
Animated Words
Animate words like a comic book.
User-Controlled Decision
In this add-on, you’ll be challenged to engage the audience in your story by asking a question and using their response to extend the story.
arrow_backward Back
Next arrow_forward
  1. Choose an Add-On, and click "watch" to learn how to build it.
  2. Once you finish one Add-On, try another one below the video!