Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

How to calculate protrusion value for pitch detection project?

Status
Not open for further replies.

HanzPetr

Newbie level 1
Newbie level 1
Joined
May 6, 2010
Messages
1
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
1,289
Pitch Detection

I'm working on a project that deals with pitch detection of audio signals and is coded in C++. Specifically I'd like to implement the algorithm proposed in this paper:
https://ccrma.stanford.edu/~larrywu/files/GuitarPitchDetection.pdf

Since I'm quite new to audio processing I hope someone here is able to help me.

So far I have calculated the spectrum of the sound, but I am not sure how to implement the following parts beginning with "calculating protrusion value":

Here an excerpt of the paper:

After getting the frequency domain data, we
should find out the magnitude of local peak.
However, not every local peak is important. The
more protrusive the local peak is, the more
important it is. Usually, the small protrusion is
caused by the noise signal. Therefore, we
calculate the protrusion for every local peak and
set a threshold to determine which local peak
should be ignored.

protrusion = Va / Max(Vb, Vc)

where A V is the peak magnitude, are the
troughs magnitudes on both sides of the peak. If
we directly calculate the peak’s protrusion value,
we will get some inaccurate results like Fig. 1.

The little protuberance C, makes C’ become a
trough, and the C’ may cause the protrusion of A
not high enough to pass the threshold. For that
reason, before calculating the protrusion, we
apply a mean filter to all frequency samples to
smooth this kind of protuberance. For guitar,
1.25 is a suitable value for the threshold.


What I'd like to know is how to get to the values Va, Vb, Vc?

And how do I apply a mean filter with a threshold of 1.25?

Any hint is appreciated!!
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top