Re: [LAD] intergrating osc

From: Stephen Sinclair <radarsat1@email-addr-hidden>
Date: Thu Jul 26 2007 - 20:16:57 EEST

> 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
_______________________________________________
Linux-audio-dev mailing list
Linux-audio-dev@email-addr-hidden
http://lists.linuxaudio.org/mailman/listinfo.cgi/linux-audio-dev
Received on Fri Jul 27 00:15:01 2007

This archive was generated by hypermail 2.1.8 : Fri Jul 27 2007 - 00:15:01 EEST