Code an Instrument

Want to make a musical instrument that sings, farts, and laughs? I’ve put together a fun tutorial introducing kids to Scratch coding where they’ll get to do just that! Recommended for ages 8 and up, or for younger kids with the help of a teacher/parent.

Video Tutorial


  • Computer/laptop with access to the Scratch website
    (It’s quick and easy to make an account, but if you don’t want to save your project, you don’t need one!)

    Scratch is a project of the Scratch Foundation, in collaboration with the Lifelong Kindergarten Group at the MIT Media Lab. It is available for free at


STEP 1. Set up your project.
• Open the “Record Your Own Musical Instrument” project in Scratch.
• Click the “Remix” Button. This makes a copy of the project for you to change and make your own!
(If you are playing around without an account and don’t plan to save your instrument, you can just click the “See Inside” button.)
• When the project opens, click the colored buttons on the stage to see what happens.

STEP 2. Add new sounds to the buttons
• Select the “Blue” sprite.
• In the code, find the “start sound” block and select “Record…” from the dropdown
• Record your new sound! Be sure to name it so it’s easier to recognize later.
• Click on the code tab. Select your new sound from the “start sound” block dropdown.
• Test it out! Does the blue button play your new sound?
• Repeat for each button (“Pink”, “Green”, “Purple”, and “Orange”)

STEP 3. Rock out!
• Click the fullscreen button to enlarge the stage.
• Click the green flag to start your concert.
• Rock out with your new, awesome, totally unique instrument!

Have fun playing with Scratch! Mess around and see what else you can make happen at your concert! If you’d like to share your creation with me, I’m on Twitter @fangmous or IG @fangmousbooks. I can’t wait to see what you create.

Bonus Challenges

• Did you find the secret code that makes the cheering start when you press the green flag? Try changing the sound in that code! (Hint: Check the backdrop!)
• What else might you change in the project to make it your own? Try making the buttons look different, by changing their costumes.
• What if you wanted the buttons to move every time you clicked them? Try to find and add a code block to make that happen!

My Books

Layla and the Bots are in an awesome rock band! They also use problem-solving and creativity to build cool inventions. This fully illustrated series is part of Scholastic’s early chapter book line Branches, aimed at newly independent readers.

Available now! For personalized/signed copies, leave a comment at checkout with Linden Tree Books.


Join My Newsletter

If you’d like to receive occasional updates on book news, giveaways, and kids’ activities, please join my email list!

Success! You're on the list.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s