Closed jaredjj3 closed 5 months ago
I'm starting to work on this now. In both approaches, vexml would expose the same API. I'm going with the Single event listener approach unless I run into a hard block.
Install a single event listener on the <svg>
or <canvas>
. On interaction, vexml calculates the data needed to satisfy the API.
<svg>
and <canvas>
backends.Install an event listener for each vexflow.Element
in a <svg>
. vexml would pipe and transform the data from the native events to conform to the API.
<canvas>
cannot be support with this approach.
Requirements
When the user interacts (click, tap, keyboard press during focus, etc.) with a rendered score, the score should emit events that can be hooked into. An event may or may not contain information about what was interacted with.
Hints
Before developing anything, I highly recommend that you make a list of events + payloads (see MusicDisplay Event definitions below).
There is prior art in stringsync.