Using A Pitch Detector For Onset Detection
Using A Pitch Detector For Onset Detection
Nick Collins
University of Cambridge
Centre for Music and Science
11 West Road, Cambridge, CB3 9DP, UK
nc272@cam.ac.uk
3 EVALUATION
3.1 Procedure
An evaluation of the pitch detection based onset detec-
tor was carried out using the same methodology as pre-
Figure 6: The upper cleaned and vibrato suppressed pitch vious comparative studies of onset detection effectiveness
track is converted to a detection function (Collins, 2005; Bello et al., 2004). Pitched non-percussive
(PNP) soundfiles originally prepared and annotated by
Juan Bello formed the test set. 11 source files were se-
2.3 Assessing Peaks of Instability lected, containing 129 onsets, comprising slow attack and
high vibrato sounds from strings and voices. The on-
Given the vibrato suppressed pitch tracks, note events sets were sparse in relatively long sound files, providing
must be distinguished by jumps of pitch. A procedure is a great challenge; with amplitude modulation associated
applied to rate the strength of changes in the pitch track p with vibrato, it is unsurprising that loudness based detec-
over time. tion functions fared so poorly in Collins (2005). The tol-
8
erance for matches between algorithm and hand-marked
df (i) =
X
min (|p(i) − p(i + j)|, 2) (2) onsets was set at a very tolerant 100mS, though this win-
dow was small compared to the average distance between
j=1
note events.
The min operator disregards the size of changes The pitch track onset detection function was compared
greater than a tone to avoid overly biasing the output de- to the phase deviation detection function with a common
tection function df based on the size of leap between notes adaptive peak picking stage. The peak picker has a pa-
involved. Figure 6 demonstrates df for a soprano signal. rameter δ which acts like an adaptive threshold; this was
Because changes are sought out, cues for multiple note varied between -0.1 and 0.53 in steps of 0.01, giving 64
events in a row of the same pitch are the most difficult case runs on the test set for each detection function. A Re-
to spot (particularly questionable are the case of smooth ceiver Operating Characteristics curve was drawn out as
transitions between same pitch notes- how little energy delta is varied. This ROC curve is given in figure 7. The
drop can a player get away with?). It is assumed that closest points to the top left corner indicate the better per-
note onsets should show some slight perturbation in pitch, formance, with many correct detections for few false pos-
though the pitch integration area is around 90mS in the itives.
Table 1: NPP test set comparison of detection functions with Bello et al. (2004) peak picker
detection function score (eqn 4) CDR Onsets Detected False Positives best δ
1. pitch track detection function 42.6 -17 58.1 36.4 0.13
2. phase deviation (Bello et al., 2004) 32.8 -36.4 45.0 37.0 0.13