Pseq does not seem to change amp

For some reason the Pseq in the Pbind for amp does not seem to change the amplitude of the synthdef. I also tried just having the value 0.0 and you can still hear it.

(
SynthDef.new(\perc, { |out |
	var sig = Pan2.ar( SinOsc.ar(XLine.kr(200, 60)*30*SinOsc.kr(440) ));
	sig = sig *  EnvGen.kr(Env.perc(0, 0.05), doneAction:2);

	Out.ar(0 , sig  );

}).add;
)


(
 ~s = Pbind(
    \instrument, \perc,
	\dur, Pxrand( 
		[ Pbjorklund2(4,8,2)/16, Pseq( [0.25, 0.25, 0.25, 0.25], 2 ), Pseq( [0.50, 0.50,        
			1, 1 ], 2 ), Pseq( [0.0625 ], 2 ) ], 
		inf ) ,\amp, Pseq([0.2, 0.3, 0.4, 0.5, 0.8],inf) ,\rate,1);
~s.play;
)

Parameters like \amp in your Pbind are fed more or less directly to parameters in your SynthDef. Your SynthDef does not have an \amp parameter, so this key in your Pbind does nothing. Try adding an amp argument after out and then e.g. multiply your signal by it and I think you’ll get what you expect. Also note that you’re not using your out param, but instead just hard coding your output to 0. This is no problem, but might not work as you expect in other scenarios.

1 Like