Deep-Symmetry / dysentery

Exploring ways to participate in a Pioneer Pro DJ Link network
Eclipse Public License 1.0
198 stars 24 forks source link

Link? #3

Closed maaraneasi closed 8 years ago

maaraneasi commented 8 years ago

Hi, Any chance to implement the Ableton Link when the SDK is already opensourced for the desktop apps?

thanks!

brunchboy commented 8 years ago

Hi! I have been looking at their open-source code for a little while, and could not discuss it until now. It is interesting, but there are two fundamental problems. First, they do not have an implementation for the Java VM, so people would have to implement and build JNI versions for every platform and architecture they wanted to use it with Java on (and I certainly don’t have the time or hardware and development resources to do that). But even more importantly, the GPL license under which Ableton have released it Link is incompatible with the Eclipse Public License under which my projects are released (because the Clojure language and runtime that I use is released under the EPL), so everyone who wanted to use it in a project with my libraries would need to get a special license directly from Ableton. They are certainly willing to do that, but it means their code cannot be linked with my code without their permission.

So what I will probably do is build a separate program that acts as a bridge between Ableton Link and Beat-Link, communicating over loopback sockets, running as a separate process so the license incompatibility is not an issue. I would only be able to develop and test a Mac OS X version of that program, but others would be welcome to contribute versions for other platforms.

brunchboy commented 8 years ago

Progress with bridging to Link is going well! I have a bridge daemon project called Carabiner that is basically working, and am creating functions to talk to it from beat-link-trigger. Tonight I got the basic proof-of-concept working, syncing BPM and beats from CDJs to Link. Now I need to add support for optionally syncing bars, and build a user interface for it (I was using manual code tricks for the proof of concept).

Then I will just need to release Carabiner and new versions beat-link and beat-link-trigger, and people will be able to synchronize a Link session to CDJs. (I made a small change in the beat-link library so that the timestamp values it attaches to packets from the Pioneer gear use the same time base as Link does, which makes it much easier to align the Link timeline to beat packets from CDJs.)

ErikMinekus commented 8 years ago

Great work! So when a Link app changes the BPM, does Carabiner/beat-link-trigger report itself as sync master and send out the new BPM to the CDJs? Just curious if one of the CDJs can still be master, or if the computer will always be master for the CDJs.

brunchboy commented 8 years ago

Nobody has yet found a way to act as master on a Pioneer Pro DJ Link network. If you have time and the ability to figure that out, it would be an excellent contribution. But even then, to really benefit from the great Link protocol that Ableton has shared with the world, Pioneer needs to build it in to the CDJs, other controllers, and mixer directly. For example, they need to be able to perform a quantized start with countdown in order to be polite participants on a shared Link session, and they have no such concept at the moment. If they ever implement Link support directly (and I hope they do), the concept of “master” will go away when in that mode; Link is a more polite, consensus-driven protocol by nature. We can’t support that until Pioneer does.

So for now, only a CDJ or the mixer can be the master, and if another Link app tries to change the BPM, beat-link-trigger immediately changes it back to the BPM of the DJ Link network. Of course, that will only happen when there is an active trigger configured to send to Link, and there will be a UI to completely disengage from the Link network when necessary.

brunchboy commented 8 years ago

I just released the first version of Carabiner, and the update to beat-link that is compatible with it. I have the UI working in beat-link-trigger for connecting to Carabiner, and for triggers that synchronize with Link. The final step is to document and release all that, and everyone will be able to start using this feature.

brunchboy commented 8 years ago

If you want to experiment before the beat-link-trigger 0.1.4 release, I have added a snapshot jar and some usage notes to the releases page.

ErikMinekus commented 8 years ago

Thanks, quickly tested with 2 XDJ-1000s and Traktor, seems to work well. Would be nice if the release just bundles Carabiner and runs it in the background automatically if it's configured in the UI.

brunchboy commented 8 years ago

That’s great, thanks for letting me know!

I don’t think I am going to bundle Carabiner because I can’t build it for all the platforms that Beat Link Trigger works on, only for the Mac. These projects are aimed at pretty nerdy people; if someone wants to build a more hand-holding end-user product starting from what I have released, of course, they are quite welcome to. 😀

Oh, actually, I simply can’t bundle Carabiner anyway, because the license under which Ableton released Link, the GPL, is aggressive and incompatible with the Eclipse Public License under which Clojure (and therefore beat-link-trigger) is released. So Carabiner is released under GPL, and it will have to be installed and run separately because of that.

brunchboy commented 8 years ago

All right, the user guide has been updated to add information on working with Link, and there is a preview release out for people to continue trying for a while. I expect to turn it into an official release soon, so I am closing this issue.