Creating Noise / Filtering With Matlab FFT for Tap Sound Masking

In summary: The first parameter is the length of the vector, and the second parameter is the power of the noise. To create a sound wave, you can multiply the FFT of the noise by the FFT of the tap sound. However, using the absolute value may result in important data being lost when using the inverse FFT. In summary, to create noise that masks a recorded tapping sound, one can use the MatLab function wgn to generate white noise and then multiply its FFT by the FFT of the tap sound. However, using the absolute value may lead to loss of important data.
  • #1
nicoleisalie
1
0
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.

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 news on Phys.org
  • #2
The function randn will return a value according to the Gaussian distribution specified by the parameters, but I don't think a vector of Gaussian random complex numbers is what you want (m is the length of the vector). The time domain values of the noise should be only real, and the frequency domain representation should be white. In other words, the magnitude of the frequency domain function should be flat or constant.

The MatLab function wgn can be used to create a vector of white noise.
 

1. What is FFT and how is it used for tap sound masking in Matlab?

FFT (Fast Fourier Transform) is an algorithm used to convert time-domain signals into frequency-domain signals. In tap sound masking, FFT is used to analyze the frequency components of a tap sound and create a noise signal with similar frequency components to mask the tap sound.

2. How does creating noise with Matlab FFT help with tap sound masking?

By using FFT to analyze and generate a noise signal with similar frequency components to the tap sound, the noise can effectively mask the tap sound and make it less noticeable to the human ear. This is especially helpful in environments where tap sounds may be distracting or disruptive.

3. What are the steps involved in creating noise with Matlab FFT for tap sound masking?

The first step is to record the tap sound and save it as a .wav file. Next, the FFT function in Matlab can be used to analyze the frequency components of the tap sound. The frequency components can then be used to generate a noise signal with similar frequency components. This noise signal can then be played along with the tap sound to mask it.

4. Are there any limitations or drawbacks to using Matlab FFT for tap sound masking?

One potential limitation is that the quality of the noise signal generated by FFT depends on the quality of the recorded tap sound. If the tap sound has a lot of background noise or is not clear, the resulting noise signal may not effectively mask the tap sound. Additionally, the noise signal may not be effective if the tap sound has a wide range of frequency components.

5. Can Matlab FFT be used for tap sound masking in real-time?

Yes, it is possible to use Matlab FFT for tap sound masking in real-time. This would involve continuously recording the tap sound, analyzing its frequency components with FFT, and generating a noise signal to mask the tap sound. However, this may require a more advanced and efficient implementation of the FFT algorithm to keep up with the real-time processing demands.

Similar threads

  • MATLAB, Maple, Mathematica, LaTeX
Replies
1
Views
1K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
10
Views
2K
Replies
9
Views
1K
Replies
16
Views
4K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
11
Views
3K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
1
Views
2K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
1
Views
735
  • MATLAB, Maple, Mathematica, LaTeX
Replies
5
Views
2K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
1
Views
2K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
1
Views
8K
Back
Top