I
I
Ivan2011-07-12 14:59:16
Audio
Ivan, 2011-07-12 14:59:16

How to remove loud sounds from the audio stream and amplify quiet ones in real time?

What algorithm can be used for such a problem?
The task is this - does the sound from the microphone (in digital form) go to the input of the module? there is somehow processed, and goes to the output.
Question: what algorithm to use? Can someone tell me the source code for the implementation of such an algorithm. Preferably in objective-c or C++.

Answer the question

In order to leave comments, you need to log in

3 answer(s)
W
WebSpider, 2011-07-12
@WebSpider

Perhaps you will find something here
www.musicdsp.org/archive.php?classid=4#204

F
Fastto, 2011-07-12
@Fastto

What you are looking for is called the AGC algorithm (automatic gain control)
In the simplest case, you can implement it like this:
1) calculate the moving average of the level - for example, in 1/10 of a second
2) if the calculated level is less than the minimum allowable, increase the module gain by a certain step, otherwise if the level is more than the maximum allowable, we reduce it by a certain step
3) go to 1)
there are a lot of links

E
Edro, 2011-07-14
@Edro

Fast Fourier Transform - attenuation of harmonics above the desired level - inverse FFT - amplification by normalizing the volume level

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question