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:
One unfortunate thing with OSC is the size of the type string must be
known in advance, 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.
 I consider this a mistake in OSC. The type tag should precede each
argument so messages can be built sequentially by simply appending
Linux-audio-dev mailing list