Plays an array of notes one after the other.
buzzer.playNotes() is a method of the buzzer that plays an array of notes one after the other at a given tempo. All of the notes are played as a whole note; if you want to change how long a particular note is played for, you can use the
This method accepts two parameters: a one-dimensional array full of notes, and a tempo to play them at. Tempo is an optional parameter, but if left undefined defaults to 120bpm.
|notes||Array of Strings||The array of notes to play.|
|tempo||Number||The speed at which to play the notes. Default speed is 120.|
nullis a way to represent emptiness in computer science, and the
buzzer.playNotes()method will read that as "Play nothing for the duration of a whole note".
Found a bug in the documentation? Let us know at firstname.lastname@example.org