An Issue with rc 808 and custom pdefs

There is this wonderfull supercollider 808 made by Yoshinosuke Horiuchi , all synthdefs for the synthesis part and gui ,sequencing etc…
I copy pasted some synthdefs in order to create my own pdefs for it , but for some reason the Pdef sequences the default SC synth
This is the synthdef for the Low tom sound

SynthDef.new(\LT, {
	arg amp=1, freq=80;
	var sig, fenv, env, pnoise, penv;
	env = EnvGen.kr(Env.new([0.4, 1, 0], [0, 20], -250),doneAction:2);
	penv = EnvGen.kr(Env.new([0.6, 1, 0], [0, 30], -225),doneAction:2);
	fenv = Env([freq*1.25, freq*1.125, freq], [0.1, 0.5], -4).kr;
	sig = SinOsc.ar(fenv, pi/2) * env;
	sig = Pan2.ar(sig * amp * 3, 0);
	Out.ar(0, sig);
}).add;





(
Pdef(\thisone,
	Pbind(\Instrument,\LT,
		\dur,Pseq([0.25,0.50,0.25],inf),
	)
)
)
;
//////////
Pdef(\thisone).play;
Pdef(\thisone).stop;

1 Like

I am having some issues
I have a Synthdef called \twoop on one tab with it’s Pdef.,
When I execute the Synthdef only and create a new tab with a new Pdef-Pbind that points to the executed synth ( on the other tab) supercollider plays the default synth.
This is strange becasue yesterday I sequenced synthdef from two Pdefs , yet now a new created Pdefs with the correct pointer doesn’t work


This is weird
Here I pasted the whole lot together , Pdef from one tab , resaved ,relaunched SC.and it’s still the default synth playing
No syntax errors

(
SynthDef(\twoop,
{
|fmamt=2,modoffset=24,moatt=0.001,modrel=0.500,ampatt=0.001,amprel=0.800,pitch=48,outt=0.3|
var mod,modenv,ampenv,carr;

   	mod=SinOsc.ar((pitch+modoffset).midicps)*fmamt;
   	modenv=EnvGen.ar(Env.perc(moatt,modrel),doneAction:0);
   	ampenv=EnvGen.ar(Env.perc(ampatt,amprel),doneAction:2);
   	carr=SinOsc.ar(pitch.midicps,(mod*modenv))*ampenv*outt!2;
   	Out.ar(0,carr);
}).add
)
//////////

(
Pdef(\whynot,
   Pbind(\Instrument,\twoop,
   	\dur,0.25,
   	\pitch,Pseq([72,60,71,64,62,48,50,74,55,67,64],inf)-12,
   )
)
)
;
//////////
Pdef(\whynot).play;
Pdef(\whynot).stop;

I think the correct key to use is \instrument. You are using \Instrument (note the capital I)

Oh dear ,why didn’t I get an error in the console view ??

Because this is no syntax error. You can set whatever symbols you like in an event.

Pbind is a mechanism to create events and SuperColliders event to synth (sound) transformation magic expects specific keys and will use default values for those missing.

PS have you checked out Eli Fieldsteels videos on YouTube? He does an excellent job explainging the details and shows some nice ways to work with the code, as in combining snippets into more complex structures.

Yes I have and am still checking out the fantastic ELi’s tuts
Thanks