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....