flesniak / python-prodj-link

A python interface to Pioneer ProDJ Link
Apache License 2.0
134 stars 26 forks source link

how to set player as 'on_air' #30

Open gb160 opened 7 months ago

gb160 commented 7 months ago

Hi , great project btw. Im using a modified monitor-curses.py and wondering if it's possible to set the players 'on_air' status. Im monitoring my mixer 'DJM-450' with receivemidi in my modified script so I can easily tell if a player has its fader up or not (DJM-450 has no ProDJ Link).

My understanding is the XDJ 1000 will show some sort of on-air status on the display if the 'on_air' status is set.

brunchboy commented 6 months ago

I implemented just such a feature as an integration example for a Beat Link Trigger user for the Xone:96 mixer. You can see how to do that with Beat Link Trigger here and you would just need to adjust the MIDI values to match the DJM-450.

gb160 commented 6 months ago

I implemented just such a feature as an integration example for a Beat Link Trigger user for the Xone:96 mixer. You can see how to do that with Beat Link Trigger here and you would just need to adjust the MIDI values to match the DJM-450.

Hi mate, thanks for this. I've only just discovered Beat Link Trigger and it looks very interesting. I'll be having a good look over what it can do.

If I have any questions, (and there will be questions ;) ) I'll pester you over there!

Thanks again.

gb160 commented 6 months ago

@brunchboy Well I have it working with my DJM-450, I just needed to set the mixer name, set the 450 to use midi channel 16, and for some reason the 450 uses values 17 and 18 for faders 1 and 2....so I changed those values and everything worked as expected.

Although BLT seems a great project I can't help but feel its overkill for what I need.

Im really happy with my modified script and the on air status was just a little idea that I'd like to implement in my current script with python-prodj-link if possible.

Thanks again though, at least I know its definitely achievable.

flesniak commented 6 months ago

If you want to stick with python-prodj-link, I would start with modifying vcdj.py. Add support for sending BeatPackets with "type_mixer" and your channel on air information, similar to fader start: https://github.com/flesniak/python-prodj-link/blob/16d7065398ce82963dac59c60a14b6d146bb7a8b/prodj/core/vcdj.py#L109 It's definitely useful to peek at James' code, I have not tried to send mixer beat packets yet. Could be missing something. If you got it working, feel free to send a pull request. I have very limited time lately, but will do my best to look into it.

brunchboy commented 6 months ago

It makes sense indeed to work in the environment that most suits your needs, which is why I created my detailed, platform-neutral documentation of the network packets and file formats. Note that channels-on-air is not a beat packet, it is its own kind of packet. I document it here: https://djl-analysis.deepsymmetry.org/djl-analysis/mixer_integration.html#channels-on-air

brunchboy commented 6 months ago

Beat packets are one of seven different kinds of packets that get broadcast on port 50001. The full list is here: https://djl-analysis.deepsymmetry.org/djl-analysis/packets.html#_port_50001_packets

gb160 commented 6 months ago

@brunchboy This is excellent info mate. Although implementing it here might be 'above my pay grade' I'll be taking a good look when I get some time and seeing if I can get anywhere. Thanks.