On Mar 3, 2008, at 11:55 AM, Kassen wrote:
If I understand correctly I don't think this is a "problem with the pull model" per-se but more of a issue in two very different models touching each-other.
true.
I don't think linking all MAX "cables" to ChucK "Ugen connections" is the most sensible way of linking them. Some MAX cables will represent concepts closer to ChucK code or events while others will indeed be more like Ugen-connections.
The idea would be to instantiate a chuck object like this [chuck~ 2 5] where the first number is the number of output channels and the second is the number of inlets on the object, each of which would be receiving a stream of data from some 'external' object. These would be represented as variables in the chuck~ script, and whenever a value of that variable was requested *during* the execution of the script (see below, this is the problem) it would deliver the currently-set value coming from the 'external' object. This isn't hard to do, I've built other objects like this.
How hard/possible would it be to represent such a slider as a variable event member and the changing of the slider as broadcasting the event? Perhaps a sort of virtual protocol could be created, something like Hid or MIDI except linked to MAX objects instead if hardware objects?
That's kind-of what I do now, variables can come into chuck~ as $1, $2, etc. BUT: when the script is sent to the chuck parser, those values get 'frozen' when the script executes. This is the problem -- I want to be able to have a chuck~ variable (probably would have to be a ugen) that will dynamically change as values come into the post-parser executing script. I think MIDI and OSC in chuck possibly work this way, but I'm not sure.
I would say that here "crafting a event" might be a more fertile solution then "crafting a Ugen". My knowledge of MAX is rather rudimentary though.
Could be -- how is chuck set up to respond to 'events' during script execution? I'm missing something, I think. Although this is max- oriented, I suspect that the pd chuck~ probably has a similar situation. brad http://music.columbia.edu/~brad