Play the keyboard and store the notes in a list.
I used Scratch for the drawings. IMPROVED VERSION: http://scratch.mit.edu/projects/42038782/