onStart callback? #18
Closed
drscottlobo
started this conversation in
Ideas
Replies: 2 comments 2 replies
-
Hi, this is more tricky to implement, and I'm not sure if I want to. In theory, you already know when things start (not always the same with the stop time). May I ask you why you need it? |
Beta Was this translation helpful? Give feedback.
0 replies
-
Hi! So I’m doing some basic score notation in React where a series of notes is played back for the user, and like Sibelius or MuseScore, as the notes playback I want each note in the score to change color.
So what I imagine to be the easiest solution is to have a setHighlight called when each note starts and a setHighlight when each ends. I have tried a setTimeout in the past but it’s totally unreliable and the highlights end up out of sync. I’ve been using waaclock to do it better. But thought if smplr was taking care of the timing, it might be easy to just fire those events onStart and (already working great) onEnded. Maybe set timeout works more reliably somehow when using the AudioContext?
Thanks for your help and any suggestions.
|
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Sorry! Should have requested both at once, could you also add a callback when scheduled audio starts? onStart: callback?
Thanks, this has been the nicest MIDI library I've found yet!
Beta Was this translation helpful? Give feedback.
All reactions