surikov / webaudiofont

Use full GM set of musical instruments to play MIDI and single sounds or effects. Support for reverberation and equaliser. No plugins, no Flash. Pure HTML5 implementation compatible with desktop and mobile browser. See live examples.
https://surikov.github.io/webaudiofont/
GNU General Public License v3.0
891 stars 92 forks source link

How to trigger an event when player actually plays a note? #79

Closed wrcstewart closed 2 years ago

wrcstewart commented 2 years ago

Hi again, I'm wondering if there is a way to get an event that fires when a note actually plays or close to when the note plays? I would like to show a text version of the pitch on the screen synchronised with the playing. Thanks in advance for any help you can offer. Cheers William

surikov commented 2 years ago

You send the player the exact start time and duration of the each note. Use this information to show the chord of the notes.

WebAudioFontPlayer does not dispatch time events because you yourself know the exact time of each note.