endolith / endolith/waveform-analysis

HPS method estimation error

Open
#9 5 comments 0 reactions 0 assignees View on GitHub
Dominant language
Python
Stars
287
Forks
83
Avg merge
16m
Merged PRs (30d)
2

Description

I am using `freq_from_hps` as described [here](https://github.com/endolith/waveform-analyzer/issues/8) to detect pitch in monophonic guitar samples.

I noticed that the results I get often have a slight estimation error which is always +10-15Hz. For example, when I want to detect pitch for [this](http://vocaroo.com/i/s03L96QcllQJ) audio file (see end of post for the correct pitches) I get:

`[['F4'], ['F#4'], ['G4'], ['G#4'], ['A4'], ['A4'], ['A#4'], ['B4'], ['C5'], ['C#5'], ['D5'], ['D#5'], ['E5'], ['F5'], ['F#5'], ['G5'], ['G#5'], ['A5'], ['A#5'], ['B5'], ['C6'], ['C#6'], ['F4']]`

When I increase every of these pitches by 10Hz I get:

`[['E4'], ['F4'], ['F#4'], ['G4'], ['G#4'], ['A4'], ['A#4'], ['B4'], ['C5'], ['C#5'], ['D5'], ['D#5'], ['E5'], ['F5'], ['F#5'], ['G5'], ['G#5'], ['A5'], ['A#5'], ['B5'], ['C6'], ['C#6'], ['E4']]`

Which is actually **100% correct**.

This basically happens for almost every note below G#4 (and above E2). What could be the issue here? Any ideas about how there is such a **fixed** estimation error?

Furthermore, as I am designing this application specifically for the guitar, do you have any recommendations/tips as to how I could optimise this method?

Thanks.

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.