[OSC_dev] namespace best practice?

mart kalinski at amei.se
Tue Jul 29 12:10:22 PDT 2008


Hi All,

i am new to OSC and I am pretty much stuck:
i want to setup a distributed system with several (a lot) of nodes.
This could be uOSC-devices or so.
Defining the namespace of methods of one node is pretty much straight
forward to me:

"/device/id"
"/device/status"
"/device/firmware"
etc..

cool.

I know that the OSC-spec does not provide a namespace convention
and it is all up to me
but when it comes to trees of higher orders I don't know what to do:

"/control/0/control/1/uosc_dev/2/pwm/3 ,i 255",
"/control0/control1/uosc_dev2/pwm3 ,i 255"
or just
"/pwm 0 1 2 3 255" ?

it doesn't matter to the specs...
but containers just called "1" seem ugly to me
same time "name+id" also doesn't feel right

monome solves the problem by flatting the tree:
/40h/led [x] [y] [state]

although they could have as well
put each pixel of the matrix in the path:

/40h/row/1/col/2/pixel/state ,i

and when i got 100 monomes?
/40h/100/row/1/col/2/pixel/state, i
or just
/40h/led [dev] [x] [y] [state] ?

(actually i would be  happy if I had one 40h :)

supercollider seems to do the same:
"/group0/group1/group2/synth/set"
seems to be representing the setup best, but instead
something like
"/n_set <value> <value> <value> <value>"
is used...

Is OSC here only another network transport layer?

Main problem is that pattern matching does not work anymore.
Imagine i have a mixer-device with 16 channels
and another one with 16 channels.
Don't ask me why, but i want to mute all channels all together:

/mixer/*/chn/*/volume ,f 0

possible?

or only:

/mixer/1/chn/*/volume ,f 0 ?
/mixer/2/chn/*/volume ,f 0 ?

surely not with a flat representation:

/mixer [id] [chn] [volume]
/mixer * * 0

I like to use OSC instead of XML.
I like the idea of publishing OSC-Servers
via zeroconf in a distributed system (like SC).
And I like the idea to query a namespace
by sending "/"  (like make controller)
and getting values by just sending /container/method
without parameters (like ?)

but i don't know how to nest
and somehow automatically name
my units...

so how would look a  well-designed namespace of an
OSC-based distributed system of (u)OSC-entities?

all the best
mart



More information about the OSC_dev mailing list