1
$\begingroup$

I am using an FFT/iFFT library in c#, and working with arrays of audio & complex data.

What I am hoping to do is take a small amount of 'background' audio signal, and use it as a fingerprint to subtract that background signal content from another 'real' signal.

The fingerprint (F) piece of signal is an FFT transform of audio 1 window size in samples. The 'real' (R 1..n) signal is a series of FFT transforms of many windows.

this is essentially how I understand things after trying to figure it out with a text editor, some basic maths and google ... If anyone can point me at a step by step that a software dev with some dsp interest and basic math (intermediate maybe) can understand I would appreciate it :)

I initially, expecting problems, just subtracted the real part of each bin in F from the real part of each correpsonding bin of each window of R. The iFFT of the results produced a noisy signal around the window boundaries.

Then I (think) understood I need to be subtracting the magnitudes represented, not just the real parts, - and that this was in a polar coordinate system when doing the math. So I thought, just subtract the magnitudes - the phases shouldn't change? Then came to realise (maybe?) the phases were not aligned between the fingerprint F and each real R signal window. So now I wonder can you align the phases of the bins in the fingerprint with those of each of the real signal windows, or vice versa, before subtracting the magnitudes? and then iFFT wont be noisy?

This is a wordy question, I understand. I think what I am really asking is, can someone help me straighten out my understanding of what's happening/required maths wise? I think I have a good mental model of whats going on, just struggling to understand how to manipulate it?

I understand each bin represents an average of a band of frequencies - hence also phases.. I think.. though this confuses me then as to how iFFT can reproduce the signal, though I think I have that pinned down to sample rates.

I think I understand the concept of 'windowing/convolving' the signal, but that seems like a technique to hide the problem (unless you could convolve in a way that essentially also aligns phase?).

After here I get a bit lost....

$\endgroup$
  • $\begingroup$ Welcome to DSP.SE! In general, I don't think it will be possible to do what you're suggesting. The issue is that all those phases between bins will need to be synchronized (so that the FFTs all start at the same "place"). Subtracting the magnitudes may give you something (without the requirement for applying the IFFT). What are you trying to achieve? $\endgroup$ – Peter K. Aug 18 '15 at 19:34
  • $\begingroup$ Omg, I had the same idea lately. I would like to use it for filtering a noisy guitar signal....Have you found a solution already? $\endgroup$ – Markus Freyt Oct 22 '18 at 11:01

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.