Support

If you have a problem or need to report a bug please email : support@dsprobotics.com

There are 3 sections to this support area:

DOWNLOADS: access to product manuals, support files and drivers

HELP & INFORMATION: tutorials and example files for learning or finding pre-made modules for your projects

USER FORUMS: meet with other users and exchange ideas, you can also get help and assistance here

Compressor Peak Detector Design

DSP related issues, mathematics, processing and techniques

Compressor Peak Detector Design

Postby OllieMarshall92 » Mon Nov 14, 2016 10:58 am

.
Last edited by OllieMarshall92 on Mon Jul 24, 2017 12:43 pm, edited 2 times in total.
OllieMarshall92
 
Posts: 14
Joined: Wed Oct 26, 2011 12:22 pm

Re: Compressor Peak Detector Design

Postby martinvicanek » Mon Nov 14, 2016 7:02 pm

Hi Ollie,

the generic formula for a one-pole filter coefficient a is

a = exp[-1/(t*Fs)]

where t is the attack or release time (in seconds) and Fs is the sample rate (in cycles per second). You want to have separate control of attack and release, so you would have two time constants denoted by tA and tR, say, and two filter coefficents given by

aA = exp[-1/(tA*Fs)]

aR = exp[-1/(tR*Fs)]

You set the values of tA and tR using sliders (as opposed to your code example, where you set t = 1 - 1/e). In the simplest case, you can configure the attack slider range to go from tAmin to tAmax (and accordingly for the release) and use its output directly.

That, however, may not be the best choice, refer to http://flowstone.guru/blog/mapping-of-c ... arameters/
User avatar
martinvicanek
 
Posts: 1122
Joined: Sat Jun 22, 2013 8:28 pm

Re: Compressor Peak Detector Design

Postby OllieMarshall92 » Tue Nov 15, 2016 9:46 am

Hi martinvicanek,

Thanks for the reply, I will start with what you have suggested then look at mapping them so they feel right.

Cheers!

Ollie
OllieMarshall92
 
Posts: 14
Joined: Wed Oct 26, 2011 12:22 pm

Re: Compressor Peak Detector Design

Postby Rocko » Wed Nov 23, 2016 3:31 pm

Hi,

I also invite you to look up my 'K5' compressor and explanation. It is RMS based but it provides an answer to your question:

http://www.dsprobotics.com/support/viewtopic.php?f=3&t=5895
Rocko
 
Posts: 184
Joined: Tue May 15, 2012 12:42 pm


Return to DSP

Who is online

Users browsing this forum: No registered users and 11 guests

cron