-
Notifications
You must be signed in to change notification settings - Fork 5
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Running Separate Tracks at Different Speeds #3
Comments
Hello @AuzFox I think using multiple clocks for this situation is the right approach. You can use the clocks's callback directly without attaching dividers (it's still possible if needed with BKDividerAttachToClock). I made a new example which shows this: https://github.com/detomon/BlipKit/blob/master/examples/clocks.c (I hope it's clear). This uses three clocks running with different periods which sync up every second. Technically, there is a drift between the clocks because of rounding errors, but it's minuscule and shouldn't be relevant. |
Ah, this is just what I was looking for, and the example seems pretty clear to me on how it's working. Thanks a bunch! :) |
No problem at all. Glad it helped! |
Hello! Had a quick question regarding attaching multiple clocks to a context. I hope it's not too much trouble!
I'm trying to write a tracker similar to LSDJ in that each track can set its own play speed based on the tempo of the song. (For example, track A might run at 4 rows per beat while track B runs at 5 rows per beat)
I don't believe this is possible when only using the master clock, but I see that it's possible to attach multiple clocks to a context, so my thinking is to create one clock per track and use that to drive the divider callbacks.
Would this be the correct approach? If so, how would I set this up? If not, what would be the preferred method to accomplish this?
The text was updated successfully, but these errors were encountered: