All times are UTC+02:00




Post new topic  Reply to topic  [ 1012 posts ]  Go to page Previous 113 14 15 16 17102 Next
Author Message
PostPosted: Wed Jan 23, 2013 10:19 pm 
Site Admin
User avatar

Joined: Mon Mar 17, 2008 1:40 am
Posts: 11425
@GAP: This is more or less what I did I think.. But my issue is this:

If I calculate the gain to reach the threshold level, and then - using attack and release - move towards that gain, and the gain cannot be above 1, then the release will be slower than it should be - we're already almost there so move really slow. So, the release behavior is different near the threshold - and the area in which it is different gets bigger when you use Knee.

Hm... When typing this I just realized that this could also mean that my release shape is incorrect. Actually, it probably is... Attack shape too. Am I right that I should calculate attack and release in the dB domain, instead of absolute values?

For release I'm currently doing this: x = 1 - (1 - x) * factor.
I'm now thinking that this should be: x = 10 ^ (log(x) + factor * (log(target) - log(x)))
And something similar for attack. Can you confirm this?

This will still give different release behavior at different levels in Feedback mode though.



EDIT: Never mind. I implemented release this way, the waveform looks better I think - or maybe not... Will post new version later tonight!


Top
   
PostPosted: Thu Jan 24, 2013 4:05 am 
User avatar

Joined: Wed Jun 16, 2010 4:30 pm
Posts: 600
Location: Buenos Aires, Argentina
I think everyone should do the calculation in either domain, if you work with should convert the input dB to dB (20 log (x)) (No! 10 log (x), there is an error, 10 is used for power and 20 for signal levels). And the handling of the gain is realized with addition or subtraction of values ​​in dB, instead of multiplying if you used linearly.

The behavior of the Attack and Release, you should not change depending on where you are, you should always be a charge or discharge curve of a capacitor (which is normal).

The question is, using knee where the threshold? 1:1 longer when the curve or knee in the middle of?

I let some other links that can help (... or not) :)

http://ses.library.usyd.edu.au/bitstrea ... ession.pdf
http://musicdsp.org/archive.php?classid=0#169
http://www.cdactvm.in/Real%20time%20Dyn ... 20Bett.pdf

_________________
by GAP
"Less is More" (Bob Katz)


Top
   
PostPosted: Thu Jan 24, 2013 11:11 am 
Site Admin
User avatar

Joined: Mon Mar 17, 2008 1:40 am
Posts: 11425
BETA018:
Stand alone: http://www.stereotool.com/download/ster ... 04-018.exe
Winamp DSP: http://www.stereotool.com/download/dsp_ ... 04-018.exe
VST: http://www.stereotool.com/download/vst_ ... 04-018.dll

Now switchable between dB mode (which should be the correct behavior) and the old mode (which DOES behave differently, probably means that I implemented it incorrectly...). At the time that you set for both attack and release the level is the same in both implementations.

Also there's a new 'Knee on target" switch. If you enable that the knee is done on the (wanted) gain that's calculated all the time, and attack and release can move there then. This is how Sonitus does it I think, basically it causes the release to be slower near a gain of 1 in feedback mode. The other mode performs the knee calculation on the signal that's used to adjust the level - release is always equally fast; use Knee to round off the abrupt stopping of the release when a gain of 1 is reached.

@gpagliaroli: I removed the *20 from the calculation because it would be 10 ^ ((20*log(a) + f * (20*log(b) - 20*log(a)) ) / 20); the 20's cancel each other out.


Top
   
PostPosted: Thu Jan 24, 2013 11:52 am 
Site Admin
User avatar

Joined: Mon Mar 17, 2008 1:40 am
Posts: 11425
Small remark: "Knee on target" does NOT only affect the knee, but also threshold and ratio! If you enable this, release will always end smoothly. If you disable it, release can end abruptly, using knee helps here.


Top
   
PostPosted: Thu Jan 24, 2013 11:55 am 
Site Admin
User avatar

Joined: Mon Mar 17, 2008 1:40 am
Posts: 11425
Quote:
This is indeed VERY interesting (and different from what I do!):
Code:
        // dynamic selection: attack or release?
        double  theta = rms > env ? att : rel;

        // smoothing with capacitor, envelope extraction...
        // here be aware of pIV denormal numbers glitch
        env = (1.0 - theta) * rms + theta * env;

        // the very easy hard knee 1:N compressor
        double  gain = 1.0;
        if (env > threshold)
            gain = gain - (env - threshold) * slope;

Edit: Ok, got it now. Current code is wrong. I'm calculating attack and release on the gain! Will fix it... Again.. :(


Top
   
PostPosted: Thu Jan 24, 2013 12:51 pm 
Site Admin
User avatar

Joined: Mon Mar 17, 2008 1:40 am
Posts: 11425
Implemented now. Will post a new version after lunch. Behavior is slightly different - I'm just not sure if I'm too happy about the Attack behavior (release is fine).


Top
   
PostPosted: Thu Jan 24, 2013 1:28 pm 
User avatar

Joined: Wed Jun 16, 2010 4:30 pm
Posts: 600
Location: Buenos Aires, Argentina
Quote:
@gpagliaroli: I removed the *20 from the calculation because it would be 10 ^ ((20*log(a) + f * (20*log(b) - 20*log(a)) ) / 20); the 20's cancel each other out.
Ok, understood! ;)

_________________
by GAP
"Less is More" (Bob Katz)


Top
   
PostPosted: Thu Jan 24, 2013 1:31 pm 
User avatar

Joined: Wed Jun 16, 2010 4:30 pm
Posts: 600
Location: Buenos Aires, Argentina
Quote:
Implemented now. Will post a new version after lunch. Behavior is slightly different - I'm just not sure if I'm too happy about the Attack behavior (release is fine).
hope this new release! ;)
A query, you are using look-ahead at the compressor?

_________________
by GAP
"Less is More" (Bob Katz)


Top
   
PostPosted: Thu Jan 24, 2013 1:39 pm 
Site Admin
User avatar

Joined: Mon Mar 17, 2008 1:40 am
Posts: 11425
Ok, so I'm guessing that this version has the correct attack and release behavior. Attack and release are now calculated on the envelope instead of on the gain, which has 2 effects:
- Different response shape
- Attack and release continue till far outside the area where compression occurs (envelope can go down all the way to 0), so the result of Attack might not be immediately (or at all) visible.
- Knee is now ALWAYS done on the calculated gain, so I removed the 'Knee on Target' setting.

Stand alone: http://www.stereotool.com/download/ster ... 04-019.exe
Winamp DSP: http://www.stereotool.com/download/dsp_ ... 04-019.exe


Note: I could clip the envelope above the start of the knee. That would fix the slow attack response.


Top
   
PostPosted: Thu Jan 24, 2013 1:46 pm 
Site Admin
User avatar

Joined: Mon Mar 17, 2008 1:40 am
Posts: 11425
Quote:
A query, you are using look-ahead at the compressor?
No, not yet. But the RMS smoothing algorithm should reduce the need for one.


Top
   
Display posts from previous:  Sort by  
Post new topic  Reply to topic  [ 1012 posts ]  Go to page Previous 113 14 15 16 17102 Next

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