Noise reduction program

If you have to write a program that takes the microphone input, changes it (sets it out of phase, making 1 0 and 0 1), and plays it back from the speakers, can this cancel the sound? Wave physics says that if the ridges coincide with the troughs, destructive interference occurs, so it can be used to achieve attenuated noise, if not completely canceled. I can imagine that this would not work because of the difficulty in handling the audio, or even because there is too much time to play and play back so that the sound wave passes. If I had to bind the language to do this, it would have to be either C ++ or java (I am at least competent in both).

+4
source share
2 answers

Yes, it cancels the sound. This is more or less how Surround Sound works: subtracting the left / right channels, playing in the third dynamics and inverting the samples, playing from the fourth, you get interesting spatial effects.

Also, you would simply not want to switch all the bits, you would get noise; instead, you want to deny.

With a small buffer, you will be fast enough to cancel waves of certain frequencies. When these attacks and decay, you will be behind, but as long as the wave is supported, you can effectively cancel it.

, , , . , , , .

44,1 , , . 256 , 44100/256 , 256 .

256 256/44100 = 0,0058 5,8 . 340 /, 1,97 (340 * 5,8 ). 172 (44100/256). , , , , "" 5,8 , , " ", .

64 44100/64 = 689 . ! , , .

, 500, 1000 2000 , , , , 500, 1000 2000 , 3500 .

32 , . , , LPT , , Java , , Java (. @zapl ).

, , , , . 3 , . , , : , , , , .

+6

, ++ - 6 . 0,1 , ( , ) , 10 ( ).

0

Source: https://habr.com/ru/post/1616450/


All Articles