On Mon, 2012-03-05 at 09:40 +0900, michael noble wrote:
[...]
I don't really grasp what you're getting at here, or what MIDI has to do
with it, etc. However, using plugins to process/filter/whatever OSC
messages is natural (same thing for Jack apps). You can use any event
types in LV2.
What you'd need to work with OSC in plugins is a simple implementation
capable of reading and writing OSC messages in realtime. Liblo is too
heavy for that.
Reading is probably easy. Writing is a bit trickier, I struggled with
inventing a decent API for a similar thing (LV2 atoms, not OSC, but same
idea), but eventually arrived at an "append-based" API which works
pretty well. I call this the "forge" API for atoms. A similar scheme
could work for OSC, e.g hard real-time code to write the message
"/foo/bar if 1 3.0" could look something like:
OSC_Forge forge;
osc_forge_set_output(output_butter, n_bytes);
OSC_Msg msg;
osc_forge_msg_start(&msg, "/foo/bar");
osc_forge_int(1);
osc_forge_float(3.0);
osc_forge_msg_finish(msg)
One unfortunate thing with OSC is the size of the type string must be
known in advance[1], so you might have to pass that to osc_forge_msg.
Nesting (bundles) can be handled automagically, the forge maintains a
stack (without allocating, of course). Such a thing can be implemented
in a single smallish header.
I think a very simple stand-alone API to deal with OSC message would go
a long way towards making OSC more feasible for plugins or Jack apps.
-dr
[1] I consider this a mistake in OSC. The type tag should precede each
argument so messages can be built sequentially by simply appending
successive arguments.
_______________________________________________
Linux-audio-dev mailing list
Linux-audio-dev@lists.linuxaudio.org
http://lists.linuxaudio.org/listinfo/linux-audio-dev
LINUX® is a registered trademark of Linus Torvalds in the USA and other countries.
Linuxaudio.org logo copyright Thorsten Wilms © 2006.
Hosting provided by the Virginia Tech Department of Music and DISIS.