Enhanced Autocorrelation

Feedback and Reviews for Audacity 2.x

This board is ONLY for general feedback and discussion about Audacity 2.X.

If you require help, or think you have found a "bug", please post on the forum board relevant to your operating system.
Windows
Mac OS X
GNU/Linux and Unix-like

Enhanced Autocorrelation

Permanent link to this post Posted by matiasH » Fri Mar 16, 2018 2:00 pm

I'm working as an accoustic engineer for Rocket Science and thus often use Audio Analysis. I recently discovered the feature of the enhance autocorrelation and realized, that it gives very exactinformation about the Frequencies, so I dug a little to implement this feature in my own programs. While checking if my code works properly, I ralized that my solution is a little off to the one that audacity proposes. At first I thought that this is an error on my side, but now I'm not so sure anymore. The reason for this ist, because For this particular file I tested it, there is a peak at about 35Hz in my program for both, the FFT and the enhance autocorrelation, in audacity, the FFT also shows the peak at about 35Hz but the enhanced autocorrelation shows one at about 40Hz. So either I missunderstood something completely about this enhanced autocorrelation or I guess there is a small bug in your version (maybe an indexing mistake that shifts autocorrelation?).

I used Audacity version 2.2.1 on Windows 7.
I uploaded the audio file I used on: https://wetransfer.com/downloads/7d1895 ... 559/55e611
I made screenshots of the enhanced autocorrelation and the spectrum from both, Audacity and my octave script (and since it is sometimes difficult to see the exact values underlined the peak frequencies with red).
Attachments
enhanced autocorrelation.PNG
Enhanced autocorrelation Audacity
enhanced autocorrelation.PNG (37.36 KiB) Viewed 358 times
Spectrum.PNG
Spectrum Audacity
Spectrum.PNG (54.64 KiB) Viewed 358 times
spectrogram-octave.PNG
Spectrogram Octave
spectrogram-octave.PNG (155.75 KiB) Viewed 358 times
enhancedAutocorrelation-octave.PNG
Enhanced Autocorrelation Octave
enhancedAutocorrelation-octave.PNG (43.18 KiB) Viewed 358 times
matiasH
 
Posts: 1
Joined: Fri Mar 16, 2018 1:30 pm
Operating System: Windows 7

Re: Enhanced Autocorrelation

Permanent link to this post Posted by steve » Fri Mar 16, 2018 2:37 pm

Hi matiasH,
As can be seen from the track spectrogram, it is going to be difficult to get a single figure for the frequency because the frequency is not constant:

spectrogram.png
spectrogram.png (232.1 KiB) Viewed 352 times


These are the settings that I used (note that these settings are very slow)

settings.png
settings.png (106.27 KiB) Viewed 352 times


I'm certainly no expert on autocorrelation, but I'm aware there are a number of different implementations. Audacity's implementation can be found here: https://github.com/audacity/audacity/bl ... ectrum.cpp

For your "engineering" use case, it may be better to just export the raw FFT data from Plot Spectrum, and the apply your own analytical model to the data (perhaps in a spreadsheet). Exporting the data is described in the manual: http://manual.audacityteam.org/man/plot_spectrum.html
9/10 questions are answered in the FREQUENTLY ASKED QUESTIONS (FAQ)
steve
Site Admin
 
Posts: 47010
Joined: Sat Dec 01, 2007 11:43 am
Operating System: Linux *buntu


Return to Audacity 2.x Feedback and Reviews



Who is online

Users browsing this forum: No registered users and 1 guest