# Overview

Auto-correlation is a type of periodicity analysis, but the output is expressed as lag time, rather than frequency. Peaks at short time lags correspond to high frequency content. This analyser performs linear normalised auto-correlation of the audio waveform for each analysis window. Auto-correlation yields an even (or symmetric) function centred on a time lag of 0, hence only one side of this function is given in the output. The value for a lag of 0 is always equal to 1. Because the output is normalised, the auto-correlation analysis output does not directly indicate the strength (or ‘loudness’) of the sound, and calibration has no effect.

# User Controls

## Overlap

This sets the overlap of windows in terms of percentage, milliseconds, seconds or number of samples.

## Window Size

This sets the size of the window in samples, which is a power of 2. Values from 2^7 (128 samples) to 2^20 (1048576 samples) are supported (corresponding to window durations of 2.9 ms to 23.8 s for a sampling rate of 44.1 kHz). Longer window durations could be achieved by downsampling the waveform prior to analysis.

A larger window size increases the frequency resolution, but reduces sensitivity to temporal fluctuations (e.g. vibrato). A larger window size is computationally more efficient, but requires greater memory. A non-rectangular windowing function could be thought of as reducing the effective window length.

## Windowing Function

This selects the windowing function to be applied to the wave prior to the auto-correlation. Windowing functions provide a ‘fade-in’ and ‘fade-out’ of the windowed waveform, which for auto-correlation emphasises a central bias (i.e. a bias to lag times near 0). Select the rectangular window for no effect.

# Outputs

## Correlogram

This ‘time-spectrum’ type object holds the auto-correlation functions of each analysis window (i.e. auto-correlation functions as a function of time).

## Mean Correlation

This is the time-average of all auto-correlation functions.

## Peak Frequency

This is the frequency associated with the greatest non-zero-lag peak in the auto-correlation function. Note – this is a crude frequency estimator, and more refined approaches would normally be used for auto-correlation based frequency estimation.

## Peak Height

The height of the largest non-zero lag peak in an autocorrelation function provides a simple indicator of pitch strength. Values range between 0 and 1 (indicating maximum pitch strength).

# Verification

The autocorrelation function of a continuous sine wave is a sine wave of the same period.

# Code Authors

The auto-correlation analyser was written by the PsySound3 team.