OSC replace_file & Color_RGBA
  • BEProdAus
    junior Member
    Posts: 3
    Joined: Wed Sep 13, 2023 6:54 am

    OSC replace_file & Color_RGBA

    by BEProdAus » Wed Sep 13, 2023 7:17 am

    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?
  • mad-matt
    garageCube team
    Posts: 1478
    Joined: Mon Sep 09, 2013 5:50 pm

    Re: OSC replace_file & Color_RGBA

    by mad-matt » Wed Sep 13, 2023 10:42 pm

    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.
  • BEProdAus
    junior Member
    Posts: 3
    Joined: Wed Sep 13, 2023 6:54 am

    Re: OSC replace_file & Color_RGBA

    by BEProdAus » Fri Sep 15, 2023 8:41 am

    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.
  • mad-matt
    garageCube team
    Posts: 1478
    Joined: Mon Sep 09, 2013 5:50 pm

    Re: OSC replace_file & Color_RGBA

    by mad-matt » Fri Sep 15, 2023 3:15 pm

    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

Who is online

Users browsing this forum: No registered users and 7 guests