Control Behringer x32 with JustMacros

27 posts / 0 new
Last post
Offline

Location

Sydney,
Australia
Joined: 24/06/2014
Posts: 12
Control Behringer x32 with JustMacros

Hello,

Behringer has a very nice range of digital audio mixers (x32). This is great for us because there are so many outputs for various purposes like IFB etc and so many mix buses.

One of the main problems with doing Outside Broadcasts is lugging around so much equipment and connecting and disconnecting all the cables.

We wanted to purchase the X32 rack (http://www.behringer.com/EN/Products/X32-RACK.aspx) so that it can be mounted in a single case with the ATEM and rack mount PC's. This means everything is connected together ready to go inside a single rack case.

You can control the X32 with midi surface controllers, in this video (

See video

) the guy has his BCF2000 connected to his PC via the X32 software to control the mixer.

My Question Is:
If the X32 software can talk to the BCF2000 and the BCF2000 can "Learn" commands from the software, can JustMacros talk directly to the X32 software instead and control the levels? (eg. When a video is played, mute the microphones).

Thanks.

Offline

Location

Beverly Hills,
United States
Joined: 31/01/2013
Posts: 26
OSC

The X32 line supports OSC (and uses it for it's own software interfaces) and IIRC it's documented in the manual.

Offline

Location

Sydney,
Australia
Joined: 24/06/2014
Posts: 12
wow thanks! i'm reading about

wow thanks! i'm reading about it now!

http://www.behringer.com/assets/X32_OSC_Remote_Protocol.pdf

rcourtney's picture
Offline

Location

Eastern Iowa,
United States
Joined: 07/12/2011
Posts: 301
X32 OSC

I wish that the published manual was correct and complete.  

Some points I have found in writing code (outside of JM) for the X32:

Perform a polling loop to get individual slider position, mute state, or meter instead of subscribing as it sends a huge blob of data.
/batchsubscribe  if you must see meters

blobs MUST be 32 bytes.

Offline

Location

Beverly Hills,
United States
Joined: 31/01/2013
Posts: 26
OSC

Here is informaiton on some undocumented OSC: https://github.com/tjoracoder/python-x32

Offline

Location

Sydney,
Australia
Joined: 24/06/2014
Posts: 12
Thanks very much! I

Thanks very much! I personally just need to fade up and down microphones connected to the X32 when playing packages (while switching the ATEM and playing CasparCG).. so I won't need to read any data from the mixer.

But other people will definitely find this handy!

rcourtney's picture
Offline

Location

Eastern Iowa,
United States
Joined: 07/12/2011
Posts: 301
once
mashynewie wrote:

Thanks very much! I personally just need to fade up and down microphones connected to the X32 when playing packages (while switching the ATEM and playing CasparCG).. so I won't need to read any data from the mixer.

But other people will definitely find this handy!

You might want to do it once to verify your controls are set correctly and that you are connected.
Obtain the name /ch/01/config/name,
perhaps color of the button  /ch/01/config/color.

Setting slider position is a value from
/ch/01/mix/fader  0-1023
but reading current position is returned as float.

Setting mix mute
/ch/01/mix/on     ON or OFF

JohnBengston's picture
Offline

Location

London
United Kingdom
Joined: 14/01/2012
Posts: 2145
I'm very aware of the X32

I'm very aware of the X32 range of audio mixers and the capabilities, and hope to be able to help users on this thread and using the X32 with JustMacros quite soon.

Offline

Location

Stockholm
Sweden
Joined: 19/06/2013
Posts: 27
John, any news on this? We

John, any news on this?
We are currently trying to integrate our x32 mixers into out Justmacros workflow, but don't really know where to start. I guess we need to get Justmacros to listen and talk OSC with the x32. Once that is up and running I guess it's just a matter of sending the right commands?
Thanks for any help to get us in the right direction!
/Johan

Offline

Location

Sydney,
Australia
Joined: 24/06/2014
Posts: 12
I'm not sure about

I'm not sure about JustMacros, John can answer that..

But the new version of CasparCG can now successfully send OSC commands to the Behringer X32.

We program our entire show rundown in the CasparCG client which controls the ATEM, X32 and CasparCG Playout all from the one GUI.

 

JohnBengston's picture
Offline

Location

London
United Kingdom
Joined: 14/01/2012
Posts: 2145
Use latest patchTake a look

Use latest patch

Take a look at:

http://www.justmacros.tv/downloads/scripts/STANDARD_PKGS_X32.zip

incomplete, but capable of controlling and reading every setting.

Could be made easier, and is "on the list"........ you'll need to dig around in the code and find the bits you need, but I've used this as the basis on a bespoke control system for an X32 tied in with an ATEM.

rcourtney's picture
Offline

Location

Eastern Iowa,
United States
Joined: 07/12/2011
Posts: 301
JM should be able to do it

The control is not that hard.   Forget about the meters.  X32 sends alot of data (blobs) every 50ms. 
Check the X32 forum and obtain the pdf document.

Once you get started, let us know if there are any details you need clarified.

Offline

Location

Stockholm
Sweden
Joined: 19/06/2013
Posts: 27
Thanks alot! We are now able

Thanks alot! We are now able to control the X32 faders from JM. :)
What would be the easiest way for JM to read the current fader value of a X32 fader? We are trying to build a simple Audio follow video setup, but only want to perform a fade out on the sources which faders are actually up.
 
/Johan
 

JohnBengston's picture
Offline

Location

London
United Kingdom
Joined: 14/01/2012
Posts: 2145
So the

So the OSC_BX32_Scan_For_Incoming_Packets will do most of the work for you.

In OSC_BX32_GLOABLS I construct a Lua Array which holds the OSC path for every value, and the intention was to mark values that needed polling.

I also experimented, but only a little with the XCONTROL flag you can set, and in that case the X32 sends all property changes to the client (probably what we should be used) but as I recall this didn't work the way I expected it to, or I had some issues so settled on polling for the job I was working on.

I tend to use EnviroQueues to store this type of stuff, and hence it can get complicated.

Let me have another look at this, and get back to you tomorrow.

Offline

Location

St. Louis,
United States
Joined: 17/04/2014
Posts: 58
Has anyone figurred out how

Has anyone figurred out how to write a simple script to lower and raise volumes on the X32? In a perfect world I'd love to have a script that would change the volume of something in the ATEM audio control area as well as the X32 at the same time, but I have no idea how to go about that...any suggestions?

JohnBengston's picture
Offline

Location

London
United Kingdom
Joined: 14/01/2012
Posts: 2145
Yeap,

Yeap, download:

http://www.justmacros.tv/downloads/Scripts/STANDARD_PKGS_X32.zip

Copy the contents of the ZIP file into your macros directory somewhere, and restart JM.

Edit the file "OSC_BX32_GLOBALS" from the "!Uses" folder and change line 1 from the IP address of my X32 to the IP Address of yours.

Navigate to the Connection folder, and run the script "OSC_BX32_ConnectToX32".

Now go back to "!Uses" and then into Tests, and click on the script "Untitiled00127" - not a great name - and run it. It' wil now move Fader1 from 0 to 100% over a couple of seconds. If you've got a X32 with physical faders you'll see it move. when you get past (or delete) all the commented out lines (not the first $$USES) line, you'll see controlling an X32 is mega simple with the "RawCommsNetSendOSCMessage".

If you need further help; provide more specific details of what you need, as I am about to embark on a big period of releases & examples.

 

 

Offline

Location

St. Louis,
United States
Joined: 17/04/2014
Posts: 58
That sounds like something I

That sounds like something I can do with your directions, I won't be able to try and set it up till after the Olympics though when I start using that equipment again. Which sounds like you might have some other things to try out by then too! Anyways, thanks as always for the info and quick reply, appreciate it John :)

JohnBengston's picture
Offline

Location

London
United Kingdom
Joined: 14/01/2012
Posts: 2145
Yeah just give me a shout

Yeah just give me a shout when you are ready, there will certainly have been X32 support improvements by the time the Olympics is over.

Offline

Location

Adelaide,
Australia
Joined: 06/09/2012
Posts: 65
Just wanted to mention I did

Just wanted to mention I did some playing with the OSC protocol last night with a Behringer X AIR-12, apart from needing to change the port it connects too to 10024 instead of 10023 it worked just fine.

I was able to use the untitled script, as well as mute channels (my ultimate goal). 

 

Kingsley

I have my own TV Show, Player Attack. I also film live music, its fun!!!

JohnBengston's picture
Offline

Location

London
United Kingdom
Joined: 14/01/2012
Posts: 2145
Any OSC should work
Punkley wrote:

Just wanted to mention I did some playing with the OSC protocol last night with a Behringer X AIR-12, apart from needing to change the port it connects too to 10024 instead of 10023 it worked just fine.

I was able to use the untitled script, as well as mute channels (my ultimate goal). 

Kingsley

Nice one, I didn't even know that 12 input mixer from Behringer existed, at £220 when compared to £1000 for the X32 rack mount which is the version most useful IMHO for small mobile rigs, obviously for a music-ey event, you'd want a real control surface, but I guess (or know from limited small-budget experience), this XR12 is a nice option for many small events where an X32 would be overkill.

How "into the OSC sample scripts" are you getting?

Can you post or PM me a list of all the OSC messages from this device?

You should be able to extract every property from the device using the scripts I wrote, although I think you'd likely have to "tweak a bit". If you are up for spending a little time working on this, please let me know.

Offline

Location

Adelaide,
Australia
Joined: 06/09/2012
Posts: 65
I haven't had a huge amount

I haven't had a huge amount of time, I have a gig with it in 2 weeks so really i just needed to know if mute worked (which it did) as well as auto slider test function worked.

 

Let me know what info you want out of it and I will get it. (or I can just work out how to give you access to it).

 

There is actually a 12 16 and 18 channel one

 

Kingsley

I have my own TV Show, Player Attack. I also film live music, its fun!!!

JohnBengston's picture
Offline

Location

London
United Kingdom
Joined: 14/01/2012
Posts: 2145
Nice one!! I'll update this

Nice one!! I'll update this topic with a link to a script that if you could run for me, that would be very useful.

For UK readers amazon links.

12 Input Version - £220

https://www.amazon.co.uk/Behringer-AIR-XR12-Digital-Mixer/dp/B00Z0IBBAU

16 Input Version - £408

https://www.amazon.co.uk/Behringer-AIR-XR16-Digital-Mixer/dp/B010BZ2G00

18 Input Version - £586

https://www.amazon.co.uk/Behringer-XR18-X-Air-Mixer/dp/B00UD3IWB8

The 18 Input version is extra interesting as it has the UltraNet personal monitoring features that the 12/16 don't. They really are covering all the price points.

 

 

Offline

Location

Thunder Bay,
Canada
Joined: 19/10/2016
Posts: 9
XR-18 OSC - example

Just Macro Fans,

I am in the learning phase, I have been reading and attempting to test for the past several days.  My overall plan is to use my Just Macros Pro licence to control the following items -- 1 atem 4k production, 2 caspar cg servers, 2 hyperdecks, 1 xr-18 mixer. and ideally a tricaster 850 - but I do not believe its supported in JM's.  The controlling surfaces will include - xkeys 80, behringer cmd dv-1, beringer cmd dc-1 and behringer x-touch compact.... the exact layout of what will control what is to be determined. 

I am currently trying to setup the following in xkeys to control the XR-18 for learning and testing reasons.

1. have xkeys buttons 80 mute channel 01 -- red light on when muted - no light on when not

2. have xkeys button 78 lower volume channel 01 -- .01 per key press -- blue light flashes per key press -- when min volume reached red stays on

3. have xkeys button 76 raise volume channel 01 -- .01 per key press - blue light flashes per key press -- when max volume reached blue stays on

4. have xkeys button 74 switch to bus 3 - red light on when on bus 3 - off when not on bus 3

5. have xkeys button 73 switch to main LR - red light on when on main LR - off when not on main LR

 

Here is where I am at so far --

1. xkeys identifier 111 - profile0001

2. STANDARD_X32 sample pack in macros directory, ip address changed, OSC port changed to 10024 -- untited00127 test to control fader -- worked.

3. I understand how to assign a xkeys button to run "untitled00127.  Assuming I would want "standard button" over macro due to macros automatic led behaviour.

4.  I have added -- $$USES "XKeysTools" -- to the top of my test script

5.  I have been able to activate the xkeys blue and red LED's via XKeysSetButtonBlueLEDState( PANEL_111, 79, "TRUE" );

6. I understand the fader control  lvMessage = "/ch/01/mix/fader"; can be changed by the RawCommsNetSendOSCMessage( lvHandle, lvMessage, .75); to 75% -- knowing that for lowering and raising volumn I would need a variable.

7. I dont understand how to assign a variable to an xkeys button --- for example ch1volume = ch1volume - .01

8. If the ch 1 volume is changed else where -- ie x-air app -- will the xkeys leds light up when min and max happen?  is there two way communication?

 

I am posting my script -- but it doesnt really do anything yet because I really dont know where to go next....

-- $$USES "OSC_BX32_GLOBALS"
-- $$USES "XKeysTools"

lvHandle = EnviroRead( "OSC_BX32_UDP_ConnectionHandle_" .. BX32_IP_ADDRESS );

PANEL_111 = XKeysPanelIDToIndex( 111 )

-- RawCommsNetSendPacket( [params] )
--RawCommsNetSendString( lvHandle, lvMessage );
--RawCommsNetSendPacket( lvHandle, 0 );
                                                                     
-- VSLog(string.byte("/"));                           
-- VSLog(string.byte("i"));
-- VSLog(string.byte("n"));
-- VSLog(string.byte("f"));
-- VSLog(string.byte("o"));
-- VSLog(string.byte("T"));

-- lvMessage = "/xcontrol";
-- lvMessage = "/info";
-- lvMessage = "/meters, si /meters/6 16";                   
-- lvMessage = "/ch/02/config/name";
lvMessage = "/ch/01/mix/fader";
-- lvMessage = "/ch/02/delay/on";
-- lvMessage = "/config/solo/source";
-- lvMessage = "/config/chlink/1-2";

-- VSLog("Sent to " .. lvHandle .. " Message: " .. lvMessage );
--RawCommsNetSendOSCMessage( lvHandle, lvMessage, 'si', '"meters/6"', 16 );
-- RawCommsNetSendOSCMessage( lvHandle, lvMessage );
--RawCommsNetSendOSCMessage( lvHandle, lvMessage, 0 );

for i = 1, 5 do

   RawCommsNetSendOSCMessage( lvHandle, lvMessage, ch1volume);
    Sleep(400);

end;
-- RawCommsNetSendPacket( lvHandle, 47,105,110,102,111,0,0,0 )

   -- XKeysSetButtonBlueLEDState( PANEL_111, 79, "TRUE" );
   -- XKeysSetButtonRedLEDState( PANEL_111, 60, "FALSE" );

   -- Sleep(400);
   -- XKeysSetButtonBlueLEDState( PANEL_111, 79, "FALSE" );
    -- XKeysSetButtonRedLEDState( PANEL_111, 60, "TRUE" );
   -- Sleep(400);
 

 

Any help is appreaciated.... I have a long road of learning ahead of me.

Thanks
Jon

 

 

 

Offline

Location

Thunder Bay,
Canada
Joined: 19/10/2016
Posts: 9
Returning faders current position - xr-18
rcourtney wrote:
mashynewie wrote:

Thanks very much! I personally just need to fade up and down microphones connected to the X32 when playing packages (while switching the ATEM and playing CasparCG).. so I won't need to read any data from the mixer.

But other people will definitely find this handy!

You might want to do it once to verify your controls are set correctly and that you are connected.
Obtain the name /ch/01/config/name,
perhaps color of the button  /ch/01/config/color.

Setting slider position is a value from
/ch/01/mix/fader  0-1023
but reading current position is returned as float.

Setting mix mute
/ch/01/mix/on     ON or OFF

 

Good day,

I am trying to figure out how to get channel 1's faders current position and return it as a float... as per the above quote.

Any help would be appreaciated. 
Thanks

Jon

JohnBengston's picture
Offline

Location

London
United Kingdom
Joined: 14/01/2012
Posts: 2145
If you are using my example

If you are using my example you simply issue an OSC message request:

The reply gets handled by the Monitoring script, but you'll find a nice place to hang some code, in the "OSC_BX32_MonitoringHelpers" script.

Towards the botton of that script you'll see a VSLog line that begins "Address:" then puts out the address which is going to be the same as message, and in our example that is "/ch/01/mix/fader" and the value.

 

 

Offline

Location

Thunder Bay,
Canada
Joined: 19/10/2016
Posts: 9
OSC reply - how to store the value?

John,

Thanks for the information in your last post.  I now understand how to get the script to reply the "

Address:/ch/01/mix/fader == 0.99022483825684 " -- how do I go about storing that value? 

My goal is to assign an xkeys volume up and a volume down button.  Increasing or decreasing the volume by xx.  When either 0 or 1 are reached the appropriate xkeys would stay lit. 

To recap

1) I run the "OSC_BX32_ConnectToX32 script

2) I have modified the "untitled00127:"  I can successfully send

lvMessage = "/ch/01/mix/fader";

RawCommsNetSendOSCMessage( lvHandle, lvMessage, .99);

to get the fader to move to the .99 location. 

3)do I have to excute the "OSC_BX32_Scan_For_Incoming_Packets" ??

4) do I have to excute the "OSC_BX32_MonitoringHelpers"? 

 

Thanks

Jon
 

Offline

Location

Moncton
Canada
Joined: 10/04/2017
Posts: 1
I'm also looking for the same

I'm also looking for the same information as the last poster.  Is anyone able to answer the above questions?

Thanks.

Joel