vexflow icon indicating copy to clipboard operation
vexflow copied to clipboard

Call function on each note during animation

Open kpj opened this issue 3 years ago • 0 comments
trafficstars

Thanks a lot for creating this amazing library!

My goal is to animate the progression of a song by moving the musical notes across the stave. In addition, I want to call a function (which will do other cool things) whenever a note is "played" ("played" could just mean that the note crosses a certain area of the stave while moving horizontally).

The animation part seems possible, as indicated by a related issue #538 and a wiki page.

What is currently not clear to me, is how to execute a function at the specific time a note is "played" during the animation. It might be possible to hope for the best and time VexFlow's note display independently from the function execution but that seems unreliable.

Do you have a suggestion how to best achieve this?

kpj avatar Nov 13 '22 10:11 kpj