Re: [LAD] OSC vs LV2 atoms (was: [ANN] Qtractor 0.5.4 - Echo Victor shouts out!)

From: David Robillard <d@email-addr-hidden>
Date: Tue Mar 06 2012 - 22:23:05 EET

On Tue, 2012-03-06 at 14:07 +0100, Stefan Kersten wrote:
> On 05.03.12 21:50, David Robillard wrote:
[...]
> > I have been idly wondering if a round-trip OSC<=>Atom bridge would be
> > possible. Atoms are essentially primitives (int, float, string, etc)
> > with a few simple collections, all POD (vector, dictionary). You can
> > think of it as sort of a JSONish approach, but low-level rather than
> > text.
>
> it seems to be rather similar to bson [1] actually.

Interesting. I was unaware of this spec. Yes, very similar, though
Atoms have 64-bit alignment, and more extensibility (we use URID
integers for type rather than a byte).

Atoms also lack a real "dictionary", objects always have URID keys
because that 'meaningfulness' is very useful, and its fast. A
dictionary type with flexible keys could be added...

It would be nice if an existing spec could be used (I looked in to
protocol buffers as well), but none quite fit.

> > I wonder how one would express a dictionary in OSC?
[...]
> > /foo/adict {sssi} "name" "David" "id" 42
> >
> > =
> >
> > { "name": "David"
> > "id": 42 }
>
> without the need for new types you could also "abuse" the bundle system, by
> interpreting bundles within the top-level bundle as dictionaries with messages
> as key/value pairs; this changed semantics would need to be explicitly supported
> by other applications, of course.

Sounds like maybe "Enables encoding of structured content by using
nested bundles" (from [2]) would facilitate this without have to kludge
the semantics.

> there's some talk about this in a thread on OSC 2.0 [2], but i couldn't find a
> draft document of the new protocol revision.

Interesting. Looks like they have the right goals. I am tempted to
follow this, but the very last thing I need is to be involved in yet
another spec :)

-dr

_______________________________________________
Linux-audio-dev mailing list
Linux-audio-dev@email-addr-hidden
http://lists.linuxaudio.org/listinfo/linux-audio-dev
Received on Wed Mar 7 00:15:02 2012

This archive was generated by hypermail 2.1.8 : Wed Mar 07 2012 - 00:15:02 EET