Onset (audio)

Onset refers to the beginning of a musical note or other sound. It is related to (but different from) the concept of a transient: all musical notes have an onset, but do not necessarily include an initial transient.

Onset detection
In signal processing, onset detection is an active research area. For example, the MIREX annual competition features an Audio Onset Detection contest.

Approaches to onset detection can operate in the time domain, frequency domain, phase domain, or complex domain, and include looking for:


 * Increases in spectral energy
 * Changes in spectral energy distribution (spectral flux) or phase
 * Changes in detected pitch - e.g. using a polyphonic pitch detection algorithm
 * Spectral patterns recognisable by machine learning techniques such as neural networks.

Simpler techniques such as detecting increases in time-domain amplitude can typically lead to an unsatisfactorily high amount of false positives or false negatives.

The aim is often to judge onsets similarly to how a human would: so psychoacoustically-motivated strategies may be employed. Sometimes the onset detector can be restricted to a particular domain (depending on intended application), for example being targeted at detecting percussive onsets. With a narrower focus, it can be more straightforward to obtain reliable detection.