Page 2 of 2

Re: Lookahead limiter

PostPosted: Sun Sep 11, 2016 2:43 pm
by nmakinen
KG_is_back wrote:Yes, it can be modified to calculate min, max and sum (average=sum/bufferSize).

Nice! So if you calculate the average of the buffer after "max from buffer" twice with half the window size, you should end up with a very smooth, accurate and cpu-efficient lookahead curve, as far as I'm concerned.

KG_is_back wrote:At the moment, the algorithm is implemented in a way, that buffer-size is fixed (determined at the first sample). To change toe buffer-size you need to reset the stream (with clear-audio prim) which clears all the buffers and data is lost in the process. I can modify the algorithm to have adjustable buffer-size on the fly, but it will be slightly less efficient. Originally I thought this fixed-size would not be an issue.

Oh, I didn't realize this. So it's really not a bug then, my bad!

In some cases you might want to change the buffer size on the fly without the glitches you get from the clear audio prim (e.g. automation), but generally speaking this is just a cosmetic thing, so clear audio does the trick just fine. Thanks!

Re: Lookahead limiter

PostPosted: Mon May 16, 2022 1:09 pm
by Walter Sommerfeld
KG_is_back wrote:
nmakinen wrote:could the algorithm above be modified to calculate the average of the buffer as well?

Yes, it can be modified to calculate min, max and sum (average=sum/bufferSize).

nmakinen wrote:There still seems to be a minor issue. Sometimes when you change the window size on the fly when audio is put through, it loses all the information below a certain level (which seems to be random every time). Hard to explain, so I've attached an image about the problem.


At the moment, the algorithm is implemented in a way, that buffer-size is fixed (determined at the first sample). To change toe buffer-size you need to reset the stream (with clear-audio prim) which clears all the buffers and data is lost in the process. I can modify the algorithm to have adjustable buffer-size on the fly, but it will be slightly less efficient. Originally I thought this fixed-size would not be an issue.


Hello KG...

Cry for help here:
I need this in the 'min' version for determin the Dynamic Loudness in LU.
I'm inexperienced in ASM coding - so please hava a look...

Thanks again
Walter

Re: Lookahead limiter

PostPosted: Mon May 16, 2022 4:56 pm
by martinvicanek
3 years since KG's last post. :( Not sure if he's (hopefully) coming back some time. :?:
@Walter: Do you just need a sliding min instead of sliding max, or are you referring to the "change of window size on the fly"?

Re: Lookahead limiter

PostPosted: Mon May 16, 2022 8:02 pm
by Walter Sommerfeld
Hi Martin,

i didn't realize that he is ghosting like me for a long time...

Yup - I just need a sliding min instead.

Cheers
Walter

Sliding Window Max/Min

PostPosted: Tue May 17, 2022 10:06 am
by martinvicanek
Here you go!

Re: Lookahead limiter

PostPosted: Tue May 17, 2022 10:38 am
by Walter Sommerfeld
Awesome Martin,

thanks again for this quick solution :)

Have a nice week!
Walter