LagUD exponential lag

LagUD.ar(in, lagTimeU, lagTimeD, mul, add))

LagUD.kr(in, lagTimeU, lagTimeD, mul, add))

This is essentially the same as 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".

See also Lag

in - input signal

lagTimeU - 60 dB lag time in seconds for the upgoing signal.

lagTimeD - 60 dB lag time in seconds for the downgoing signal.

( // used to lag pitch

SynthDef( \lagud_help,

{ arg freq=300,lagup=1, lagdown=5;

Out.ar( 0,

SinOsc.ar( // sine wave

LagUD.kr( // lag the frequency

freq,

lagup,

lagdown

),

0, // phase

0.2 // sine amplitude

)

);

}).send(s);

)

x = Synth.new( \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;