Page 1 of 1

FFT question

PostPosted: Mon Sep 18, 2017 7:30 am
by Lex248
Hi, all.
On the picture example of work of FFT. Whether it is possible to get access to every period of a signal separately? May be convolution?

Re: FFT question

PostPosted: Mon Sep 18, 2017 9:35 pm
by martinvicanek
Lex, we need more information.
What do you mean by "access to every period of a signal separately"?
Do you want to take the Fourier Transform of one period?
Why would you want to do that?
What is the context?

Re: FFT question

PostPosted: Wed Sep 20, 2017 9:30 am
by Lex248
For example, I want to make so through FFT, but standard methods don't allow to make so.

Re: FFT question

PostPosted: Thu Sep 21, 2017 7:04 pm
by martinvicanek
If the signal is as simple as in your picture, then you just need to check for zero crossings to determine the period.
It is still not obvious to me why you would need a Fourier transform to zero out one signal period. :?:

Re: FFT question

PostPosted: Thu Sep 21, 2017 7:56 pm
by Lex248
The signal will be not simple. I need it for improving of my plug-in "P-Filter - Positional Filter". Standard methods of processing of FFT create artifacts, wrong determination of a position. High frequencies of a signal give many uncontrollable periods. I need control over every period of each frequency of FFT image, if it is possible. It something like several thousands of band pass filters in real time.

Re: FFT question

PostPosted: Thu Sep 21, 2017 10:39 pm
by martinvicanek
If I understand your concern correctly, the standard way to deal with it is windowing and overlap-add.
several thousands of band pass filters in real time

That is possible. It's what happens in my FFT vocoder plugin. if your filter is not very steep you may get away with simply multiplying the spectrum by your filter response curve and IFFT - that's it.

Re: FFT question

PostPosted: Fri Sep 22, 2017 3:01 pm
by Lex248
Thank you for help, Martin. I am familiar with your FFT vocoder, but to me is unclear as it works and as I can apply it in the purposes. Maybe there is a block diagram? Still you use mono4, and it is undesirable for me.

Re: FFT question

PostPosted: Fri Sep 22, 2017 11:40 pm
by martinvicanek
People tend to think of an FFT representation in terms of a graphic equalizer, where you can simply multiply each bin by its corresponding slider value, then simply inverse FFT the result and that's it:
NaiveFFTFiltering.png
NaiveFFTFiltering.png (12.04 KiB) Viewed 34919 times
That might work if your filter curve is very moderate.

However, the correct way of doing it is based on linear convolution.:
CorrectFFTFiltering.png
CorrectFFTFiltering.png (12.69 KiB) Viewed 34919 times
You first IFFT your filter curve to obtain an impulse response (IR). Theen you apply a circular shift so the bulk of the IR is at the center of your frame, and apply a window function to avaid border artifacts. Then you convolve your signal with the windowed IR.

Re: FFT question

PostPosted: Sat Sep 23, 2017 7:01 am
by Lex248
The problem is that I have no constant filter curve. It depends on a signal and changes according to it.

Re: FFT question

PostPosted: Sat Sep 23, 2017 11:42 am
by martinvicanek
No problem, just keep updating your IR as you go. Use overlapp and add to avoid sudden changes.