[DRIVER] Simple OSC Protocol

Projects Forums V-Control Show Case [DRIVER] Simple OSC Protocol

Tagged: ,

This topic contains 5 replies, has 3 voices, and was last updated by  jlink 2 months, 3 weeks ago.

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #1366

    sspiegl
    Participant

    Hi,

    couldn’t find OSC functionality, so i wrote a driver for that:

    SimpleOSC V0.9a

    This is a simple OSC protocol implementation to send OSC Messages (with or without arguments) to OSC clients (Ventuz, Processing, Pandora,..)
    This driver can use UDP Channels. This simple OSC implementation was tested on Windows 7/10 and OSX 10.11 with the following client software: Ventuz 4/5, Processing (oscP5), PacketSender, Osculator.

    SimpleOSCMessage:
    This Command sends an OSC Message without any argument.

    SimpleOSCText:
    This Command sends an OSC Message wiht one string as argument. On the client side just listen for OSC messages with the address and one string argument

    SimpleOSCInteger:
    This Command sends an OSC Message wiht one integer as argument. On the client side just listen for OSC messages with the address and one integer argument

    //The SimpleOSCFloat command is in beta. Plattform independent reliability not given yet. Therefor not included in alpha release
    SimpleOSCFloat
    This Command sends an OSC Message wiht one float as argument. On the client side just listen for OSC messages with the address and one float argument

    Sebastian

    Attachments:
    1. SimpleOSC.dr3
    #1368

    Dierk
    Participant

    Hi Sebastian,
    thank you for sharing.
    V-Control has a device MX Wendler (Media Server) that is also controlled via OSC. But your approach is more generic, and I like to have this in V-Control. Maybe you want to take a look at this driver and see how Float values are implemented there.
    Your SimpleOSC driver will be available in the next release.

    #1369

    sspiegl
    Participant

    Thank you Dierk!

    Just found the SingleToStr(f) function in the MX Wendler driver. I guess theres a memoryblock at work work 😉 in the XojoScript context. Would be awesome if XojoScript would allow memory blocks in the sandbox…

    just implemented the float method and started a unit test…

    Thanks again.

    #1371

    sspiegl
    Participant

    Finally!

    here is the SimpleOSC including Float values

    Sebastian

    Attachments:
    1. SimpleOSC-1.dr3
    #1373

    Dierk
    Participant

    Thanks Sebastian,
    updated the driver database for the next release with your driver.

    And your guess from a previous post is correct, there is a Memory Block in the script context. Here is the source:

    //converts a string representing a float value (“1.2302”) to a four byte float string

    Dim mb As MemoryBlock = New MemoryBlock(4)
    dim s,stmp as string
    dim FloatVal as Single

    FloatVal = CDbl(fString)
    mb.SingleValue(0) = FloatVal
    // automatic conversion between memoryblock and strings!! =)
    s = mb
    stmp = mid(s,4,1)+mid(s,3,1)+mid(s,2,1)+mid(s,1,1)
    return stmp

    #1444

    jlink
    Participant

    I also wrote an OSC-Driver some time ago, which does nearly the same. It also has an event-functionality so that V-Control can react on OSC-Messages send by other devices. We use it to execute tasks from an MXWendler Playlist.

    Attachments:
    1. GeneralOSC.dr3
Viewing 6 posts - 1 through 6 (of 6 total)

You must be logged in to reply to this topic.