VarLag freezes input

Hi everyone,

I’m experiencing some problems with VarLag, which doesn’t change at all and simply freezes on what appears to be the first value of its input. For example:

(Running 3.13-rc1 on Ubuntu)

(
{
	var input = LFNoise1.kr(0.5, 50, 100).poll(label: \input);
	var varlag = VarLag.kr(input, 0.1).poll(label: \varlag);
}.play
)

produces:

input: 142.476
varlag: 143.096
input: 141.864
varlag: 143.096
input: 141.251
varlag: 143.096
input: 140.639
varlag: 143.096
input: 140.027
varlag: 143.096
input: 139.415
varlag: 143.096
input: 138.802
varlag: 143.096
input: 138.19
varlag: 143.096
input: 137.578
varlag: 143.096
input: 136.966
varlag: 143.096
input: 136.354
varlag: 143.096

It works with warp: \linear, but with other parameter settings, including the default, it keeps producing the same intial output value.

Cheers,
Luc

VarLag is really meant for stairstep signals, not continuously changing ones.

You can fake it like this:

(
{
	var input = LFNoise1.kr(0.5, 50, 100).poll(label: \input);
	var trig = Impulse.kr(ControlRate.ir * 0.5);
	var varlag = VarLag.kr(Latch.kr(input, trig), 0.1).poll(label: \varlag);
}.play
)

(Hint: VarLag is a real UGen for linear, but it’s an EnvGen for all other curvatures… now think about, what is the fastest possible rate at which an EnvGen can be triggered?)

hjh