How to Make an Instrument Play Music on Scratch.mit.edu

Introduction: How to Make an Instrument Play Music on Scratch.mit.edu

Here, I am going to show you how to make an instrument play music on the programming website, Scratch.

Supplies:

a computer with a good web browser

Step 1: Go to the Website: Www.scratch.mit.edu

From there you can click the Start Creating icon. Or, if you have an account and are signed in, then you can click the create icon in the top left corner.

Step 2: Choosing a Sprite

Then, you should delete the pre-loaded cat sprite and choose a musical instrument. To do this, go to the sprites section of the screen and click choose sprite. There you will find a large library of sprites. Then you can scroll or go to the Music category to find your instrument* I chose saxophone.

* Instrument has to be able to play notes. No singer, speaker, microphone, radio, bell, or drums.

Step 3: Then, Find the Code

First, go to the Events code category. Then, drag out 8 When Space Key Pressed code blocks. Click the word space on the blocks and you will find a list of the keys that are on your keyboard. Then go to the Sound code category. Then, drag out 8 Play Sound C2 Sax Until Done blocks. Click the word C2 Sax to pull up a list of musical notes.

Step 4: Put Code Together

Then, with the lists that you pulled up, you can switch the events blocks to: a, b, c, d, e, f, g, and 2. Then switch the sound blocks to C Sax, D Sax, E Sax, F Sax, G Sax, A Sax, B Sax, and C2 Sax. Then you can match each letter to its corresponding letter.

Step 5: Play Music

Then, you just hit the key to play its corresponding musical note.

Step 6: While in Scratch...

While you are in Scratch, be sure to check out some of my other projects. My Scratch name is ccfprogrammer.

Be the First to Share

    Recommendations

    • Pi Day Speed Challenge

      Pi Day Speed Challenge
    • Trash to Treasure Contest

      Trash to Treasure Contest
    • Sculpt & Carve Challenge

      Sculpt & Carve Challenge

    Comments