When you use an OSC query in a Network cue, and you give that cue a duration, the query is continuously updated as long as the cue is running. The above example works fine when you just need to extract a piece of information from QLab at a given moment, but you can also use queries to send a continuously updating value. device/standby 101 Continuously Updating Queries So if cue 53 is selected when the OSC message is sent, it becomes:īut if cue 101 is selected when the OSC message is sent, it becomes: The message, therefore, is built like this: When an OSC message including this query is actually sent by QLab, the query is replaced with the result of that query. The query, which is enclosed in hashmarks 1, asks QLab for the cue number of the currently selected cue. All we need to do is choose the right query, which in this case is: By replacing the 53 with a query, we can build a single OSC message which inserts a value at the moment the message is sent. What we’d really like is for the device to just always know which cue is selected in QLab.Įnter OSC queries. That’s all well and good if we only need to send this one value, or maybe just a few, but if we want the device to simply follow QLab, and we have lots and lots of cues, it could get arduous to program. Sending that message sends the value 53 to the address /device/standby, and in our imaginary situation, that’s the address that the receiving devices wants. The other device needs to be given a cue number via OSC, so in QLab we make a Network cue and build this message: Imagine a show which is using QLab and some other device on a network. This is one of those concepts that is easiest to understand through examples. I've also included a copy of the complete sketch.OSC querying is a powerful capability of the Network cue which allows you to capture the current, live value of nearly any property that can be accessed via OSC and include that value as a part of an OSC message. Now if I send the same custom OSC message above to the Arduino from Qlab the serial monitor prints: Now where I get a little confused is if I send a random OSC Message to Qlab with value like:Īnd then ask Qlab to capture the message to control go for example, it captures it exactly as represented above irrelevant of wether I use method one or two to create the message on Arduino. Neither methods get a response or reaction from Qlab but print in the serial monitor differently: Method two with adding the value after MsgOUT.empty() // free space occupied by message Udp.endPacket() // mark the end of the OSC Packet Here's the code showing both methods tried: // Method one with value integrated with message I've tried two different approaches, one which is to create the message complete with value, the other to use the OSC add function to add the value after the address has been define. Then I never get the expected response from Qlab, as if it never receives the value part. The problem arises when I try to send a message with a value like: I have no issue at all and Qlab responds every time with the expected reply. So if I send an OSC message that is purely an address like: I've had some fairly good results so far, but I'm getting stuck at formulating an OSC message which carries a value attached in a way that is accepted by Qlab. I'm using the following libraries acquired from Arduino site and from CNMAT for the OSC stuff: I'm a novice programmer working on an OSC controller project for Qlab using Mega and Ethernet Shield V2.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |