Maybe I can be of help with my very first post
in this forum even though the question from chq is already 2 months old.
QLC+ is really a great piece of software and OSC is in addition a very cool and easy possibility to remote control QLC+. The OSC specification is not too complex and you even need just a subset from it as several options are not needed for QLC+.
The message you need to send is composed from 3 parts:
1. OSC Address Pattern
2. OSC Type Tag String
3. OSC Arguments
- The OSC Address Pattern is a simple 4-byte aligned text string terminated by \0 (zero character) starting with the character ‘/’ (forward slash) followed by any text. As OSC is organized hierarchically it makes sense to build the strings like this: “/<root>/<subroot>/.../<leaf>” (e.g. “/homecinema/light/ambient/full”).
- The OSC Type Tag String is a 4-byte aligned character string starting with ‘,’ specifying the OSC Arguments. For QLC+ only ‘i’ (int32) is useful from my perspective as ‘s’ (string) is not handled by OLC+ and other types doesn’t make sense. With the 4-byte alignment you’ll have a character sequence like this: “,i\0\0” (characters ‘,’ and ‘i’ followed by 2 zero characters)
- The OSC Argument(s) is with the knowledge of the OSC Type Tag String just one (32-bit) Integer in our case. If you want to trigger a button just use a fixed value of 255 (Hex: 0xFF). In case you want to remote control a slider any value from 0 to 255 is fine depending where the slider should go. The representation of a 32-bit Integer with value 255 is: “\0x00 \0x00 \0x00 \0xFF”.
Now we have all the components and can combine the String for the message which would look like this in our example: “/homecinema/light/ambient/full\0\0,i\0\0\0x00\0x00\0x00\0xFF”.
Note the two zero characters behind the address. One is the required termination character and the second one is the padding zero to get the address aligned to 4 Bytes (32 Bytes in total).
If you search the internet there are a several code snippets available in different languages creating a OSC message from these 3 components taking care for padding the correct number of zeros into the message string.
I’m wondering that the given example from this thread works as the alignment is not correct for the OSC Address Pattern.
I hope this will be of help