All times are UTC+02:00




Post new topic  Reply to topic  [ 3 posts ] 
Author Message
PostPosted: Sat Jan 31, 2015 4:18 pm 

Joined: Sun Feb 03, 2013 2:39 pm
Posts: 334
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?


Top
   
PostPosted: Sat Jan 31, 2015 9:32 pm 
User avatar

Joined: Tue Mar 17, 2009 2:56 pm
Posts: 4231
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

_________________
control point
control point2


Top
   
PostPosted: Sun Feb 01, 2015 9:49 am 

Joined: Sun Feb 03, 2013 2:39 pm
Posts: 334
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?


Top
   
Display posts from previous:  Sort by  
Post new topic  Reply to topic  [ 3 posts ] 

All times are UTC+02:00


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Limited