projectm icon indicating copy to clipboard operation
projectm copied to clipboard

[FEATURE] Ableton Link integration

Open Be-ing opened this issue 4 years ago • 5 comments

Ableton Link is a network protocol for communicating musical timing information. It would be great to bypass projectM's built in beat analysis DSP with Ableton Link to facilitate integration with other audio and video applications. Note that the Link library is licensed GPLv2+.

Be-ing avatar Feb 06 '21 18:02 Be-ing

Yeah that'd be awesome

revmischa avatar Feb 06 '21 18:02 revmischa

The "quantum" in the Link protocol could be used to trigger preset changes on musical phrase boundaries instead of an arbitrary number of seconds.

Be-ing avatar Feb 06 '21 19:02 Be-ing

I'm not terribly sure but some of that could maybe be done by modifying https://github.com/projectM-visualizer/projectm/blob/master/src/libprojectM/projectM.cpp#L309 Edit: no that's not it...

revmischa avatar Feb 06 '21 21:02 revmischa

I think this is where the values get fed into the current preset for evaluation, if you read in the beat signal from Link you could synchronize time/fps I think https://github.com/projectM-visualizer/projectm/blob/d85d41b69c1c4c258baaeb587f4d8c72c33bff25/src/libprojectM/MilkdropPresetFactory/PresetFrameIO.cpp#L30

And I believe here for the shaders: https://github.com/projectM-visualizer/projectm/blob/master/src/libprojectM/Renderer/ShaderEngine.cpp#L444

revmischa avatar Feb 06 '21 21:02 revmischa

Due to license restrictions, we cannot use any headers from the Ableton Link API in libprojectM unless we also change the license from LGPL to GPL.

What is possible though is an API function/callback mechanism that would allow applications to feed the required data into libprojectM, overriding the internal beat detection. As long as the embedding application is GPL-licensed (I put the projectMSDL rewrite under GPL, so that's a given), it could use the Ableton Link library to tretrieve the beat data and then feed it into libprojectM. Same goes for closed-source applications if someone has a commercial Ableton Link license.

kblaschke avatar Apr 07 '22 11:04 kblaschke