Forums

newbie: What is sound & how to invert it.

Started by news August 2, 2004
Hi,

I am a programmer and recently got interested in the mechanics of a sound.
Here is what i have done till now and will need your help to proceed from
there.
I am capturing sound from my microphone.

And now I need to send out it's inverse( sort of 'noise cancellation' - but
I am aware of the difficulties with noise cancellation). WHAT I am trying to
understand is what is meant by 'inverse' sound. Basically since I am
capturing a bunch of numbers( wave signal ) - How can i invert them ??? I do
not really comprehend it.

Thanks for any help.
y.


news wrote:
> Hi, > > I am a programmer and recently got interested in the mechanics of a sound. > Here is what i have done till now and will need your help to proceed from > there. > I am capturing sound from my microphone. > > And now I need to send out it's inverse( sort of 'noise cancellation' - but > I am aware of the difficulties with noise cancellation). WHAT I am trying to > understand is what is meant by 'inverse' sound. Basically since I am > capturing a bunch of numbers( wave signal ) - How can i invert them ??? I do > not really comprehend it. > > Thanks for any help. > y. > >
You want the additive inverse, i.e. the negative of the sound at the microphone. Simple negation is easy; you just stick in a minus sign. It's finding the signal to stick the minus sine in front of that's the challenge. -- Tim Wescott Wescott Design Services http://www.wescottdesign.com
news wrote:

> Hi, > > I am a programmer and recently got interested in the mechanics of > a sound. Here is what i have done till now and will need your help > to proceed from there. > I am capturing sound from my microphone. > > And now I need to send out it's inverse( sort of 'noise > cancellation' - but I am aware of the difficulties with noise > cancellation). WHAT I am trying to understand is what is meant by > 'inverse' sound. Basically since I am capturing a bunch of > numbers( wave signal ) - How can i invert them ??? I do not really > comprehend it. > > Thanks for any help. > y.
As Tim said, the inverse is '(-1) * signal', as you would have expected, since you're a programmer. However, if you try to cancel the original sound with one captured with the microphone, you'll certainly end up with little success. There are different reasons behind, but most certainly you'll have to deal with these: 1) Capturing the signal with the microphone delays the signal - your inverse signal is always too late and cannot cancel the original. You're lucky, if you can delay the original signal before mixing it with the inverse. 2) If your microphone captures signal from different sources, the different sounds need different time to travel to your microphone. If you add an inverse signal to a speaker, it would again need different times to travel to different locations. At best, you would notice considerably lower sound level at one or a few spots. Other locations would reveal even higher sound level. Your keyword is 'phase': Imagine two identical sine waves travelling from left to right. Shift the one to the right and watch the sum of both levels: shifting it half of a period will give you optimal suppression, shifting it another half of a period will give double amplitude. Does this help? Bernhard