Beginner Question About Samples, Speed, Latency and Lookahead
Hi all, I'm getting into M4L and i wanted to know:
Say I want to build a super simple comp/limiter/volume device. It needs to read the current gain and if the gain is above >-6 then it will lower the gain to -6. No other controls or parameters.
Does this mean that every sample(according to the samplerate) will be checked and every sample >-6 db will have an altered lower gain?
Is there a 'speed' issue? Or does the processing happens instantaneously for every sample? Or does a lookahead function needs to be inplemented?
Are any artifacts are to be expected with such processing?
And additional info or notes for whatever is outside my scope here would bw welcome.
Thanks ya'll 👍
are you asking how to build it?
then the answer is probably no. for peak amp history you would only check which was the highest sample value during the last 20 or 80 milliseconds.
for sample-wise you would not need to analyze anything at all, you could use clip~ or minmax~, which do nothign but performing a math function on each sample.
that is basically the difference between a clipper and a limiter...