Hello,
I've been working on this for a couple years now... I'm very close!
Hardware: Raspberry pi 3B
OS: Bullseye, pd .51
Peripheral hardware:
- Behringer X32 audio board. Physical and network MIDI out, can do OSC over MIDI sysex (osc documentation link)
- Colorsource AV board, can be controled via OSC
Here's my patch
Goal: When any of channels 1-4 are unmuted on the X32 audio board, a DMX light turns on (has 'on-air' stencil and a red gel attached to the front). When all 4 channels are muted, the light turns off.
The problem: This works- the issue is that sometimes pd or the X32 will mess up and a MIDI message is missed, so one of the 4 mute toggles (in pd) will be the opposite of what the actual mute status is of that channel.
My idea to fix: "Ask" what the mute status is of each channel every 10 messages or so.
Overview: I found the MIDI that the Behringer X32 spits out when muting channels, then used 'sel' to start, bondo sums and when the total gets to 4, an OSC message is sent to the lighting board to turn on the ON-air light. When it dips below 4, a message is sent via OSC to turn the light off.
I can't seem to get return values from the X32. With the X32 livetoolkit software I know that sending [/ch/02/mix/on] will return [/ch/02/mix/on ,i 1]. The send command doesn't need a value type (float, int, etc.), but the return value contains an int, which is either 1 or 0, which represents the mute as on or off. I can't get any return values from the board. I'm trying UDP with netsend -u -b 10.136.124.112 10023.
Also- I'm getting MIDI to the pi with the... UM-ONE midi to USB dongle. I forget the manufacturer but I think it's pretty common with Pi's and Pd.
If someone has a better idea that to achieve what I'm trying, I'm good with that too!
Any help would be appreciated! It feels so close and this will be my first 'new' thing I've made.