Changing direction of LFO

Hello list,

I am modulating the delay time of a sine wave but how can I invert the direction of the LFO without causing the delay time to jump to a new value, causing a click?

I want the delay time to be able to change direction, resuming from the current delay value.

I have the feeling that the phase is involved, but simply offsetting it by pi doesn’t do the trick.

(
SynthDef(\sine,
	{|phase=0|
		var sine = SinOsc.ar(440);
		var delay = DelayC.ar(sine, 1, SinOsc.kr(0.001, phase).exprange(0.01, 0.7).poll);
		Out.ar(0,[sine, delay] )
	}
).add
)

x.set(\phase, 0)
x.set(\phase, pi) // not working

I solved it.

All I need to do is change the LFO frequency to negative. Phase is not involved.

Have you tried multiplying the freq by negative 1?

/*
Josh Parmenter

www.realizedsound.net/josh

*/