|
View:
New views
4 Messages
—
Rating Filter:
Alert me
|
|
|
Is it possible to Pbind arrays?Hi, Todo ruedas: información práctica y todo el glamour del mundo del motor. MSN Estilo y Tendencias _______________________________________________ sc-users mailing list sc-users@... http://lists.create.ucsb.edu/mailman/listinfo/sc-users |
|
|
Re: Is it possible to Pbind arrays?On May 12, 2008, at 1:52 PM, Eduard Resina Bertran wrote:
That does associate the whole array with the freqs key: p = Pbind( \instrument, \dynklankexample, \freqs, `[150, 300, 600, 900], \dur, 2).asStream; p.next(()); --> ( 'instrument': dynklankexample, 'dur': 2, 'freqs': [ 150, 300, 600, 900 ] ) So what isn't happening that should be in your case? Pbind is constructing the event properly according to the pattern's specification. hjh : H. James Harkins : 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 |
|
|
Re: Is it possible to Pbind arrays?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. SynthDef('dynklankexample', {| freqs (#[100, 200, 300, 400]) | var env = Linen.kr(Trig1.kr(1, 2), 0.01, 0.001, 1.0, doneAction: 2); SendTrig.kr(Impulse.kr(1), 1, freqs); Out.ar(0, DynKlank.ar(`[freqs, nil, [1,1,1,1]], WhiteNoise.ar * env)) }).store; This is what I get posted. Only the first frequency of the original array is replaced by each one of the intended new array on 4 different nodes. [ 1210622778.8125, an OSCresponder, [ /tr, 1003, 1, 900 ] ] [ 1210622778.8281, an OSCresponder, [ /tr, 1003, 1, 200 ] ] [ 1210622778.8281, an OSCresponder, [ /tr, 1003, 1, 300 ] ] [ 1210622778.8281, an OSCresponder, [ /tr, 1003, 1, 400 ] ] [ 1210622778.8281, an OSCresponder, [ /tr, 1002, 1, 600 ] ] [ 1210622778.8281, an OSCresponder, [ /tr, 1002, 1, 200 ] ] [ 1210622778.8281, an OSCresponder, [ /tr, 1002, 1, 300 ] ] [ 1210622778.8281, an OSCresponder, [ /tr, 1002, 1, 400 ] ] [ 1210622778.8438, an OSCresponder, [ /tr, 1001, 1, 300 ] ] [ 1210622778.8438, an OSCresponder, [ /tr, 1001, 1, 200 ] ] [ 1210622778.8438, an OSCresponder, [ /tr, 1001, 1, 300 ] ] [ 1210622778.8438, an OSCresponder, [ /tr, 1001, 1, 400 ] ] [ 1210622778.8438, an OSCresponder, [ /tr, 1000, 1, 150 ] ] [ 1210622778.8438, an OSCresponder, [ /tr, 1000, 1, 200 ] ] [ 1210622778.8594, an OSCresponder, [ /tr, 1000, 1, 300 ] ] [ 1210622778.8594, an OSCresponder, [ /tr, 1000, 1, 400 ] ] So I wonder if it might be possible to bind arrayed values to an event's key. Thanks, er
Sigue de cerca las últimas tendencias y lo que más rompe MSN Vídeo _______________________________________________ sc-users mailing list sc-users@... http://lists.create.ucsb.edu/mailman/listinfo/sc-users |
|
|
Re: Is it possible to Pbind arrays?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:
: H. James Harkins : 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 |
| Free Forum Powered by Nabble | Forum Help |