November 20, 2016 at 20:20 #1366
couldn’t find OSC functionality, so i wrote a driver for that:
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.
This Command sends an OSC Message without any argument.
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
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
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
Attachments:November 21, 2016 at 07:51 #1368
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 #1369
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.November 21, 2016 at 13:11 #1371
here is the SimpleOSC including Float values
Attachments:November 21, 2016 at 14:18 #1373
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)
March 30, 2017 at 14:26 #1444
- This reply was modified 1 year, 3 months ago by Dierk Walter.
You must be logged in to reply to this topic.