1
$\begingroup$

I aim at performing a sort of sliding FFT/DFT on an audio input with a variable time-window, that depends on frequency.

I am aware of sliding FFT/DFT algorithms. But instead of having a window of constant duration 100 ms or whatever, I would like to make the window shorter for higher frequencies and longer for lower frequencies. So: the idea is that higher frequencies would appear and vanish quickly in the FFT output than lower frequencies. Is such a thing doable as efficiently as traditional sliding FFT/DFT? Are there algorithms for this already?

$\endgroup$
5
  • $\begingroup$ Why not simultaneously use multiple different lengths of FFTs or FFT windows and window overlaps? $\endgroup$
    – hotpaw2
    Oct 25, 2016 at 17:39
  • $\begingroup$ What I really want is a window that smoothly widens towards longer frequencies. I could break it up into, say, 100 'bins', but then I'd be doing 100 window updates. I'm hoping there's a computationally-more-efficient version. $\endgroup$
    – Colin
    Oct 25, 2016 at 17:42
  • $\begingroup$ So you don't want a fixed number of potential windows, but something parametric that, upon a frequency analysis, adjust itself for the next sample? $\endgroup$ Oct 25, 2016 at 18:07
  • $\begingroup$ That sounds about right, if I understand... $\endgroup$
    – Colin
    Oct 25, 2016 at 18:25
  • $\begingroup$ Well, the DFT is equidistant in frequency domain if you feed it samples with a constant sampling rate, so you're looking for something else than just a single DFT. If you ask me, this sounds a lot like wavelets to me. $\endgroup$ Oct 25, 2016 at 18:51

1 Answer 1

2
$\begingroup$

When using the sliding DFT instead of an FFT, you can actually have a different window length per bin. This is because each bin is computed separately anyway. The only constraint is that each window length must be a multiple of its bin wavelength (or half of its bin wavelength if you modify the transform a little). For example, you can do a constant-Q sliding DFT by using the same factor for each bin, and spacing the bins appropriately. More complex variants are possible but require a lot of tweaking, depending on what you want to do with the result. The different windows should be aligned at their center.

I once found a paper about this (after coming up with essentially the same thing myself); it's called "Sliding with a constant Q" and can be googled. For resynthesis, alternatively to the method described in that paper, the trivial resynthesis algorithm for the sliding DFT (essentially just summing everything) also works for variable window lengths.

$\endgroup$
2
  • $\begingroup$ it's not really an "FFT". more like a sliding Wavelet Transform. $\endgroup$ Oct 26, 2016 at 7:16
  • $\begingroup$ I was about to mention this paper, yet so far it does not seem to fit in $\endgroup$ Oct 26, 2016 at 20:40

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.