[chuck-users] questions on osc, events and multi-shredding
radarsat1 at gmail.com
Tue Mar 27 12:36:35 EDT 2007
> I am building an application where there are potentially a lot of
> parameters controlled via OSC. It would be interesting how other
> ChucKers deal with this kind of situation.
I started building a class to deal with this problem once.
Of course, the *real* solution is to allow waiting on multiple events,
but for now I'm using shreds. This was partly a response to the
issues I brought up in this thread on the OSC list:
Anyways, I thought it would be way more convenient to be able to just
declare a class as being OscFloat and then use its value as needed,
instead of having to set up an OscEvent for each parameter of my
synth. Also, I wanted float values to also response to int messages.
So here, I'm waiting on OscEvents in multiple shreds, but when OSC
messages are received, the shreds wake up a shared Event using
broadcast. This makes it work much nicer with Pd, which has a
tendency to send either float or int messages, depending on the value.
I understand that this issue is under consideration. The chuck
language specification currently has no way to wait on multiple
events, partly because events are waited on using the "chuck" operator
(=>), which can only have one left-hand and one right-hand parameter.
One way might be to support some sort of Pythonic "list" structure, like this:
[event1, event2, event3] => now;
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 1096 bytes
Desc: not available
Url : http://lists.cs.princeton.edu/pipermail/chuck-users/attachments/20070327/4dd43be3/attachment.obj
More information about the chuck-users