Home AMX User Forum NetLinx Studio

OPEN SOUND CONTROL

HI.

have everybody tips and tricks for programming the OSC protocol with AMX? I can?t find some informations about this protocol.

thanks

Comments

  • zack.boydzack.boyd Posts: 94
    Nothing really special about it. It varies from device to device but essentially you open up a socket it and send it commands. They typically are in a folder-tree structure with '/' separating levels. What device/commands are you trying to control specifically?

    As an example, here's a mute command for a behringer mixer I had lying around...
    SEND_STRING dvBehringer, "'/ch/',ITOA(nChan),'/mix/on',$00,$00,$00,',s',$00,$00,'OFF',$00"
    
  • dengdedengde Posts: 4
    I need to control a cue core 2. i must control the dmx level with a level_event from the touchpanel.

    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
  • ericmedleyericmedley Posts: 4,177
    dengde wrote: »
    I need to control a cue core 2. i must control the dmx level with a level_event from the touchpanel.

    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.

  • dengdedengde Posts: 4
    Hi,

    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
  • viningvining Posts: 4,368
    dengde wrote: »
    Hi,

    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
    Maybe it's cuz it's early in the morning and I'm not completely awake yet but that document was confusing.
  • ericmedleyericmedley Posts: 4,177
    vining wrote: »
    Maybe it's cuz it's early in the morning and I'm not completely awake yet but that document was confusing.

    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.
  • zack.boydzack.boyd Posts: 94
    Like I said before, the OSC standard is often clarified/simplified by the manufacturer. What specific device are you trying to control?
  • dengdedengde Posts: 4
    Hi

    the device is a Cue Core 2 from visual productions.
  • zack.boydzack.boyd Posts: 94
    Looks like the only predefined OSC controls are the same commands as a UDP command set they have available. None of them allow direct DMX control. You can control fader values, though with playback intensity value.
Sign In or Register to comment.