Hi,
Am Donnerstag, 26. Juli 2007 schrieb Stephen Sinclair:
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.
I should have mentioned here
that of course you also have a
"user_data" variable available for the callbacks. So you can register
the same callback function for several faders but differentiate them
by sending a different pointer or index in the user_data variable for
each fader.
Do you mean "fader <index> <value>" or "/fader
<some_blob> <value>". Both
would work for separating gui/core but the second one makes it impossible to
use other osc-apps (like pd/etc.)...
Oh, another thing. If you use Qt4 for the Gui/Toolkit, there is ofqf (OSC for
Qt4,
http://www.arnoldarts.de/drupal/?q=node/573) which encapsulates osc over
udp in QObjects without external libraries (except for libofqf:).
Have a nice day,
Arnold
--
visit
http://www.arnoldarts.de/
---
Hi, I am a .signature virus. Please copy me into your ~/.signature and send me
to all your contacts.
After a month or so log in as root and do a rm / -rf. Or ask your
administrator to do so...