Hi there Cabbage Community!
I’m trying to make an LUFS Gain Rider that adjusts the signal’s volume every 4 seconds to match the Target LUFS.
What I’m struggling to figure out is how to add a 2s envelope from the current level to the new adjusted level. Using Interp I was able to get rid of clicking that was originally happening, but I’d still like the transition to the new gain to be longer. I’ve tried every combination of linseg, loopseg, trigLinseg, and logcurve that I can but I just can’t seem to make it work.
Here is my code so far…
ktim timeinsts ktrig init 0 kM,kI,kS lufs ktrig,aL,aR kAdjust init 1 printk 1, kS if kS > -40 && ktim % 4 == 0 then if ampdb(-24)/ampdb(kS) < 3.5 then ;avoid way too loud accidents kAdjust = ampdb(-24)/ampdb(kS) endif endif aAdjust interp kAdjust aL = aL * aAdjust aR = aR * aAdjust kM,kI,kS lufs ktrig,aL,aR printk 1, kS