Home › Forums › V-Control Show Case › [DRIVER] Simple OSC Protocol
- This topic has 5 replies, 3 voices, and was last updated 5 years, 10 months ago by
jlink.
-
AuthorPosts
-
November 20, 2016 at 20:20 #1366
sspiegl
ParticipantHi,
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 argumentSimpleOSCInteger:
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 argumentSebastian
Attachments:
November 21, 2016 at 07:51 #1368Dierk
ParticipantHi 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.November 21, 2016 at 12:07 #1369sspiegl
ParticipantThank 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.
November 21, 2016 at 13:11 #1371sspiegl
ParticipantNovember 21, 2016 at 14:18 #1373Dierk
ParticipantThanks 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 SingleFloatVal = 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-
This reply was modified 6 years, 2 months ago by
Dierk Walter.
March 30, 2017 at 14:26 #1444jlink
ParticipantI 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:
-
AuthorPosts
- You must be logged in to reply to this topic.