Create a sprite that will interact with your instrument sprite and play sounds.
Your instrument will play notes when another sprite touches the different colours on your instrument sprite. This is similar to how a guitar plays notes when a pick touches the strings, or a piano plays notes when fingers press the keys.
Make or choose a sprite that will follow your mouse-pointer and can be used to play different notes. In the example below, we have used a simple coloured circle.
Now, get your sprite to follow your mouse-pointer, so that the person playing the instrument can control it.
Add code so that your new sprite follows the mouse-pointer.
Use My Blocks
to design what your instrument sounds like.
There are many elements of music that you can experiment with. You can change the notes, instrument, beats, rest, and tempo.
Create a
block that has inputs for as many of these elements as you want.My Blocks
When the sprite that is following the mouse-pointer touches a specific colour on your instrument sprite, a sound should be played. Your music maker can use the play note:
block to set different instruments, notes, beats, and rests.
Add if...then
blocks and the play note:
blocks to your instrument sprite. Add as many if...else
blocks as you need.
Debug: You might find some bugs in your project that you need to fix. Here are some common bugs.