lxconsole osc-out to puredata pjlink-bridge

LXConsole support and feedback
Post Reply
zimtzeke
Posts: 2
Joined: Sat Jun 22, 2019 12:36 am

lxconsole osc-out to puredata pjlink-bridge

Post by zimtzeke »

dear claudeheintzdesign,

thanks for your great piece of software. i'll soon get a piece on stage that uses your software for lights (in combination with qlab for video). they want to control the shutter of our projector with dmx out of lxconsole.

i already programmed a solution reading from dmx to puredata mapping it to pjlink. it works. but the better way would be to directly read the osc commands that lxconsole can send out when 'send all channels when changed' is enabled to receive the corresponding channel for the shutter of the projector (let's say dmx channel 99).

in puredata my osc parser shows me the following message from lxconsole

ch99 is FL
/lxchannels/ 0 0 0 99 0 0 0 0 66 200 0 0

ch99 is 0 (after fading from FL to 0)
/lxchannels/ 0 0 0 99 0 0 0 0 62 200 200 201

now my question is:

0 0 0 99 is ch 99 :: 0 0 0 0 :: is just some placeholder :: 64/62 X X X is ?

how do you calculate the last 4 numbers in the osc message (from float to 4byte construct...?) where 64 200 0 0 is 100% and 62 200 200 201 is 0% ?

if you could provide me the formular from this 4byte construct to float or int i'd be happy.

thanks!

yours,
m
admin
Site Admin
Posts: 1643
Joined: Mon Nov 05, 2007 1:26 am
Contact:

Post by admin »

Send all channels when changed causes a message with an "/lxchannels/" address and a binary blob as the only parameter to be sent whenever channel levels change. These /lxchannels/ messages can be received by LXBeams. The /lxchannels/ message has a parameter consisting of a 12 bytes for each non-zero channel. If more than 290 channels have levels, multiple /lxchannels/ messages are sent to avoid size limits on the packet buffer. The 12 bytes representing each channel/level consist of a 4 byte integer for the channel, a 4 byte integer for the sub-channel, and 4 byte float for the level. When more than one /lxchannels/ message is sent, all but the last message will have 12 bytes of zeroes at the end of the parameter indicating more messages representing the current state are coming.

------------------------------

You might be better off simply adding a cue action that sends the OSC message of your choice when the cue is executed. Here's how to do that:

1) Open View->Setup.. and choose the OSC Out tab from the list on the left side.

2) Add a destination with a name that makes sense and the IP address and port of where you want to send your message.

3) Navigate to the cue that you want to use to send the message in "Cues" display mode.
(enter [q] [n] [return] on the command line, where n is the cue number.)

4) In the Cue Options tab of the Inspector, click the "+" button under Actions to add an action.

5) Use the popup in the "Action" column to select "OSC" as the action type.

6) In the parameter column, enter one of the following:

Code: Select all

destination~/addressPattern
destination~/addressPattern float
Where "destination" is what you defined in the setup window in step 2.

You can also send to the address/port defined in the OSC Out tab of the preferences:

Code: Select all

/addressPattern
/addressPattern float
Or, you can specify the address/port directly in the parameters field:

Code: Select all

IP:port~/addressPattern
IP:port~/addressPattern float
The advantage to naming the destination using the table in the setup window is that should the address change, you do not have to edit all the cues that reference it.

------------------------------

If you want the convenience of using a channel instead of an action, it may be better to use the "Send channel changes defined in actions" option instead of "Send all channels when changed". As noted above, all channels messages are blobs that you will need to sort through to find the channel you are interested in monitoring. If you add an action to the Setup window's OSC actions table for the channel you are interested in monitoring you can send a message for only that channel. Your OSC address pattern goes in the "address" column and "n@%p" goes in the Action Command column. LXConsole will send OSC messages to the destination defined in the preferences with your address pattern and a float argument representing the channel level (0.0-1.0). You can also set the action to be "n@%i" to get an integer for the dmx level. But, I think you need the latest build in order to have the %i option as it was added relatively recently (@%f gives a float 0.0-100.0).
zimtzeke
Posts: 2
Joined: Sat Jun 22, 2019 12:36 am

lxconsole osc-out to puredata pjlink-bridge

Post by zimtzeke »

hi claudeheintzdesign,

thanks for the answer.

very good idea to add an extra osc output when cuing. i'll try that out.

you're right, i don't need to filter the osc when doing as you proposed.

i guess i must have a closer look in/onto your software soon. seems to be
capable of quite a lot of things. i only got to know it through our guest
performance as i had to program a mapper from lxconsole to pjlink to control the shutter of our projector. works...

tx again!
m
Post Reply