[LAD] intergrating osc

Stephen Sinclair radarsat1 at gmail.com
Thu Jul 26 17:16:57 UTC 2007


> I would use the generic_handler() function to extract the relevant info
> from the osc command and then pass that info to the fader specified in
> the command?

You can use something like generic_handler(), but it will match _any_
incoming message.  The idea of LibLo is to create a callback for each
message you want to handle.  It will do the job of differentiating
which callback gets called depending on the OSC address, and will also
handle wildcard addressing for you.  (I.e., all matching callbacks
will get called.)


> What is the best way to specify the names for the various faders? Do I
> just put them in an array?

Associate each fader with a callback, or alternatively create a
generic_handler() type callback and use the "path" variable to
differentiate.  You could, for example, write a single callback, but
associate multiple messages to the same callback.  In the callback,
use "path" to figure out which fader has been specified.  It depends
how dynamic your program is.  If the number of faders is hard-coded,
it may be simpler to have a callback for each one.


> Also, If I don't assign a specific port number for the server is that an
> issue?

Which port number you use is up to you.  I suggest making it user-configurable.
Keep in mind that OSC says _nothing_ about the underlying protocol
used to carry it.  That UDP ports are often used is only defacto
convention.  You could equally use TCP or anything else.  However,
supporting UDP ports is useful since that's what most other programs
use.


> If it is has anyone created a list of ports that have already been
> claimed by the various jack apps that have already implemented osc?

Don't know of one. Jack is of course a separate thing from OSC.  I
would think that needing to reserve specific ports for specific
applications would be counter-productive.  Like telling musicians what
MIDI channels they should put their devices on.  It's better to let
them configure it.

Hope this helps,

Steve



More information about the Linux-audio-dev mailing list