The following code just plays one note every second and doesn’t play the Pseq midi properly. I have another Synthdef (ax) that works fine but is written slightly different. I’m not sure what I’m doing wrong in the ‘sinx’ Synthdef
//not working as expected
(
SynthDef.new(\sinx, {
arg freq = 300;
var sig;
sig = SinOsc.ar(freq, 0.0, 1, 0.0) * EnvGen.kr(Env.perc, doneAction:2);
Out.ar(0, sig);
}).add;
)
(
Pbind(
\instrument, \sinx,
\midinote, Pseq([4, 3, 59, 43], inf),
\dur, Pseq([0.5, 0.25, 0.50, 1], inf)
).play;
)
// this works though
(
SynthDef.new(\ax, { |out, freq=200|
Out.ar(out,
Saw.ar(freq + LFNoise0.kr([6, 6]).range(100, 105)) * XLine.kr(0.5, 0.1, 1, doneAction:2)
)
}).add;
)
(
Pbind(
\instrument, \ax,
\midinote, Pseq([4, 3, 59, 43], inf),
\dur, Pseq([0.5, 0.25, 0.50, 1], inf)
).play;
)