Open ahbarnett opened 4 years ago
continuous FTs in 1d and 2d are added. inverse NUFFT to come. But we have enough for 2.0 for now, so I'm removing the milestone from the Issue.
Gaussian random field (GP prior) example added last week
Not sure it's appropriate to post here but I'm interested in using (or trying to use) FINUFFT for the following case:
This could be as low as 22 or 24 Fourier modes (down from the several thousand in a typical DFT of 1024 or 2048 samples of audio data at 44100 Hz sample rate).
This should hypothetically give us an efficient "mel or Bark" FFT. A similar idea is from the warped DFT (such as here: https://www.computer.org/csdl/pds/api/csdl/proceedings/download-article/12OmNwpoFIW/pdf) - which is a specialization of the nonuniform DFT.
Does it make sense to use FINUFFT for this case? I can write it up as an example to try to contribute here.
Dear Sevagh, That is an interesting idea, and I've had a conversation about it already with another user. But, my conclusion is that a NUFFT is not helpful: you are trying to estimate power spectral density integrated over certain bands (eg, each one mel wide), not to get the transform at isolated frequency points. You need a high density of Fourier-space samples, and to sum the square magnitude over the various bands. So you may as well use the plain FFT (as usual, applied to say 8192 samples, after windowing) then post-process into the bands. A type-2 NUFFT would not be any faster here.
Let's think through another use case: say you need extreme (delta f < 1/T) resolution in the frequency spectrum (given windowed regular samples of time T), then the type-2 NUFFT could let you choose arbitrary freq output points. But usually you're fine on a regular grid - due to the windowing broadening the frequency peaks, the resolution from the plain FFT is sufficient.
If you need very narrow bands (eg at the low-frequency end, and bands are < 1Hz wide) there is a chance you could beat the use of very long FFTs by first downsampling (by local averaging) to get a shorter vector for the FFT.
So, try as I may, and despite the NUFFT's many other uses, I haven't been able to find a convincing audio application - perhaps because audio is 1D and rarely needs high accuracy? But I may be wrong, so keep trying things and let me know is something works out. Best, Alex
On Fri, Apr 2, 2021 at 9:07 AM sevagh @.***> wrote:
Not sure it's appropriate to post here but I'm interested in using (or trying to use) FINUFFT for the following case:
- Replace 1D FFT for audio/music arrays with a special nonuniform FFT whose frequency points are nonuniformly spaced, closer to the mel or Bark psychoacoustic frequency scales
This should hypothetically give us an efficient "mel or Bark" FFT. A similar idea is from the warped DFT (such as here: https://www.computer.org/csdl/pds/api/csdl/proceedings/download-article/12OmNwpoFIW/pdf)
- which is a specialization of the nonuniform DFT.
Does it make sense to use FINUFFT for this case? I can write it up as an example to try to contribute here.
— You are receiving this because you were assigned. Reply to this email directly, view it on GitHub https://github.com/flatironinstitute/finufft/issues/122#issuecomment-812521492, or unsubscribe https://github.com/notifications/unsubscribe-auth/ACNZRSWZI3QJVBEYHNIK4RTTGW6P7ANCNFSM4P6WHWNA .
-- *---------------------------------------------------------------------~^`^~._.~' |\ Alex H. Barnett Center for Computational Mathematics, Flatiron Institute | \ http://users.flatironinstitute.org/~ahb 646-876-5942
Thanks for the feedback - it gives me plenty to work with. I believe I've seen literature where computing the mel spectrograms from warped-frequency DFTs leads to some improvement of accuracy in a machine learning music classifier.
So it's possible that instead of trying to replace the mel summation/integration over bands with the NUFFT, it's possible to perform the mel summation on the NUFFT and still improve results that way.
I'll try a bunch of things and report back on this repository if I find anything promising.
inverse NUFFT, eg: VLBI MRI
spectral interpolation from grid to off-grid.
sphere grid to show it's not special.
Debye scattering eqn ? etc