Create a song by converting piano notes to hertz values that Code Speaker can interpret and play!
The code in the editor below already works. Just plug in your Code Speaker and press upload to see what it does! Tinker with it and make changes to see what each line of code controls.
Watch the videos for line-by-line explanation of how the example program works. Then you'll be ready to make some changes of your own!
New Concept: Real-world crossover with code
Code is often created to reflect something from the ‘real world’, just like this program. It’s very easy to look up the hertz value of a piano note and convert it to a tone command you can use to build songs on your Code Speaker. There are some things, like chords, that you aren’t able to play on your Code Speaker. But there are some things, like playing at extremely high speeds with 100% accuracy, that are much easier to do on Code Speaker than on a real piano!