Re: [LAD] Overloading OSC Arguments

From: Dave Robillard <dave@email-addr-hidden>
Date: Fri Dec 21 2007 - 00:06:44 EET

On Mon, 2007-12-10 at 07:46 -0500, Fred Gleason wrote:
> Howdy Folks:
>
> I'm in the midst of laying out an OSC namespace for a new app, and have come
> across a couple of places where it might make sense to 'overload' different
> argument parameters onto the same command node (in the same sense that
> different argument lists can be overloaded into identically-named methods in
> C++).
>
> An example may help make it clear. Consider the following OSC path:
>
> /daw/cursor/set_position
>
> This would be a command to set a cursor position. If the supplied argument
> were a float32, the unit would be assumed to be seconds. If it were a
> string, a broken-down time representation ("HH:MM:SS") would be assumed, and
> so on.
>
> While I can find nothing in the OSC spec that would specifically forbid this
> sort of behavior, I'd like to be sure that, as a practical matter, the
> 'real-world' apps that are already out there would be able to deal with this
> sort of construct. Would anyone be aware of reasons why this sort of layout
> would not be a good idea?

I use it. Think it's a good idea in general, as long as you're not
actively stupid about it (i.e. what swh said).

Certainly beeats set_position_float, set_position_time_string, ....

Though, for absolute time you should probably use the OSC timestamp type
(maybe with a different epoch, but that's just semantics)

-DR-

_______________________________________________
Linux-audio-dev mailing list
Linux-audio-dev@email-addr-hidden
http://lists.linuxaudio.org/mailman/listinfo/linux-audio-dev
Received on Fri Dec 21 00:15:03 2007

This archive was generated by hypermail 2.1.8 : Fri Dec 21 2007 - 00:15:03 EET