In this recipe, we will learn how to define a number of global constants, each representing a specific musical note. Then, we can play these different musical notes by referring to their constants. Musical notes are the building blocks of melodies. This will be the first step toward playing a melody. Once we have learned how to play a musical note, we can then combine a number of notes in sequence to play a melody in future recipes.
Playing a musical note
Getting ready
You will need access to the REPL on the Circuit Playground Express to run the code presented in this recipe.