The context the notes sound through.
Sound one note or several together, for durationMs unless told
otherwise; returns a function that stops them early. listener is told
as each starts and stops sounding. When the browser holds the sound back
until a tap, nothing sounds or is announced, and onNeedsGesture is told.
Optionallistener: NoteSynthListenerSound notes one after another, stepMs apart (default: 500), each for
durationMs unless told otherwise — a melodic interval, a scale. Returns
a function that stops them, those still to come included. listener is
told as each starts and stops sounding.
Optionallistener: NoteSynthListenerDownload the samples of some keys ahead of time; with no samples, nothing to do.
Sounds notes through Web Audio — with recorded samples when
samplesnames a host, otherwise with a small built-in voice that needs no download. Give it an audio context started from a user gesture (a click on an answer is one);playreturns a function that stops the note early.Example