DSPRelated.com
Forums

Filters / Audio envelope

Started by Luis Fernando July 7, 2004
Hello

I'm new with DSPs (2 weeks) and got to make some easy effects like
delay/reverb/flanger and some simple IIR/FIR implementation

Now I was reading about making a compressor and my first thought was
to use RMS, but I heard about audio envelope.

The book I'm reading explains the formula, but doesn't tell much.
Anyone know where I can find more sources?

I don't understand how a lowpass filter (that's related to frequency)
will help determining the amplitude.

I also would like to know if there's an easy way to make a filter that
gives a, for example, 6 dB gain to some frequencies. Since all filters
I tried really drop the other frequencies, I just can think about
using a "hard" filter to really cut other frequencies and then sum it
with the input (with some coefficients determining the gain)... Is
there other ways?

Some books/sites you do recommend? ;)

Thanks in advance for any help,
Luis Fernando
First of all, I wouldn't consider those effects easy, especially reverb!

OK, now I'll tackle a few of your questions:

1. Regarding IIR filters, there are several common audio biquad (2nd order)
filters such as shelving, peaking, and high/low pass.  Check out
http://www.harmony-central.com/Computer/Programming/Audio-EQ-Cookbook.txt for
straightforward formulas for each of these.  These model the standard filters
used in analog audio electronics.  If your not familiar with these filter types,
try a google search for more information.

2. Regarding compressors, a smoothed RMS level _is_ the audio envelope.  And
smoothed really means low pass filtered.  If you use a low pass filter on
regular data, it just cuts out the high frequencies.  But if you use it on the
absolute value or RMS level of the data (so the input data is always positive),
you will get an envelope suitable to use for a compressor.  The idea is to
filter out the short-term variation and keep the overall slowly-varying
amplitude shape.

"Luis Fernando" <wavebox@wavebox.com.br> wrote in message
news:fb78d2e7.0407070730.6ac162d1@posting.google.com...
> Hello > > I'm new with DSPs (2 weeks) and got to make some easy effects like > delay/reverb/flanger and some simple IIR/FIR implementation > > Now I was reading about making a compressor and my first thought was > to use RMS, but I heard about audio envelope. > > The book I'm reading explains the formula, but doesn't tell much. > Anyone know where I can find more sources? > > I don't understand how a lowpass filter (that's related to frequency) > will help determining the amplitude. > > I also would like to know if there's an easy way to make a filter that > gives a, for example, 6 dB gain to some frequencies. Since all filters > I tried really drop the other frequencies, I just can think about > using a "hard" filter to really cut other frequencies and then sum it > with the input (with some coefficients determining the gain)... Is > there other ways? > > Some books/sites you do recommend? ;) > > Thanks in advance for any help, > Luis Fernando
Thanks for the answer

about the reverb, it was a mistake. In fact I just implemented delay,
echo, flanger and chorus, following the algorithms of my book

1. I'll read this text after I send this message ;)

2. Nice
Couldn't think about that

Do you know how can I find the coefficients for the filters in that
case?

Thanks again


"Jon Harris" <goldentully@hotmail.com> wrote in message news:<2l2plaF7roskU1@uni-berlin.de>...
> First of all, I wouldn't consider those effects easy, especially reverb! > > OK, now I'll tackle a few of your questions: > > 1. Regarding IIR filters, there are several common audio biquad (2nd order) > filters such as shelving, peaking, and high/low pass. Check out > http://www.harmony-central.com/Computer/Programming/Audio-EQ-Cookbook.txt for > straightforward formulas for each of these. These model the standard filters > used in analog audio electronics. If your not familiar with these filter types, > try a google search for more information. > > 2. Regarding compressors, a smoothed RMS level _is_ the audio envelope. And > smoothed really means low pass filtered. If you use a low pass filter on > regular data, it just cuts out the high frequencies. But if you use it on the > absolute value or RMS level of the data (so the input data is always positive), > you will get an envelope suitable to use for a compressor. The idea is to > filter out the short-term variation and keep the overall slowly-varying > amplitude shape. > > "Luis Fernando" <wavebox@wavebox.com.br> wrote in message > news:fb78d2e7.0407070730.6ac162d1@posting.google.com... > > Hello > > > > I'm new with DSPs (2 weeks) and got to make some easy effects like > > delay/reverb/flanger and some simple IIR/FIR implementation > > > > Now I was reading about making a compressor and my first thought was > > to use RMS, but I heard about audio envelope. > > > > The book I'm reading explains the formula, but doesn't tell much. > > Anyone know where I can find more sources? > > > > I don't understand how a lowpass filter (that's related to frequency) > > will help determining the amplitude. > > > > I also would like to know if there's an easy way to make a filter that > > gives a, for example, 6 dB gain to some frequencies. Since all filters > > I tried really drop the other frequencies, I just can think about > > using a "hard" filter to really cut other frequencies and then sum it > > with the input (with some coefficients determining the gain)... Is > > there other ways? > > > > Some books/sites you do recommend? ;) > > > > Thanks in advance for any help, > > Luis Fernando
Sophocles Orfanidis "Introduction to Digital Signal Processing" covers
this in depth. Also, there's plenty of information on
http://www.musicdsp.com. If you're doing this for fun (or learning)
you should try to figure out as much as possible for yourself.

--smb

wavebox@wavebox.com.br (Luis Fernando) wrote in message news:<fb78d2e7.0407070730.6ac162d1@posting.google.com>...
> Hello > > I'm new with DSPs (2 weeks) and got to make some easy effects like > delay/reverb/flanger and some simple IIR/FIR implementation > > Now I was reading about making a compressor and my first thought was > to use RMS, but I heard about audio envelope. > > The book I'm reading explains the formula, but doesn't tell much. > Anyone know where I can find more sources? > > I don't understand how a lowpass filter (that's related to frequency) > will help determining the amplitude. > > I also would like to know if there's an easy way to make a filter that > gives a, for example, 6 dB gain to some frequencies. Since all filters > I tried really drop the other frequencies, I just can think about > using a "hard" filter to really cut other frequencies and then sum it > with the input (with some coefficients determining the gain)... Is > there other ways? > > Some books/sites you do recommend? ;) > > Thanks in advance for any help, > Luis Fernando
Sophocles Orfanidis "Introduction to Digital Signal Processing" covers
this in depth. Also, there's plenty of information on
http://www.musicdsp.com. If you're doing this for fun (or learning)
you should try to figure out as much as possible for yourself.

--smb

wavebox@wavebox.com.br (Luis Fernando) wrote in message news:<fb78d2e7.0407070730.6ac162d1@posting.google.com>...
> Hello > > I'm new with DSPs (2 weeks) and got to make some easy effects like > delay/reverb/flanger and some simple IIR/FIR implementation > > Now I was reading about making a compressor and my first thought was > to use RMS, but I heard about audio envelope. > > The book I'm reading explains the formula, but doesn't tell much. > Anyone know where I can find more sources? > > I don't understand how a lowpass filter (that's related to frequency) > will help determining the amplitude. > > I also would like to know if there's an easy way to make a filter that > gives a, for example, 6 dB gain to some frequencies. Since all filters > I tried really drop the other frequencies, I just can think about > using a "hard" filter to really cut other frequencies and then sum it > with the input (with some coefficients determining the gain)... Is > there other ways? > > Some books/sites you do recommend? ;) > > Thanks in advance for any help, > Luis Fernando