1
$\begingroup$

I am looking at trying to achieve a multi resolution STFT analysis on a log sine sweep audio measurement.

I have an impulse, and I would like to perform two different windowed length FFTs on the impulse.

The shorter window length will determine the crossover frequency of the two results. So the this short windowed signal FFT will supply the complex result for x frequency and above.

The longer window will provide all of the results below x. Although, I am trying to understand how to properly achieve this and synthesise the end result. Do I need to low pass the longer window before the FFT, if so, how do I achieve this?

And then how do I put the two results together?

$\endgroup$
4
  • 1
    $\begingroup$ your question is not of the category of “I want a pet unicorn and where do i buy one” but you appear to want do something nonstandard. could you be more detailed about what your down stream goal is, like are you going to want to “invert” this combined output or whatever $\endgroup$
    – user28715
    Aug 10, 2019 at 15:56
  • $\begingroup$ The idea is not to reconstruct the signal, but just to be able to analyse the frequency and phase content of the discrete audio. So I have obtained the impulse response. I would like to analyse the high frequency content for my signal, so I have a short window over the impulse, this allows me to filter out any reflections, and of course smooths the data. However I also want to look at lower frequency which will involve a longer time window. Now this will involve potentially letting in reflections but I need to do so to get the length time window. $\endgroup$
    – samp17
    Aug 10, 2019 at 16:00
  • $\begingroup$ Obviously I am not looking for a one view does all, as that is impossible. However if I could glue the results of both windows together, so I have resolution in the low end, whilst smoothing over the HF that would be great. And then depending on the length of the short window that would determine crossover and direct sound. Then the use can change the window length to let in more or less time. Its about giving the user the tools to analyse depending on the acoustic constraints of the environment when measuring a speaker. $\endgroup$
    – samp17
    Aug 10, 2019 at 16:02
  • 1
    $\begingroup$ @samp17 not 100% identical to what you write, but: Wavelet analysis does solve a lot of these issues. $\endgroup$ Aug 10, 2019 at 20:58

2 Answers 2

1
$\begingroup$

I've done multi-resolution spectrograms before, so they're not impossible (a unicorn). One method is to zero-pad the shorter data window (for better time locality resolution) to the same length FFT as the longer data window (for greater frequency resolution). Then you can simply scale for window length, and cross-fade the two sets of FFT magnitude results over some frequency range.

Another possibility (instead of zero-padding) is to use interpolation of the lower frequency FFT or lower time resolution FFT results to create more possibilities for a higher density of spectrogram plot points.

One academic paper suggested computing the local vertical and horizontal contrasts at each spectrogram point and dynamically picking the FFT set with the highest contrast (over the vertical for narrow frequency spectra or across the horizontal for short time events) to plot at each point.

If you keep both (or more!) sets of (overlapped) STFTs, your transform isn't lossy, but redundant, and the resulting image can use that redundancy to obscure less information, usually due to graphical blurring/plotting with typical linear interpolation and/or non-linear color mapping.

Even for reconstruction you can use both sets of data, for instance feeding the short IFFTs to a tweeter and the longer IFFTs to a sub-woofer, with a cross-over in the middle (be careful of phase).

$\endgroup$
2
  • $\begingroup$ This is great. I have tried as you first suggested with zero padding the short FFT to the length of the long one. I think my question is more to do with cross fade and scaling. As currently I have no cross fade (the magnitude above x Hz is the short window, below is the long. And there is currently a slight jump between the two FFT data points. Currently I am dividing my FFT function by the number of points (ie 200 for a short window, 8000 for a long). But I have not downsampled anything or low passed. How do I get the crossover frequencies to align without losing too much integrity? $\endgroup$
    – samp17
    Aug 11, 2019 at 7:47
  • 1
    $\begingroup$ Unicorns are possible! Their horns heal diseases $\endgroup$ Sep 9, 2019 at 20:34
0
$\begingroup$

Try the IIR Constant-Q Transform (essentially an FFT with post-processing which will do what you want): https://iie.fing.edu.uy/~pcancela/iir-cqt/

The accompanying paper compares it to the multiresolution FFT.

The matlab code written by the author of the accompanying paper is ever so slightly wrong, but easily fixable.

$\endgroup$
0

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.