This is the main block we will be using for playing music notes.
- Note – denotes what musical note the buzzer will play.
- Note Duration – how long (in milliseconds) the note will be played before turning it off for the time set by Rest Duration.
- Rest Duration – how long (in milliseconds) to turn the buzzer off before executing the next code. By default, we can leave this at 0.
Note that both Note Duration and Rest Duration has elements of sleep. Hence, if we place other codes before this block, we can effectively use the bz.playNote block as a stand-in for the sleep block too!