Stereo Tool
https://www.forums.stereotool.com/

constant speed compressor
https://www.forums.stereotool.com/viewtopic.php?t=5916
Page 1 of 1

Author:  \_/ [ Sat Jan 31, 2015 4:18 pm ]
Post subject:  constant speed compressor

Hi! I want to mimic a very basic compressor with a constant speed envelope follower without smoothing and also constant release speed. How can I do this?
(Note: If I talk about constant speed I actually mean it, i.e. linear time. The online help sometimes seemingly means constant time (= linear speed) when writing constant speed.)
Quote:
[...]
In a compressor we have 2 things: An 'envelope', basically a line that follows the audio level, and the compressor behavior itself. If the level drops a lot, release is faster - and this is based on the envelope. Now, if the envelope just follows sample levels, then there will be a lot of near-0 values (just when a waveform crosses 0) which would cause infinitely fast release behavior. The envelope line needs to be made such that this doesn't happen.

So, say we have a peak at level 1000 (sample value). Then I multiply that by .995 (default 'Base smoothing' value) and the next and previous peak value cannot be lower than that. So, say we get 1000, 0 then I replace it by 1000, 995. That may seem to be a lot, but after 1 ms (44 samples at 44.1 kHz), you're already down to 802. At 4 ms we're at 414. at 8 at 171 etc.
[...]
The first paragraph indicates non-constant release speed. If so, how to stop that? (With constant release speed the described problem should vanish, correct?)
Does the second paragraph mean that the envelope follower is fed with smoothed sample values instead of actual ones? If so, how can I prevent that? Does the envelope follower itself show constant speed behaviour?

Author:  Bojcha [ Sat Jan 31, 2015 9:32 pm ]
Post subject:  Re: constant speed compressor

In current mb you would need "continuous release" But careful with settings! Depend on your ratio and FF-FB settings you need to set "continuous release".
You can use tones and record result. Make sine tone with 5 sec -12dB and 5 sec 0dB and play it. you should get somethings like this http://www.maxfm.rs/bojan_scs/20150131203153964.png

Author:  \_/ [ Sun Feb 01, 2015 9:49 am ]
Post subject:  Re: constant speed compressor

Thanks, Bojcha, that works though I need to do some more tuning.


Regarding what Hans wrote about smoothing:

A simple line follower would be:

level(k) = (1 - alpha)*|sample(k)| + alpha*level(k - 1)

with alpha = exp(-1/(sampling_rate*time_constant)) where time_constant is the attack or release time depending on the current case;

Now since the release time is usually relatively long I don't see any problem with zero crossings, they just make the level drop a little.
Of course replacing sample(k) by some smoothed_sample(k) can give a lesser drop.

So what am I missing here or understanding wrong?

Page 1 of 1 All times are UTC+02:00
Powered by phpBB® Forum Software © phpBB Limited
https://www.phpbb.com/