Sight Reading Tutor With Makey Makey and Scratch

by cspsp in Circuits > Microcontrollers

741 Views, 3 Favorites, 0 Comments

Sight Reading Tutor With Makey Makey and Scratch

scratch.png

Learning to sight-read music is a challenge for many kids, my son being one such. We've tried various techniques we found online to try and help, but none of them were particularly "fun" in his eyes. It also didn't help that I don't read music myself, so am in no position to check if what he's reading & playing on the piano is in fact correct.

The one thing I can do though is write code. So I came up with the idea to build a mini-piano using the Makey Makey and use Scratch to build a program that throws up random sequences of notes. It then tracks the notes played on the paper piano and verifies that the notes are correct.

Supplies

Here's what you need to build this project:

  • Paper "piano keys"
  • Kitchen foil
  • Scissors
  • Cardboard base
  • Glue
  • Makey Makey
  • Scratch account for the code

Step 1: Make Your Paper Piano

piano.gif
IMG_0079.jpg
IMG_0080.jpg

First of all, let's make our paper piano.

For this, you can either print out a piano keys image, or draw your own depending on how artistic you're feeling.

I chose the former option as we were just on a craft break from school work.

I cut half-way along each white key border to separate out the keys.

The next step was to tape a piece of aluminium foil onto each of the keys, leaving a bit at the top to be able to clip on the wires from the Makey Makey later.

For the base, I cut out one side of a cereal box and taped a piece of aluminium foil lengthwise for as my Earth strip.

To ensure that not all keys would "play" at the same time, I just added a folded up piece of cardboard between the paper & the base.

That it! Your paper piano is ready.

Step 2: Build the Code

code2.png
code1.png
notes.png
scratch.png
code3.png
code4.png
code5.png

At the crux of the sight reading tutor is the Scratch code.

There are 2 sprites - One is the cat that provides the messages to the user, and the second is the one that manages the notes and stamps them on screen.

The code for the cat is fairly simple.It simply calls a block defined in the Notes sprite called musicsheet.

The Notes sprite has various costumes, each representing a note. You could have these built for treble-clef or bass-clef as required. In this instance, I started with just the treble-clef notes.

The 'musicsheet' block is a custom block that stamps a random selection notes on the screen using the sprite's costumes collection. You can control the number of notes you want to have in your "music piece" and also the notes you wish to use by simply controlling the costume number randomisation range. We collect this selection of notes into a list variable so that we know what is the list of notes presented to the user.

Now we add the code to accept the notes being played from the Makey Makey/ keyboard and collect them into a list.

Once the user has played the set number of notes, we simply compare the 2 lists and if they're the same, then a "Well Done" message is displayed, else the user is encouraged to try again.

Step 3: Putting It All Together

IMG_0077.jpg
IMG_0078.jpg
Sight Reading Tutor with Scratch & Makey Makey

The final step is to put it all together and connect the Makey Makey as shown.

And yes, get your "student" to test it out :)

I have never seen my son more eager to sight-read than with this project. And maybe I will finally learn too!

Please do try it out if you or your child is learning to read music and let me know how you get on.