Closed DataGreed closed 1 year ago
This confused me as well. The note has a separate accidental property.
You should be able to use:
addListener("noteon", e => {
document.body.innerHTML+= `${e.note.name}${e.note.accidental} <br>`;
});
Might be worth adding a property that is the "full name" and includes octave, note and accidental.
As @tobyhede remarked, the name
property is only for the letter part. I made it granular so it would be easier to parse (together with octave
and accidental
). There is no need for a "full name" property because it already exists in the form of the identifier
property.
Having said that, to prevent the confusion you experienced, I updated the documentation for the Note.name
property to make it clearer that it only returns the letter (it should show up on the website soon).
Hope this helps!
Thanks!
Description
Expected result
F#
will appear on the pageActual result
F
appears on the page.Environment: Tested on mac in chrome with Korg Nanokey.
Details Same happens with every accidental.