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

Re: [sc-users] Patterns and Routing



SynthDef("pBass",
	{ arg out=0, freq=440, sustain=0.05, amp=0.1, pan;
		var env;
		env = EnvGen.kr(Env.perc(0.01, sustain), doneAction:2) * amp;
		Out.ar(out, Pan2.ar(SinOsc.ar(freq, 0, env), pan))
	}).store;

SynthDef("wah", { arg out=0, gate=1;
	var env, in;
	env = Linen.kr(gate, 0.05, 1, 0.4, 2);
	in = In.ar(out, 2);
	XOut.ar(out, env, RLPF.ar(in, LinExp.kr(LFNoise1.kr(0.3), -1, 1, 200,
8000), 0.1).softclip * 0.8);
}, [\ir, 0]).store;

(
Pdef(\anotherPattern,
	Pbind(\amp, 0.0251, \dur, 0.25,
		\degree,
Pseq([Prand([0,1]), Prand([1,2]), Prand([3,4]), Prand([5,6], Prand([6,7]) )],inf) + 15, \instrument, \pBass,
		\sustain, 2
))
);

Pdef(\withFX, Pfx(Pdef(\anotherPattern), \wah));

Pdef(\withFX).play;

// in insulation:

Pdef(\withFX, Pbus(Pfx(Pdef(\anotherPattern)), \wah));

... and I see that Pbus seems to have a bug since the pattern reform.

this is not a problem of Pdef rather something slightly unclear about
Pfx. Pfx applies an effect to a synth, but does not create a private
bus for this. In order to isolate Pfx, one needs to wrap a Pbus
around it.

Pdef(\x, Pbus(Pfx(....)))


Would you mind posting an example?  I can't seem to figure out how this is
supposed to work.
(For your convenience :D)

SynthDef("pBass",
	{ arg out=0, freq=440, sustain=0.05, amp=0.1, pan;
		var env;
		env = EnvGen.kr(Env.perc(0.01, sustain), doneAction:2) * amp;
		Out.ar(out, Pan2.ar(SinOsc.ar(freq, 0, env), pan))
	}).store;

SynthDef("wah", { arg out=0, gate=1;
	var env, in;
	env = Linen.kr(gate, 0.05, 1, 0.4, 2);
	in = In.ar(out, 2);
	XOut.ar(out, env, RLPF.ar(in, LinExp.kr(LFNoise1.kr(0.3), -1, 1, 200,
8000), 0.1).softclip * 0.8);
}, [\ir, 0]).store;


Pdef(\anotherPattern, Pbind(\amp, 0.0251, \dur, 0.25, \degree,
Pseq([Prand([0,1]),Prand([1,2]),Prand([3,4]),Prand([5,6],Prand([6,7]) )],
inf)+15, \instrument, \pBass, \sustain, 2));


Pdef(\anotherPattern).play;  //this plays the pattern without effects -
obviously


Thanks - S
--
View this message in context: http://www.nabble.com/Patterns-and-Routing-tp6745433p14716546.html
Sent from the Supercollider - User mailing list archive at Nabble.com.

_______________________________________________
sc-users mailing list
sc-users@xxxxxxxxxxxxxxx
http://lists.create.ucsb.edu/mailman/listinfo/sc-users

--





.