Make music on your BBC micro:bit
Why not use your micro:bit to listen to and compose some music?
Build a jukebox and play a tune
Connect headphones to your micro:bit, or with the new micro:bit use the built-in speaker to hear your tunes.
- The micro:bit's buttons work as inputs and music is the output.
- 20 pre-programmed melodies to choose from.
- Adapt the program to show different pictures, letters, words or numbers depending on the tune picked.
- Adjust the code so that the micro:bit plays a random tune if it is shaken.
Code a song using loops
- Program your micro:bit to play Frere Jacques or another famous song using the 'set tempo' and 'play tone' blocks from the MakeCode editor.
- In Frere Jacques, each bar repeats twice. Your students can use loops to play these repeated notes, thus using the smallest amount of code possible to perform the task.
Make a guitar with your micro:bit
- The guitar 1 - touch tunes project builds on the jukebox project but instead of using the micro:bit’s buttons, you can make your own input device. Use scissors, cardboard and tin foil to make your guitar then connect it to your micro:bit using crocodile clip leads.
- Once you’ve mastered a basic guitar, try out the guitar 2 - chords project to play chords.
- The guitar 3 - octaves project allows you to shift the guitar’s pitch up and down octaves.