OPEN SOUND CONTROL
dengde
Posts: 4
HI.
have everybody tips and tricks for programming the OSC protocol with AMX? I can?t find some informations about this protocol.
thanks
have everybody tips and tricks for programming the OSC protocol with AMX? I can?t find some informations about this protocol.
thanks
0
Comments
As an example, here's a mute command for a behringer mixer I had lying around...
the value must be a float. But i don?t understand the protocol.
my string for example:
level_event[dvTP,1]
{
nLevel = level.value
send_string dvCue, "'DMX/ADRESS/1',nLevel"
}
I don?t know if the nLevel the correct format?!
Thanks for help
well, it depneds upon what your string should look like. In your example you are sending a string that will look like DMX/ADRESS/1.
bear in mind that nlevel (which you say is a floating point number) is just a binary number byte. The DMX/ADRESS/1' being in single quotes ' ' tells the compiler/hardware that you wish to send ASCII representations of the string. So what you are sending is a hex $44 for the capital letter D, a hex $4D for the letter M, etc... When you get to the nLevel part, which is outside the single quotes, you will be sedning the literal hex value for that variable. There are some devices that do indeed want this. But, my guess is that it wants ASCII of the numbers as well.
Let's say that nLevel happens to be 1.42
What you'll need to do is send the hex ASCII value for the character 1 ($31), for a . ($2E), the character 4 ($34) and an ASCII 2 ($32).
There are operators you can use to convert the numberic value of nLevel to an ascii message of that number. I suggest you look at ITOA() and FTOA() and it's companions to figure out how you wish to format the number.
yes i know the different operators. itoa(nLevel)
But for the OPEN SOUND CONTROL nLevel must be a OSC-timetag 64-bit big-endian fixed-point time tag
http://opensoundcontrol.org/spec-1_0
thanks
I'm not too proud to admit that it was confusing to me. It's not that I don't understand the various methods of constructing a message and so forth. To me it's a good idea to include a few examples to illustrate the methods. The documentation was pretty short on those.
the device is a Cue Core 2 from visual productions.