I would need to sync mocing image with interactive music score. I thought that I would just add sync points to wav files I’m using in the designer and set callback in the code. This all works perfectly when I’m using Events but there doesn’t seem to be any way of setting callbacks on audio run on musicsystem. Am I correct?
Any suggestions of how to solve (or go around of) this problem will be highly appreciated.
- jarkesia asked 10 years ago
You’re right. Currently you aren’t able to receive callbacks for sync points within segments. But it’s a great feature request. We’ll add it to our todo list.
The problem with callbacks is that precision is dependent on the frequency of calls to the update function.
Would it suffice to receive a callback every beat?
thanks for a reply.
The accuracy that the update function gives would be enough for me. But: callback every beat would pretty much solve my problem totally. Actually then I wouldn’t even need to fill my sound files with sync points. So in a way it would be an optimal solution for me.
We should be able to add a beat callback fairly quickly. It would be fired from the update() function if a beat has been passed since the last time the update() function was called. For example, the following timeline might occur (assuming update() is called every 15 ms):
835ms: update() called
850ms: update() called
851ms: musical beat passed
865ms: update() called, beat callback fired
Would that work for you?
I was testing this feature and found that there is odd behaviour. If you hace prompt a cue and music is playing, beat callback works perfectly. However if I now prompt another cue that is sequenced and synchronized on beat, callbacks of the previously playing cue are cancelled. So if I happen to cue the new cue 2 seconds before it is supposed to start, I don’t get any callbacks during that 2 seconds.
[quote:1x88riba]However if I now prompt another cue that is sequenced and synchronized on beat, callbacks of the previously playing cue are cancelled. So if I happen to cue the new cue 2 seconds before it is supposed to start, I don’t get any callbacks during that 2 seconds.[/quote:1x88riba]
Thanks for reporting this, I’ve reproduced it and am looking into a fix.
Please login first to submit.