I am trying to create noise that has similar spectral properties of a recorded tapping sound (so that I can mask the tapping sound). I was thinking that if I generate noise, and then multiply the fft of the noise by the fft of the tap sound, it would sort of "filter" the noise to the desired fft.(adsbygoogle = window.adsbygoogle || []).push({});

First off, I'm not 100% sure on how to create the noise. I am currently using:

noise=complex(randn(m, 1), randn(m, 1)*sqrt(p/2)

because I found an example online. I'm not really sure if this is white gaussian noise, or what. I'm also not sure what the m and p are.

Secondly, if I use abs(fft(noise)) and then multiple that by the abs(fft(TapSound)), I get the desired fft that I want (I think...?). but then if I use ifft to get back to the sound wave, won't that be missing important data because I used an absolute value?

Any help you can give me would be appreciated. Thank you!

**Physics Forums | Science Articles, Homework Help, Discussion**

Join Physics Forums Today!

The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

# Noise Filter In Matlab

**Physics Forums | Science Articles, Homework Help, Discussion**