Skip to content

In this ad on, you will right co the change the instrument, and the tempo of your note played, when the yellow x sprite moves across the stage.

(upbeat music)

Select the yellow x sprite.

Tempo is the speed or pace of a piece of music, changing tempo of the music of your art piece plays, using the change tempo by block.

Drag out a change tempo by block, and place it in the conditional of your co stack, beneath the play note block.

Now, when this sprite touches the color green, it will play note 52 for .5 beats, then change tempo by 20.

The speed or pace of the note being played should increase, test it out and see what happens.

(upbeat music)

if you wanna slow down the pace of your music, you can always change the value 20 to a negative number, like -20.

(upbeat music)

Tinker with the values to make your program change the tempo of the music being played.

You can also change the instrument that is playing the note in your project, to do that use the set instrument to block.

Drag out a set instrument to block, and place it in the second conditional in your code stack, above the play note block.

Click on the drop down main to see the different instruments included in scratch.

There are about 21 different instruments to choose from.

To play around an instrument each time the sprite touches a particular color, for example orange you need a pick random block.

Go to the operators menu, drag out a pick random one to 10 block, and place it inside the value bubble of the set instrument to block.

Since there are 21 instruments in scratch, change the values in the pick random block to pick from one to 21, so that each time the block runs, it chooses a different or random instrument, test out your code to see what happens.

(upbeat music)

When the sprite touches orange, the instrument playing the note changes, cool.

(upbeat music)

Now it's your turn, use the change tempo by block to change the tempo of the music.

Use the set instrument to and pick random blocks to make the instrument change when the sprite touches a particular color.

And lastly, tinker with the values and placement of these blocks, until you find something you like.

Choose an Add-On

Change Instrument and Tempo

Change instruments and tempo in your musical art piece when the yellow X sprite touches different colors.

Make it Melodic with a Chord

Make your project play chords, not just individual notes.

Easter Egg Surprise

Add a surprise color to your art piece that plays an unexpected sound when touched.

Sprite Trail

Add a graphic effect that makes the yellow X sprite leave a color-changing trail across the screen.


  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!