OK, I realized that later.
The default event prototype doesn't know how to pass array arguments.
You might consider installing my ddwChucklib quark and using the ProtoEvent(\singleSynthPlayer) alternative. The drawback is that this doesn't include the functions for automatic conversion of higher-level keys like \degree or \dur into physical \freq or \delta parameters. But since (by design) it is supposed to produce only one synth, any array arguments are automatically moved into a n_setn message that follows the s_new in the same bundle.
You could add in the durEvent from the default event prototype and then your \dur key will work. But I'm pretty sure singleSynthPlayer won't work with pitchEvent because singleSynthPlayer uses \note for something else -- may not be an issue here because you're not using pitchEvent keys.
As a quick example (with chucklib), this does pass the right numbers to the (one) synth:
ProtoEvent(\singleSynthPlayer).v.copy.putAll(Event.partialEvents.durEvent) => ProtoEvent(\ssp2);
p = Pbind(
\instrument, Pn(\dynklankexample, 1),
\freqs, `[150, 300, 600, 900],
\dur, 2).play(protoEvent: ProtoEvent(\ssp2).v.copy);
TRACE 1005 dynklankexample #units: 18
unit 0 Control
in
out 150 300 600 900
(I have a fix that will remove the need for the annoying .v's in there but svn is not working for me - "could not connect to server (
https://quarks.svn.sourceforge.net)" - so I will have to check that in later.)
It would be good to have this facility for the default event, as an option, but it will take some dev work to do it.
hjh
On May 12, 2008, at 4:25 PM, Eduard Resina Bertran wrote:
Hi,
well, that ... ( 'instrument': dynklankexample, 'dur': 2, 'freqs': [ 150, 300, 600, 900 ] )
... works but doing channel expansion (4 events):
what I'd like to know is if, for an instrument that takes an array as an argument, it is possible to Pbind a new array to the event's key in a similar way that we would do it using "setn" to change a Synth node's argument array value.
: H. James Harkins
: jamshark70@...
: http://www.dewdrop-world.net
.::!:.:.......:.::........:..!.::.::...:..:...:.:.:.:..:
"Come said the Muse,
Sing me a song no poet has yet chanted,
Sing me the universal." -- Whitman
_______________________________________________
sc-users mailing list
sc-users@...
http://lists.create.ucsb.edu/mailman/listinfo/sc-users