Old code no sound

Hi everyone, the following code doesn’t make any sound anymore.
I haven’t changed anything.

If anyone has a clue, the post window shows no errors.

(

Ndef(\whiteshaker, {|freq 10 mul 100|
	var snd, lfo, sine;

	lfo = LFNoise2.kr(0.3);
	sine = SinOsc.ar(freq, 0, mul);
	sine = sine * sine.range(\min.kr(20), \max.kr(2000));
	snd = BLOsc.ar(sine.lag(0.1), 0.5, \waveform.kr(0));
	snd = AnalogPhaser.ar(snd, sine, 1, 0.9, 0.1).tanh;
	// snd = HPF.ar(snd, 500);
	snd = Pan2.ar(snd, lfo/2);
	snd = snd / (freq/100) / 5 * \amp.kr(1);
	// snd = Sanitize.ar(snd);
}).play;

)

the problem is that when sine is negative, BLOsc.ar(sine.lag(0.1), 0.5, \waveform.kr(0)); outputs nan

if for example you change the second line to:
sine = SinOsc.ar(freq, 0, mul).unipolar;

you will hear sound again.

to debug remember to try adding .poll to various lines to see what’s happening!

1 Like

aha thanks a pile
~~

1 Like