Stefan Kersten <[EMAIL PROTECTED]> said:

> OSC's a rather generic protocol;
> still byte ordering issues have to tackled, though.

There's an easy part and a hard part to the byte ordering issues.  The easy
part is all the places in the spec that contain a big-endian number: the
number of bytes in each element of a bundle, the time tag, etc.

The hard part is OSC message arguments, which may be null-terminated ASCII
strings or big-endian 32-bit ints or floats.  A little-endian OSC server needs
to byte-swap numeric arguments, but not string arguments.

SuperCollider extends OSC with type tags; the first argument to any message is
a string (beginning with a comma character to identify it as a type-tag
string) with one character per argument.  E.g., the type-tag string ",iifs"
indicates that there are four arguments to the message (not including the
type-tag string itself): an integer, another integer, a floating point number,
and a string.

I consider this a major improvement and regret not designing OSC with type
tags in the first place.

I plan to spend the end of September propagating this type tag scheme to all
of the OSC implementations; at that point, the recipient of a type-tagged OSC
message will be able to perform all necessary byte-swapping automatically.

-Matt

Reply via email to