Is anyone maintaining abl_link~?
It's fundamentally broken (not accounting for audio driver latency = incorrect sync with non-Pd clients) but nobody is listening.
https://github.com/libpd/abl_link/issues/20
hjh
abl_link~ maintenance?
Is anyone maintaining abl_link~?
It's fundamentally broken (not accounting for audio driver latency = incorrect sync with non-Pd clients) but nobody is listening.
https://github.com/libpd/abl_link/issues/20
hjh
Where is the specification for ableton link?
Also-- Assuming that arbitrary devices are to be able to connect through ableton link, I don't see how there could be any solution to the design of abl_link that doesn't require a human user to choose an offset based on measuring round-trip latency the given arbitrary device/configuration. You either have to do that or have everyone on high end audio interfaces (or perhaps homogenous devices like all iphones or something).
Put another way-- if you can figure out an automated way to tackle this problem for arbitrary Linux configurations/devices, please abstract out that solution into a library that will be the most useful addition to Linux audio in decades.
Also, just skimming the source-- that object is set up so that at each dsp tick it schedules the work to be done at the next dsp tick. For Pd that means a delay of 64 samples. Without numbers on the output image in your link I have no idea whether that represents a significant proportion of the delay you measured or not.
I also have no idea how the delay you measured compares to the delay you experience from the time it takes for the sound to hit your ears. That's why I mentioned rountrip latency above-- it's the only (per-device) measurement that doesn't carry with it the risk of getting caught inside a bubble of insignificant digits.
@jancsika said:
Where is the specification for ableton link?
Relevant bit is: https://github.com/Ableton/link#latency-compensation
"In order for multiple devices to play in time, we need to synchronize the moment at which their signals hit the speaker or output cable. If this compensation is not performed, the output signals from devices with different output latencies will exhibit a persistent offset from each other. For this reason, the audio system's output latency should be added to system time values before passing them to Link methods."
abl_link~, by default, doesn't do this. But, at https://github.com/libpd/abl_link/issues/20, I was told that [abl_link~] response to a "offset $1" message where a positive number of milliseconds pushes the timing messages earlier.
Using that, it's actually easy to tune manually.
This was undocumented -- intentionally undocumented, for a reason that I can't say I agree with. So I'll put in a PR to document it.
Also-- Assuming that arbitrary devices are to be able to connect through ableton link, I don't see how there could be any solution to the design of abl_link that doesn't require a human user to choose an offset based on measuring round-trip latency the given arbitrary device/configuration. You either have to do that or have everyone on high end audio interfaces (or perhaps homogenous devices like all iphones or something).
As far as I know (and I haven't gone deeply into Link's sources), Link establishes a relationship between the local machine's system time and a shared timebase that is synchronized over the network. Exactly how the shared timebase is synchronized, I couldn't tell you in detail, but linear regressions and Kalman filters are involved -- so I imagine it could make a prediction, based on the last n beats, of the system time when beat 243.5 is supposed to happen, and adjust the prediction by small amounts, incrementally, to keep all the players together.
Then, as quoted above, it stipulates that the sound for beat 243.5 should hit the speakers at the system time associated with that beat. The client app knows what time it is, and knows the audio driver latency, and that's enough.
So, imagine one machine running one application on one soundcard with a 256 sample hardware buffer and another app on a different soundcard with a 2048 sample hardware buffer. The system times will be the same. If both apps compensate for audio driver latency, then they play together -- and because the driver latency figure is provided by the driver, the user doesn't have to configure it manually.
The genius of Link is that they got system times (which you can't assume to be the same on multiple machines) to line up closely enough for musical usage. Sounds impossible, but they have actually done it.
Put another way-- if you can figure out an automated way to tackle this problem for arbitrary Linux configurations/devices, please abstract out that solution into a library that will be the most useful addition to Linux audio in decades.
Ableton Link actually is that library.
https://github.com/Ableton/link/blob/master/include/ableton/Link.hpp#L5-L9
license:
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 2 of the License, or
(at your option) any later version.
Oops! Looks like something went wrong!