Distribute values in a Pbind

Hi guys,

I want to play a chord:

(
~test = Pbind(
	\instrument, \default,
	\octave, 5,
	\degree, [0,2,4,7],
	\dur, 1
	
).asEventStreamPlayer;
~test.play;
)

and now say I want the notes from that chord to be played with an “humanized”-sorf-of effect.
In other terms I would like to add a bit of lag to each of these notes indipendently.

I’ve tried the following modification but the lag seems to affect the entire chord.

(
~test = Pbind(
	\instrument, \default,
	\octave, 5,
	\degree, [0,2,4,7],
	\dur, 1,
	\lag, Pwhite(0.0, 0.5, inf)
	
).asEventStreamPlayer;
~test.play;
)

How can I “distribute” the lag value to the different events created by the Pbind?
Thank you for your help

There is a duration key \strum that does what you want I think. Documented here:

http://doc.sccode.org/Classes/Event.html

In this case, as you can use the same Pattern for every voice ,it can be written like this:

(
~test = Pbind(
	\instrument, \default,
	\octave, 5,
	\degree, [0,2,4,7],
	\lag, Pwhite(0, 0.05).clump(4),
	\dur, 1
).trace.play
)

If you want to specify different Patterns per voice use Ptuple.

(
~test = Pbind(
	\instrument, \default,
	\octave, 5,
	\degree, [0,2,4,7],
	\lag, Ptuple([Pwhite(0.1, 0.2), 0, 0, Pwhite(0.2, 0.3)], inf),
	\dur, 1
).trace.play
)
2 Likes

Thank you @tedthetrumpet and @dkmayer,
both \strum and .clump() can be very useful for mimiking guitars or arps for the new work I’m doing.
Thank you for you super fast replies!