send float values in OSC?

665 views
Skip to first unread message

MattM

unread,
Feb 20, 2018, 10:47:12 AM2/20/18
to QLab
I'm working with a small, fairly homebrew app called atemOSC that provides OSC control of a Blackmagic ATEM video switcher.  The app is here:


I've got basic functionality working from QLab, but there's something in the docs I don't understand.  There's a little discussion of floats elsewhere but nothing jumping out at me as an answer.  So I'm asking here because a) you guys do tons of OSC, and b) you guys actually respond! ;)

To do basic source switching with atemOSC, you send OSC commands in a format like this:

/atem/program/1
/atem/preview/2

Where <1> or <2> is the video source.  So far so good.

The docs have a list of other commands, though, and it mentions that "unless otherwise specified, send the value 1 as a float along with the OSC address below.  Sending any other value may result in the command not being processed.

What does that mean, exactly?  I assumed it involved tacking a 1 onto the end of the list of commands, but I can't get anything else to work.  

So, for example, to perform an automatic transition from program to preview source, the command is:

/atem/transition/auto

If I send "the value 1 as a float" with the command, I'm assuming that would be:

/atem/transition/auto 1

but that doesn't work.  It's not a super-well maintained app, so it's possible that the command simply doesn't work, but I'm not quite ready to give up on going this route just yet.  

Any idea what the syntax for sending a "float" in OSC is?

Thanks all!
Matt

Chris Ashworth

unread,
Feb 20, 2018, 10:52:04 AM2/20/18
to ql...@googlegroups.com
Hi Matt,

If you’re sending these messages from QLab, try entering:

/atem/transition/auto 1.0

Note that the syntax used in QLab is unique to QLab; it’s something we use to make it easier for a human to write an OSC message as if it were plain text. But OSC messages are (unfortunately) not plain text, and the text you see in QLab is parsed and interpreted into an actual OSC message.

Thus, what you see in QLab’s UI is not OSC, it’s just something that looks a bit like OSC and can be reasonably translated back and forth.

micpool

unread,
Feb 20, 2018, 11:23:21 AM2/20/18
to QLab
Looking at the OSC output from the touchOSC iPad layout in the repository, the message received is /atem/program/1 1.0

The requirement for 1.0 to be appended is probably to get round the problem of touchOSC always sending an argument.

/atem/program/1 1.0 

sent from QLab is the identical message to that coming from the touchOSC layout.

Mic

MattM

unread,
Feb 20, 2018, 2:32:20 PM2/20/18
to QLab
Thanks guys, as always, for both the explanation and the example.  Adding "1.0" after the command, e.g.

/atem/transition/auto 1.0

does the trick. 

Now to play with some of the OTHER commands on this thing...hehe

M2
Reply all
Reply to author
Forward
0 new messages