-
Notifications
You must be signed in to change notification settings - Fork 144
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
clock get_beat_sec returning the wrong value when called via tempo_change_handler #1714
Comments
ah, good catch, thank you! i recall (maybe erroneously) that passing the new tempo as an arg into |
basically, yeah. get_beat_sec() could depend on the tempo param value instead (param value always lags behind clock.get_tempo() a bit). that would fix synchronicity, but does it break other get_beat_sec use-cases, i.e. lfo library? |
hmm -- super good call, ty @artfwo !! |
i think that won't hurt, although i've never used this function and not 100% sure here. BUT, i would generally try to avoid get_beat_sec in clock'ed code in the first place, as we cannot 100% rely on the duration of a beat being stable between 2 sync points. that said, it's probably fine to change get_beat_sec to depend on param, as it's all lua layer, and consistency might improve things there a bit. |
when
clock.get_beat_sec()
is called viaclock.tempo_change_handler()
the returned value is off by 1bpm. here is the script to reproduce the described behaviour.The text was updated successfully, but these errors were encountered: