I copied something from the web to get acquinted with pdefs
For some reason when executing the temp clock, all I hear is a faint zooming in the background , the instrument plays fine when executed separately .
The Synthdef output assignement is different because the person was using soundflower to record it.
The code shown in the screensho was enough to get the pdef running ,except mine
Edit , changed some syntax erros , but still no luck
(
SynthDef(\hat,
{
|amp,atk,dec|
var sig;
sig=WhiteNoise.ar();
sig=HPF.ar(sig,6000);
sig=sig*EnvGen.ar(Env.perc(atk,dec),doneAction:Done.freeSelf);
sig=sig*amp!2;
Out.ar(0,sig)
}).add;
)
///
Synth(\hat,[\amp,0.1,\atk,0.001,\dec,0.111]);
~clock=TempoClock(90.0 / 60.0).permanent_(true);
(
Pdef(\hats,Pbind(
\instrument, \hat,
\amp,0.1,
\atk,0.001,
\dec,0.1,
\dur,0.25
));
)
Pdef(\hats).play(~clock);