class:: LagUD
summary:: Exponential lag
categories:: UGens>Filters
related:: Classes/Lag, Classes/Lag2, Classes/Lag3, Classes/Lag2UD, Classes/Lag3UD

description::
This is essentially the same as link::Classes/Lag:: except that you can supply a different 60 dB time for when the signal goes up, from when the signal goes down. This is useful for smoothing out control signals, where "fade in" should be different from "fade out".

classmethods::
method:: ar, kr

argument:: in
input signal.
argument:: lagTimeU
60 dB lag time in seconds for the upgoing signal.
argument:: lagTimeD
60 dB lag time in seconds for the downgoing signal.
argument:: mul
argument:: add

examples::
code::
// used to lag pitch
(
SynthDef(\lagud_help, { |out, freq=300, lagup=1, lagdown=5|
	Out.ar(out,
		SinOsc.ar( // sine wave
			LagUD.kr( // lag the frequency
				freq,
				lagup,
				lagdown
			),
			0, // phase
			0.2 // sine amplitude
		)
	);
}).add;
)

x = Synth(\lagud_help); // create the synth
x.set(\freq, 500); // set the frequency to a higher value (takes 1 second)
x.set(\freq, 100); // set the frequency to a lower value (takes 5 seconds)
x.free;
::
