benkuper / Chataigne

Artist-friendly Modular Machine for Art and Technology
https://benjamin.kuperberg.fr/chataigne
GNU General Public License v3.0
1.21k stars 58 forks source link

better integration with beat-link-trigger #133

Open dangowrt opened 2 years ago

dangowrt commented 2 years ago

When trying to create dynamic shows driven (also) by Pioneer DJ gear beat-link-trigger can do an extremely good job. Using it's MIDI clock output, however, eats a lot of CPU and is not as precise as it could be.

When discussing this with @Deep-Symmetry we conlcuded that this situation could be improved by having a dedicated module using the beat-link library in Chataigne.

On Windows or Mac the situation can also be improved in some way by using Abelton Live to provide synchronization between Chataigne and beat-link-trigger. On Linux users are currently down to use the (not very precise) MIDI clock and having to manually map a lot of MIDI commands to be sent on beat events to Chataigne via MIDI (which is what I'm doing now). As beat-link allows to have all sorts of APIs added, it would be great not having to go this detour.

benkuper commented 2 years ago

Interesting project, thank you for sharing. It also seems very specific to few usages in the whole Chataigne community and I'm not sure about adding a native module for this, as I try to only develop native modules when there is no possibility to create a custom/community module, or when the usage is so common or the performance gain is so obvious that it makes sense to integrate it directly in C++.

Another issue is that the beatlink library is in Java and would require a whole porting to C++. I looked a bit and it's not trivial work to get to the same level, it would take a fair amount of time !!

However, it seems to be all network communication (UDP or TCP, didn't look to deep), so it would be definitely possible to create a custom module I think. At least starting small with few relevant feature integrations and then improving it could make sense.

I suggest your propose that on the Discord server, which is where the most activity is happening ;)

dangowrt commented 2 years ago

I'd wish to join the Discord channel but am unable to do so due to their phone number verification requirement :cry: ...

key2 commented 6 months ago

In fact, the reimplementation is daoble in C/C++ quite easily. Getting the timestamp from threre is therefore very likely possible. So it is possible to do something that looks a bit like ShowKontrol where events are triggered based on the timestamp coming from the CDJ. Nevertheless, it's often that we have 4 or even 6 CDJ3000 on a setup and we have essential informations such as the view of all the CDJs as well as each of their waveform image

What would be the right way to implement that with Chataigne?