Creates a Piano instance.
Piano
Optional
The rendering options
Clears all highlighted notes.
Clears all played notes.
Removes the current element from the DOM.
Renders the UI inside the current element.
Highlights the passed notes. Sets the corresponding note labels if passed.
Use an underscore in order to skip a note.
The notes to be displayed
The corresponding note labels
// will highlight C4, E4 and C5 with labels 1, 3 and 5setNotes("C4 E4 G4", "1 3 5") Copy
// will highlight C4, E4 and C5 with labels 1, 3 and 5setNotes("C4 E4 G4", "1 3 5")
// will highlight C4, E4 and C5 with labels 1, (nothing) and 5setNotes("C4 E4 G4", "1 _ 5") Copy
// will highlight C4, E4 and C5 with labels 1, (nothing) and 5setNotes("C4 E4 G4", "1 _ 5")
Sets the passed notes as played.
The notes to be played
Creates a
Pianoinstance.