Multiple pdef plays

Currently I just enclose multiple Pdefs and play , and atm it seems that the overall timing sync of both Pdef is pretty o.k .
Playing a standard 4/4 kick (0.5sec=2hz ) against 16th notes (0.25sec , 4hz ) and no audible loss of sync
Much better compared to max scheduler
Anything I should be aware off ?

var mod,modenv,ampenv,carr;*fmamt;,modrel),doneAction:0);,amprel),doneAction:2);,(mod*modenv))*ampenv*outt!2;,carr);

		\dur,Pseq([0.25,  0.25,  0.5,  0.25,   0.25,   0.5],inf),
/////0.25,  0.25,  0.25,  0.25,  0.5,  0.25,  0.25,  0.12,  0.12,  0.5,  0.25,  0.50,  0.25,  0.25
SynthDef (\kick,
		arg pitch=50,patt=0.001,pdec=0.325,pcurve=(-50),pamt=100,att=0.001,dec=0.700,noisefreq=100,shamt=4,vol=0.3;
		var kick,penv,ampenv,noiseosc;[0,1,0],[patt,pdec],[0,pcurve]),doneAction:2);*pamt))*0.9;,noisefreq);

1 Like

This is amazing , you can have multiple Pdefs for the same Synthdef , the spice is in the Pbinds for parameter automation .
I wrongfully assumed that there would be a parameter collision when multiple pdefs are targeted at the same synthdef .

I know I have an awfull lot to learn but at least I can now have fun having the absolute basics under my belt of creating synthdefs and Pdefs .
I haven’t touched my cirklon for the past 2 weeks , i think that says enough about how addicitve supercollider is :slight_smile:

1 Like

Check out the helpfile for Pdef’s play method. It features the ability to quantize the start time to the clock, at whatever division you specify.

Also, James Harkins’s pattern guide is essential I think!

Technically, each Pdef isn’t controlling the same Synth (basically kind of like a voice in this case). What’s happening is that multiple instances are being created, one for each Pdef, at each step (unless you have a rest). Each Pdef is able to communicate with its respective voice with no clashes in parameters or namespace.

Fun stuff for sure though!

If you go through the pattern guide, or eventually, you may find other \types (kind of like the mode of playback and control for which the pattern is calibrated, and you can add your own too). If it’s not specified, it’s the default, with all the conveniences of \degree, \scale, etc. Lot’s of other ones though that can also do very interesting things. Some for fx routing for example.

Is there any disadvantage to using multiple (project ) tabs ?
I find it much more convenient to have some synthdefs +pbinds in several tabs , and they still play in sync

I tried changing the Pbind to Pmono (when nested in Pseq, but I get errors and the console info doesn’t make it any more easier to debug .
Pmono needs odd number of arguments etc…
I’ve read James Harkinss but for some reason the manual is not clear at all .
To be honoust I didn’t get any wiser by reading the manual and I still do it on a daily basis , it’s the tutorials by Eli Fieldsteel that made it somehow click.
This is verry weird since I always loved learning by myself , but coding is not one of them :slight_smile:

Pmono is structured a bit differently than Pbind.

I’m not at a computer right now, so typing is a bit harder, but unlike with Pbind, in a Pmono, you don’t do ‘… \instrument, \synthName, …’
First info provided after entering the Pmono scope is just \synthName. After that give it pairs.

Thus Pmono needs an odd number of arguments, one is the synth and the rest are key value pairs.

    \pitch, Pseq([....
1 Like

I find this an annoying design choice because it makes it non-trivial to toggle between Pbind and Pmono. In a Pbind I might write the instrument key 5th in the list etc. This is a good reminder to me to write a workaround…