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
NEW REGISTRATIONS - please contact us if you wish to register on the forum
Users are reminded of the forum rules they sign up to which prohibits any activity that violates any laws including posting material covered by copyright
Compressor Peak Detector Design
4 posts
• Page 1 of 1
Compressor Peak Detector Design
.
Last edited by OllieMarshall92 on Mon Jul 24, 2017 12:43 pm, edited 2 times in total.
- OllieMarshall92
- Posts: 16
- Joined: Wed Oct 26, 2011 12:22 pm
Re: Compressor Peak Detector Design
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/
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/
-
martinvicanek - Posts: 1328
- Joined: Sat Jun 22, 2013 8:28 pm
Re: Compressor Peak Detector Design
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
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: 16
- Joined: Wed Oct 26, 2011 12:22 pm
Re: Compressor Peak Detector Design
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
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: 186
- Joined: Tue May 15, 2012 12:42 pm
4 posts
• Page 1 of 1
Who is online
Users browsing this forum: No registered users and 7 guests