Re: [Audacity-devel] Question about spectral analysis in Audacity
A free multi-track audio editor and recorder
Brought to you by:
aosiniao
From: Michael C. <mc...@gm...> - 2008-07-18 18:51:57
|
Are you trying to take THE spectrum of a 60 second segment (with one FFT,) or are you interested in finding the average spectrum by taking many small FFTs over the duration and averaging it out? These may yield similar results but the process is very different. You probably know this, but I just want to point out that in O(n log n), n is in samples, not seconds, so each second adds a big factor to the running time of the algorithm. I would be willing to bet you aren't going to be able to finish a FFT of size 44100*60 for a very long time. The Plot Spectrum command appears to take many small ones and average them, since you can select the FFT size in the popup window, with a maximum of 16384. If that's the case I'm not sure why it has a 24 second limit either. Michael On Fri, Jul 18, 2008 at 2:24 PM, Julien F. Vanegue <jf...@ce...> wrote: > >> Computing the spectrum requires all samples to be in memory at once >> and costs n*log(n), so operating on many seconds of sound is unusual. >> If the spectrum is very stable, e.g. a steady tone, then you probably >> don't need to look at many seconds to extract the spectral >> information. If the spectrum is changing, then grabbing the spectrum >> of a large interval is in some sense going to smear out or average the >> overall energy, so again, it's not so useful. Finally, there are >> numerical issues to worry about when doing a very large Fourier >> transform to compute the spectrum. What might be useful is to compute >> a sequence of short-term spectra and average their magnitudes to get a >> long-term average spectrum. Audacity could do this in principle, but >> the user would have to provide more parameters and confirm that he/she >> really wants to do an expensive computation on a long segment of audio. > > Alright. So if I understand well, there is no hidden reason to forbid > spectral analysis on > a larger sample. O(n log n) is a very reasonable complexity for a > fourier transform and > I am ready to wait some more seconds to compute the spectrum for 60 > seconds instead > of 24 seconds. I will modify the audacity source code for my own needs > in that direction. > > Thanks for your quick answer > > Julien > > ------------------------------------------------------------------------- > This SF.Net email is sponsored by the Moblin Your Move Developer's challenge > Build the coolest Linux based applications with Moblin SDK & win great prizes > Grand prize is a trip for two to an Open Source event anywhere in the world > http://moblin-contest.org/redirect.php?banner_id=100&url=/ > _______________________________________________ > audacity-devel mailing list > aud...@li... > https://lists.sourceforge.net/lists/listinfo/audacity-devel > |