2
$\begingroup$

According to wikipedia Onset detection:

Onset refers to the beginning of a musical note or other sound, in which the amplitude rises from zero to an initial peak. 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.

And the Pitch detection

A pitch detection algorithm (PDA) is an algorithm designed to estimate the pitch or fundamental frequency of a quasiperiodic or virtually periodic signal, usually a digital recording of speech or a musical note or tone. This can be done in the time domain or the frequency domain or both the two domains.

The two definitions are clear to me. Onset tries to find the start of a musical note, pitch detection tries to detect the fundamental frequency.

The confusion arise, because I think of the two concepts as highly related. For example if I want to track a musical note doesn't it mean that I already detected the pitch? or that frequency could be a harmonic and not the fundamental frequency ?

Can someone explain if the two are significantly different, or it's just a matter of different context of the same concept; tracking specific frequency vs tracking when that frequency starts.

$\endgroup$
1
  • $\begingroup$ It is quite possible for a pitched sound not to have a well defined onset, and a sound with a definite onset not to have any well defined pitch. $\endgroup$
    – hotpaw2
    Oct 27, 2014 at 19:20

2 Answers 2

5
$\begingroup$

The two concepts are related to two different dimensions or aspects of music which might or might not be correlated.

Onset detection is concerned with finding the points in time at which sounds start. Doing this does not require prior knowledge of the particular pitch (or fundamental frequency) of the sound. It may indeed rely on the property that at the beginning of a sound, there is an increase of energy. Actually, you can very well perform onset detection on recordings which do not have a well-defined pitch (for example: drums, machine noises...).

You can think of pitch and onsets/rhythm as related to the "vertical" and "horizontal" organization of music. There exists types of material in which changes along these two dimensions coincide - so that a detection algorithm can take advantage of a change in one dimension to infer that a change has occurred on the other dimension. But this coincidence/correlation is contingent.

$\endgroup$
6
  • $\begingroup$ So if understand, Onset detection detect the start of the sound regardless of the frequency. If I want to track a specific musical note, should I have to use both; first to detect the onset, then determine if the (fundamental?) frequency is the note I am looking for? or it isn't that simple? $\endgroup$
    – concept3d
    Oct 27, 2014 at 9:28
  • $\begingroup$ I understand that musical note detection is an active field of research, I just want an estimation (and not really looking for high accuracy) but wanted to verify if my technique will give at least partially correct results. $\endgroup$
    – concept3d
    Oct 27, 2014 at 9:38
  • $\begingroup$ well, @pich, i think Nick Collins might disagree with you about whether pitch detection and onset detection have no relationship. note the title of the paper i would split the difference and say that pitch detection definitely is necessary and not sufficient for onset detection for pitched notes, but for unpitched notes cannot rely on pitch detection. a decent pitch detector has, for outputs, other parameters besides pitch. like amplitude and a periodicity measure. maybe also a timbre measure. $\endgroup$ Oct 27, 2014 at 17:39
  • $\begingroup$ "In other words, onset detection completely ignores the notion of pitch/fundamental frequency,..." this is just not the case. consider a vocalist singing "ah" or a trombone or a fiddle playing multiple notes with legato in a phrase. there is no percussive onset, but there are different notes. there is no way to detect onsets (and offsets) without some form of pitch detector for that kind of input. that is true even for algorithms like this. $\endgroup$ Oct 27, 2014 at 17:46
  • $\begingroup$ I have edited my answer to reflect more accurately what I meant. Two variables can be correlated, but it doesn't imply that they are the same thing. $\endgroup$ Oct 27, 2014 at 18:00
2
$\begingroup$

okay, you can do pitch detection without onset detection. that's for sure. when you do pitch detection and the input is either mostly silent or not well pitched, usually the pitch detector will not update the pitch value from whatever was the most recent "good" pitch value. also not-well-pitched sounds normally have a very low "periodicity measure" because the signal is not periodic nor quasi-periodic. the attack of pitched notes will also have a low periodicity measure and that information can sometimes be useful for onset detection. sudden changes of pitch over more than a semitone can also be used for onset detection.

so, in a typical audio-to-MIDI scheme, first pitch detection is done with results are more than just the pitch. the output of the pitch detector will also have an amplitude parameter, a periodicity parameter (sometimes called "pitch confidence"), perhaps a timbre parameter (or a couple of timbre parameters), in addition to pitch. a good onset detector might make use of all 3 or 4 parameters and look for change or "novelty" and will combine those parameters in an alchemical fashion to make the best guess of whether and when the onset is.

also check on publications like this and this. changes in pitch are definitely a cue about note onsets. i just must disagree with pichenettes original answer that they have nothing (or even little) to do with each other. if you're humming a tune, changes in pitch might be the only physical parameter that you hear changing to clue you in to the fact that there is a new note.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.