Making progress with the pdef, pbind stuff , verry amusing
Here I created a simple 2 osc synth , the frequency is an argument , and it’s sequenced from the pseq \degree
I want the second osc. to be a fifth higher ,
I tried using a midi note number followed by.midicps but then the pseq \degree messes things up
I also don’t understand why the pseq degree only works when the argument in the synthdef is frequency , if I use another name arg name (for pitch freq) , degree doesn’t work .
Is this by convention ?
(
SynthDef (\simple,
{
arg att=0.001,dec=0.200,mod=500,freq=0,filterfreq=400;
var sig,env;
env=EnvGen.ar(Env([0,1,0],[att,dec],[0,-5]),doneAction:2);
sig=Pulse.ar(freq,mul:0.5)+Saw.ar(freq+7,mul:0.5);///////I an
sig=RLPF.ar(sig,filterfreq+(env*mod).clip(40,20000),rq:0.2);
sig=sig*env!2;
Out.ar(0,sig)
}).add
)
;
(
Pdef(\qwe,
Pbind(\instrument,\simple,
\dur,Pseq ([0.12,0.25,0.12,0.25,0.5,0.25,0.12,0.25],inf),
\degree,Pseq([-12,-7,-12,-5,0,-7,-12,-5,-9,2],inf),
\filterfreq,Pseq([800,1000,400,300,2000,100,3000],inf),
\dec,Pseq([0.125,1.1,0.250,0.064,0.500],inf),
).play
)
)
/////