Page 1 of 1

OSC replace_file & Color_RGBA

Posted: Wed Sep 13, 2023 7:17 am
by BEProdAus
Hey I was just wondering if anyone had more information on how to use /medias/[media file name]/replace_file as sending a string with the new file destination ie "D:\content\newfile.mp4" has no effect regardless of backslash direction.

The same for changing a material or surface's colour using /color/rgba. Sending hex codes does not work, nor does 4 ints with RGBA values. What is the specific OSC message that needs to be sent to control these functions?

Re: OSC replace_file & Color_RGBA

Posted: Wed Sep 13, 2023 10:42 pm
by mad-matt
Hey I was just wondering if anyone had more information on how to use /medias/[media file name]/replace_file as sending a string with the new file destination ie "D:\content\newfile.mp4" has no effect regardless of backslash direction.
Just tried from python using python-osc (pip install python-osc)
Python code:

Code: Select all

from pythonosc import udp_client client = udp_client.SimpleUDPClient("127.0.0.1", 8010) client.send_message("/medias/video-h265.mkv/replace_file", "/Users/matt/Projects/MadMapper/Content/Codecs/H265/TearsOfSteel_720p_h265.mkv")
It worked fine.

For the RGBA, it's using the "r" type of OSC. It works fine from Vezér. The packet content is:

Code: Select all

0000 02 00 00 00 45 00 00 40 fe 30 00 00 40 11 00 00 ....E..@.0..@... 0010 7f 00 00 01 7f 00 00 01 d6 e5 23 28 00 2c fe 3f ..........#(.,.? 0020 2f 73 75 72 66 61 63 65 73 2f 51 75 61 64 2d 31 /surfaces/Quad-1 0030 2f 63 6f 6c 6f 72 2f 72 67 62 61 00 2c 72 00 00 /color/rgba.,r.. 0040 fd 2d 42 ff .-B.
I think I could send rgba color from QLab too. I don't know the python lib that much, but any software that handles color type would be compatible.

Re: OSC replace_file & Color_RGBA

Posted: Fri Sep 15, 2023 8:41 am
by BEProdAus
Thanks Matt,

Turns out the software I was using does not support the 'r' type OSC messages, ended up having to just send a UDP command as an OSC command as "/color/rgba (null) r, (null) (null) fd 2d 42 ff".

Looks like for the most part 'i', 'f', 's' and 'b' type tags are all supported but the rarer 'h', 'd', 't', 'c', 'r', 'm' type tags are less supported.

Re: OSC replace_file & Color_RGBA

Posted: Fri Sep 15, 2023 3:15 pm
by mad-matt
You can always send 4 osc messages to red, green, blue & alpha, instead of a single OSC message to /rgba.
ie /surfaces/Quad-1/color/red