Closed Ant1r closed 7 years ago
Thanks, Antoine!
I have to admit I'm a little bit conflicted about this change. On the one hand, we clearly need something like this to work around current limitations of the internal API of Pd. On the other hand, Link is supposed to work without configuration, and a public latency parameter is a departure from that ideal.
The current compromise I have in mind is that I'll make this change, but I'll deliberately leave it undocumented and implement it in a way that's easy to remove once there's a better solution. Also, I prefer the name "offset" to "advance".
I tentatively pushed my take on this to a new branch: https://github.com/libpd/abl_link/tree/offset Please let me know what you think.
Ok no problem, anyway I think there could be another way, which would be to disable latency correction from abl_link and implement it on the application side. Would you prefer that ? I could try on the app I work on (NinjaJamm).
Interesting! Could you elaborate on your idea? How would you implement latency compensation on the application side?
For example by adding an offset to the phase then wrapping back to [0;n[ ; then if we want the beats, we just have to detect the crossing of integer boundaries for the new phase. I could add an example of such mechanism in an example patch. Also I could provide the patch I implemented in NinjaJamm for generating a seamless audio ramp from abl_link's phase. I'll propose such patches soon.
I see. I think this kind of patch would basically amount to an admission that the current external doesn't work well enough. I'll go ahead and merge the offset branch, then.
For now latency compensation is the same for every instances, because only one timeline is shared. As only the first instance will initialize this timeline, I used a common static "advance" variable to allow any instance to change effectively the latency compensation.