Visual Productions forum

Author Topic: CueCore2 OSC-dmx contorl  (Read 1119 times)

2023 May 18, 17:04:48
Read 1119 times

Nick_int

  • Member
  • *
  • Posts: 2
Hi all,
I'm setting up a CueCore2 in my lab before tomorrow installation.

Any suggestion about controlling a single DMX channel by an OSC message?

I'm sending this message structure without success:
/core/dmx/1 120

I'm using a Q-Sys core in order to generate the OSC message. The script output (from debug section) is this:
/core/dmx/1 120

On CueCore2 OSC section, i'm able to read incoming OSC:
/core/dmx/1 120
But in the "argument" section i don't have nothing.

Can someone help me or explain why this doesn't work?

Thanks in advance

2023 May 19, 10:30:03
Reply #1

Julien Levaufre

  • Administrator
  • Member
  • *****
  • Posts: 3343
    • www.visualproductions.nl
I think the way you are sending the OSC message is not right.
From the Cue core monitor screenshot you have sent I can see that the value that should be in the argument is seen as part of the URI.
So you should have a look on the Q-sys side to check how to put the value as an argument.
Julien Levaufre
Visual Productions BV

2024 February 14, 17:01:10
Reply #2

JBultman

  • Member
  • *
  • Posts: 2
Nick,
I ran into this same issue so I figured I would respond in case anyone else finds this thread.

The OSC script from the Q-Sys Dev forums has a bug regarding numerical arguments. It sends them as OSC strings. You have to edit the script to typecast numerical arguments in the send function as numbers and then it works fine. I went a slightly different route and included a sanity check for arguments as well. Here is my revised version of the code for the OSC Send function:

-- Send OSC data. This function should be called with the first argument being a string for the address, and then adding the other values as arguments after that.
function OSCDevice:send(...)
  local temp_table = {}
  local argv = {...}
 
  if(#argv == 1 and type(argv[1]) == "table") then
    args = argv[1]
  else
    args = table.pack(...)
  end
print("Send Method Args Dump: " .. dump(args))
  -- This fills out the table that the osc.encode function from the library needs to send --
  for i, j in ipairs(args) do
    if(i == 1) then
      table.insert(temp_table, args[1])
    else
      local jn = tonumber(j)
      if jn ~= nil then
        if (math.floor(jn) == jn) then
          table.insert(temp_table, "i")
          table.insert(temp_table, tonumber(j))
          print("Debug: The Arg is Int")
        else
          table.insert(temp_table, "f")
          table.insert(temp_table, tonumber(j))
          print("Debug: The Arg is Float")
        end
      else
        if (type(j) == "string") then
          table.insert(temp_table, "s")
          table.insert(temp_table, j)
          print("Debug: The Arg is String")
        else
          print("Error: Argument is not a compatible type. Exiting OSCDevice:send")
          break
        end
      end 
    end
  end

2024 March 06, 16:46:37
Reply #3

Julien Levaufre

  • Administrator
  • Member
  • *****
  • Posts: 3343
    • www.visualproductions.nl
Thank you JBultman for sharing this important information about sending OSC messages from Q-sys.
In worst case you can also use UDP messages from Q-sys, this is quite easier to set up.
Julien Levaufre
Visual Productions BV

 

SMF spam blocked by CleanTalk