aubiopitch outputs a list of tuple. Each tuple contains two floats:
- a timestamp in seconds
- a fundamental frequency in Hertz
Here is an example on a guitar sound:
$ aubiopitch -i guitar_Cold_Blood_-_Baby_I_Love_You.wav | head
0.000000 0.000000
0.005805 293.884338
0.011610 386.387207
0.017415 0.000000
0.023220 551.689758
0.029025 3608.569336
0.034830 3588.231201
0.040635 416.824066
0.046440 3606.715576
0.052245 417.116425
if you are curious (please be), you can get the latest git version and try the demo script demo_pitch.py
:
$ ./python/demos/demo_pitch.py bass_Don_Ellis_-_Conquistador.wav
you would get the following plot:
- The first row represents the waveform.
- The second row, the extracted pitch track, in midi frequency.
- The third, the confidence of these pitch candidates (using the yinfft algorithm).
In this sample of a bass line, extracting the pitch during the transient attacks is more challenging than in the steady state. Pitch candidates that are found below an arbitrary threshold (here 0.8) can be discarded (dashed green line), while others can be kept (solid blue line).