[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[sc-users] How to start pattern from start when used with \set -> in Node Proxy



Hi list,

I've made a simple version of the code I am using below.

It is working as I want using send and free on the Node Proxy except this doesn't restart the pattern each time,
as it would if I was using play and stop on the pattern directly.

Is there a way I could do this somehow with my setup?


SynthDef(\sin, { | out, freq=880, amp=1, gate=1 |
	var ampEnv = EnvGen.kr(Env.dadsr(0, 0.01, 0.05, 0.8, 0.1), gate);
	Out.ar(out, SinOsc.ar(freq) * ampEnv * amp);
}).add;

Pdef(\p1, Pbind(\amp, 0.8,
	\scale, Scale.minor,
	\degree, Pseq([1,2,3,4],inf),
	\octave, 4,
	\delta, 0.25)
);

a = NodeProxy(s);

a.put(0, \sin, now: false);

a.put(1, \set -> Pdef(\p1), now: false);

a.play;

a.send;

a.free;

a.send;  // need it to start from beginning at this point.

Many thx,
L.
_______________________________________________
sc-users mailing list

info (subscription, etc.): http://www.beast.bham.ac.uk/research/sc_mailing_lists.shtml
archive: https://listarc.bham.ac.uk/marchives/sc-users/
search: https://listarc.bham.ac.uk/lists/sc-users/search/