Pseq not sequencing all notes

Can someone explain me why the pseq is playing only the first 4 notes and not all 7?

//1. load synthdef
(
SynthDef.new(\sine3, {
	arg freq=440, atk=0.005, rel=0.3, pan=0, amp=1;
	var sig, env;

	sig = SinOsc.ar(Saw.kr(freq).exprange(freq, freq*2));
	env = EnvGen.kr(Env.new([0,1,0],[atk,rel],[1,-1]),doneAction:2);
	sig = Pan2.ar(sig, pan, amp);

	// reverb
	sig = FreeVerb.ar(sig, 0.6, 0.9, 0.9);

	sig = sig * env;
	Out.ar(0, sig);
}).add;
)

//2. load/start tempo
t = TempoClock.new(60/60).permanent_(true).schedAbs(0, {t.beatsPerBar_(4) });

//3. start pbind
(
p =  Pbind(
	\instrument, \sine3,
	\dur, 1.0,
	\degree, Pseq([0, 1, 3, 4, 5, 7, 9], inf),
	\atk, Pwhite(1.0, 2.0, inf),
	\rel, Pwhite(3.0, 6.0, inf),
	\pan, Pwhite(-0.8, 0.8, inf),
);
z = p.play(t, quant: 0);
)

Would you mind posting the code as text, with code tags?

```
your code here
```

By posting a screenshot, you’re asking people who might help you to type the code by hand (or to find a free OCR website). Maybe somebody will, but I’ll pass on that. You’ll get more and better help by making it easier for other readers to copy/paste.

In any case – you’re running the frequency modulator (Saw) at control rate. The effective sample rate of Saw.kr is the server’s sample rate divided by the control block size. With default settings, that’s either 44100/64 = 689.0625 Hz, or 48000/64 = 750 Hz.

Saw is a band limited sawtooth. “Band limited” for sampled signals means that the frequency can go up only to half the sampling rate. So the maximum frequency that Saw.kr can handle is about 350 Hz and change. This is roughly E above middle C, so your scale degree 3 (F above middle C) is already pushing the limit.

So, two suggestions: 1. If the modulator needs to be this fast, use .ar(). 2. For a modulator signal, you usually don’t want the Gibbs effect wiggling that you get with band limited oscillators – so try LFSaw.ar instead.

hjh

2 Likes

im dumb :man_facepalming:
thks for explaining!
(i re-edited the post to include the code, although it is of no use anymore but just in case)