From Function to Pdef

Hello everyone,
I would like to ask for advice, to change this simple code, from a function to a synthdef controlled via Pdef or Pbindef.

Do you suggest to use t_trig like arg?
Or to there is another way to control Impulse in sync with patterns ?

c = {arg amp=1.0;
		// it changes 1 time every second, in the range between 1 and 20
	//	so potentially from a quarter note to a 20tuplet


- just a way to "cut" the phrases with amp = 0.000
- so you can have phrases "cutted"  every 0.66666666666667 second
		- It's in mutichannel expansion so I'm working on channel Left Only, Right Only or both.



//c.set(\amp, 0.0)

I like the result but I would love to change it to have more control

  1. choose how long the phrases have to dur consequentally the silences/pauses.

  2. choose how many changes there are in a phrase.

  3. choose the way the changes have to behave, to the adjacent number or changes to a random number within the range.

  4. choose the “spatialisation”,
    for now is:
    a or b or ab but without interpolation,
    and it works for my porpose.
    maybe just a it could work

Thank you in advance,
to who wants to help me out.

I do not fully understand what you want to achieve (sorry) but here is something that might serve as a source of inspiration:

	var pattern;
	SynthDef(\ticking, {
		| out=0, freq=1.0, amp=1.0, pan=0 |
		var sig =;,*sig, pan));
	pattern = Pmono(
		\freq, Prand([Pwhite(1,20,3), Pgeom(3.0, 1.2, 10)], 20),
		\amp, Prand([0.1,0.5,1], inf),
		\dur, Pseq([1], inf), // beats, not seconds
		\pan, Prand([-1,0,1], inf),
	~player =;
	// ~player.stop;
1 Like

Thank you Shiihs,

to use Pmono without killing the synth all the time it’s a really nice way to solve it!
So changing the amp I could “cut” the phrases, and I also like the Pwhite, Pgeom in the freq, it sounds much more similar to an LFO compared to my solution.

In the end, I tried to make everything a little more metric, to see how it sounds, maybe a little too rigid for my goal, but it gives me more control. I have to keep fix it. I had also considered the possibility of using a solution where I use a sin function * Pwhite()

Event patterns and LFOs | SuperCollider 3.11.2 Help (

Aayway for now I’m here:

SynthDef(\imp, { arg out=0, pos =0;
var sig =;
	var pan =,pos);,;




var pause = Pseq([Rest(4)],1);

	Pbind(\instrument, \imp,
		\dur, 1/Pwrand([
],[1,1,1,1,1,1,1,1,9].normalizeSum, inf),
	\pos,Pstutter(8,Pxrand([-1,0,1],inf).trace(prefix:"POS: "))