[LAD] Overloading OSC Arguments

Steve Harris steve at plugin.org.uk
Mon Dec 10 12:58:19 UTC 2007


Polymorphism in OSC is allowed, it's good and bad for all the same  
reasons that it is in programming languages. Use your common sense.

Liblo's API was designed to make polymorphism easy, but don't take  
that as an implicit recommendation :)

- Steve

On 10 Dec 2007, at 12:46, 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?
>
> Cheers!
>
>
> | 
> -------------------------------------------------------------------------|
> | Frederick F. Gleason, Jr. |               Chief  
> Developer               |
> |                           |               Paravel  
> Systems               |
> | 
> -------------------------------------------------------------------------|
> |      Research is what I'm doing when I don't know what I'm  
> doing.       |
> |                                          -- Werner von  
> Braun            |
> | 
> -------------------------------------------------------------------------|
> _______________________________________________
> Linux-audio-dev mailing list
> Linux-audio-dev at lists.linuxaudio.org
> http://lists.linuxaudio.org/mailman/listinfo/linux-audio-dev




More information about the Linux-audio-dev mailing list