Artnet to OSC Commands

649 views
Skip to first unread message

Jeff Neubauer

unread,
Nov 22, 2016, 11:20:28 AM11/22/16
to open-lighting
I'd like to map Artnet to specific OSC commands to control an audio device.  Is this currently possible in OLA?  Can I use a script with olatrigger?

  

Stefan Krüger

unread,
Nov 22, 2016, 4:07:20 PM11/22/16
to open-lighting
Hi Jeff,

you can have a look at https://www.openlighting.org/ola/get-help/ola-faq/#What_OSC_formats_are_supported
so it is currently not possible to send custom commands.
for this you could write a python script that receives artnet with the help of ola and converts the values to a OSC message:
to receive dmx data from ola in python:
https://www.openlighting.org/ola/developer-documentation/python-api/#Receiving_DMX

and to send osc from python:
i found:
http://stackoverflow.com/questions/22135511/a-plethora-of-python-osc-modules-which-one-to-use
https://pypi.python.org/pypi/python-osc (python3)
https://pypi.python.org/pypi/pyOSC (python2)

i have put together a quick test:
https://github.com/s-light/OLA_OSC_converter
tested with TouchOSC on my phone - i could move the sliders in the OLA-WebUI and the slider on touchOSC moved accordingly..
hope that gets you started/helps..
was a fun excursion into the world of osc...

sunny greetings
stefan

Peter Newman

unread,
Nov 22, 2016, 4:33:34 PM11/22/16
to open-lighting
Hi Jeff,

While Stefan has done a good job, you can indeed use ola_trigger, just get it to run the oscsend program. It's up to you which way you go, if the messages you're sending are simple (play, stop, pause or similar) with ranges of channels triggering specific messages, I'd probably go with ola_trigger, as it will be easy to get a command working with oscsend, then drop it into the trigger config. If you're trying to do something a bit more complex with processing of channel data, you'll probably find a script like Stefan wrote easier.

If you're controlling an off the shelf bit of kit, it would be great to share what you've done, either an ola_trigger config or a script using an API.

Jeff Neubauer

unread,
Nov 22, 2016, 5:48:14 PM11/22/16
to open-lighting
Wow! you guys are amazing quick responses!  I'm a lot green when it comes to python so Im going to have to do some learning.  Basically I'm looking to control an Behringer XR18 via Artnet.  I'll have to do some more learning on the python script side to parse individual channel data and map it to each OSC command.  The challenge is that some commands will be "triggers" and some need to pass values.  This gets me moving in a direction.  My guess is I'll experiment both ways.

Stefan Krüger

unread,
Nov 23, 2016, 3:21:35 PM11/23/16
to open-lighting
Hi Jeff,

;-) if you have some example commands of each type you want to send to the Behringer thing i can extend the example for you - so you get a quicker start with this...
as Peter mentioned - if you need to have values converted&send to the device the ola_trigger will not work for this.

sunny greetings
stefan

Jeff Neubauer

unread,
Nov 24, 2016, 1:06:38 PM11/24/16
to open-lighting
Stefan - wow - 
I'm looking to basically map fader levels and mutes.  And load snapshots.  Here's the link to the OSC documentation for the xair.

Once I get a handle on that I may write other specific commands.  It looks like the format of the fader levels are "ch/01/mix/fader/ [0.0,1.0] fader(1024)"  , and the mute stream looks like "ch/01/mix/on/ [0,1]".  

My plan would be to map the fader 0-255 - and the mutes as 0 Unmuted - 1-254 -no change - 255 - muted.
Snapshots would be a single channel - 0-64

I'm a bit more familiar with dot net, python is a new deal for me.

Thanks!

Jeff

Stefan Krüger

unread,
Nov 27, 2016, 7:29:23 AM11/27/16
to open-lighting

Hi Jeff,

i have updated the example a bit- its untested..
additionally i have found some online references - http://behringerwiki.music-group.com/index.php?title=Channel_(/ch)_data
the example just sends the value and mute for the first fader. i think easiest way would be to test each functionality separate and then think about how to build this into a more complex script..
on thing to think about is how often do you want to send things.. i think it would be a good idea to have a local representation of the data and then check and only send the changes..
hope my example gets you a little bit started ;-)
for python - just have a look at https://docs.python.org/2.7/tutorial/index.html
i like this tutorial a lot and use it also as 'lookup' resource if i did not remember how something works ;-)

sunny greetings
stefan

Peter Newman

unread,
Nov 27, 2016, 5:16:40 PM11/27/16
to open-lighting
You could also do all of this with ola_trigger. Just use the bc command line calculator to convert the int to float. TBH you could even do it all with the OSC plugin if you used three universes.

I must admit I've been pondering about adding some scaling stuff into OLA trigger for situations like this and converting DMX to MIDI.

Peter Newman

unread,
Nov 27, 2016, 5:19:24 PM11/27/16
to open-lighting
You may want to use larger ranges for your mute commands to make using them easier, e.g. 0-100 and 150-255.

Jeff Neubauer

unread,
Nov 27, 2016, 7:07:02 PM11/27/16
to open-lighting
You guys are awesome.  My original idea was to convert artnet to midi. But then it was just going to be easier to be a little device that sat on the network as the interface. (Raspberry Pi)  Will ola trigger ever have a gui?


I plan to sit down and do some testing this week -  I'll let you guys know how I get along!

Peter Newman

unread,
Nov 27, 2016, 8:39:06 PM11/27/16
to open-lighting
What sort of GUI were you envisaging for ola_trigger? Something to configure it, or monitor it while it's running? I suspect most people would use their prefered text editor for config, and then the validate option. There's not really much config to do anyway, just three fields per line. I'd say the log is probably sufficient for monitoring while it's running.

Feel free to log an issue/feature request against OLA on GitHub so it's on the list.
Reply all
Reply to author
Forward
0 new messages