Author
Topic: Anti sound generation, how? (Read 604 times)

I would like to create an antisound to cancel out noise of a certain(noisy) device.This is called anti sound or active noise canceling. See: https://en.wikipedia.org/wiki/Active_noise_controlI think on my old Miggy I had a sampler that could create negative sound.

Any suggestions which tool(s) or code I can use to create something like that(for instance a wav sample I can play) ?

When i need specific sounds, i usually capture them myself using a portable microphone, and sometimes the device make a continuous noise during the recording.But using "Wavepad" (sound editor) you can see what is the continous noise and cancel it to output a "clean sound" (without the continous noise)

This is probably not what you want... this is more to remove noises in a sound than to generate an "anti sound"...

I want the peaks converted to lows and lows to peaks, creating the exact opposite of the sound, so that when played together they'll bounce and cancel each other out, resulting in less noise from the device in question(a machine creating a constant noisy sound).

At least that's the theory. I once seen this applied to a garbage truck in a TV science show, which made it much more quiet. Would like to test this.

I want the peaks converted to lows and lows to peaks, creating the exact opposite of the sound, so that when played together they'll bounce and cancel each other out, resulting in less noise from the device in question

then, i suppose that the next step is to study how the .wav sound format is composed and how to read/write it...

record the noise sound, then "invert" it.

Maybe there is something about the wav format in the old blitzbasic forums ?

To cancel the sound (assuming it's a float), just invert the sign (x*-1). If you want to do this in realtime, it harder, because of the delay in the audio stack and because your new inverted sound will still make it's way into the background.Any delay in the processsing, will cause the new sound to be out of phase and will sound like a flange effect. If the sound was very periodic and very stable (like an idling car engine), you can use some kind of autocorrelation the predict the next sound sample and try to cancel that, but it would probably need to be tuned.

removing a monotonous sound shouldn't be too difficult. You might already have the capability on your computer. On mine, under the microphone's properties, I have an option "Noise Suppression" which will help reduce background noise. Some drivers will even let you control which frequencies to filter out.

If you wish to do it in software, just do a Fourier transform on the incoming wave, remove the offending frequency, then transform back into the wave.

If you are trying to remove sounds that are not consistent, such as nearby traffic or office noises, then it is a bit more difficult. You would need something that can analyze the waveform and determine which noises are not part of the active recording, then remove those noises.

Interesting stuff, but not really what I'm after. I just need to simply be able to create an inverted sample, not reversed horizontally but vertically if where talking visual wave representation.

I've already seen it in action so I know it works really well for sounds produced by certain machines.

The one I've seen was on a university project, way back in the 90's. It was used on a traditional style garbage truck, which was suddenly very quiet in comparison to before application. Now I want to use this on a very monotonous noise so should work fine by just playing the opposite, or negative if you like, of the original sound sample in a loop, breaking up the sound waves, resulting in much less sound emission(not zero, for it's of course digital vs analog waves).