[clam-devel] polyphonic pitch detection

Nathan Stewart therealnathanstewart at gmail.com
Wed May 11 17:04:40 PDT 2011


Thanks -

Ok - digging through this a bit further I think I have a better handle
on how to proceed. Basically running correlation on the log spectrum
against a template log spectrum. Rather than filtering out the upper
harmonics, I think they actually make it easier to distinguish related
notes in different octaves. (I was rather surprised to find the 2nd -
4th harmonics were actually stronger than the fundamental even for
strat neck pickup alone. I was also surprised to find out just how
strong they are even out to the 7th, 8th, 10th)  But if my thinking is
correct the spacing of the harmonics is going to be more important
than their relative strengths.  (i.e. - a  freshly plucked open wound
strings vs a decayed plain string at the 20th fret) - the correlation
might not be as strong, but since I'm correlating a rather peaky
signal I have high hopes. (I've even considered running Spectral Peaks
on the FFT first and correlating THAT)

I think this should work better than my previous ideas of heuristics
based on the spectral peaks. It won't be able to distinguish doubled
notes, but that's not a huge limitation, and I don't see how anything
DSP'ing a summed signal could.

I've got CLAM and NetworkEditor building in eclipse, have built and
installed a minimal (do nothing) processing plugin.  Still trying to
determine whats close enough to what I want to do to reuse components.

On Wed, Apr 27, 2011 at 1:04 PM, David García Garzón
<david.garcia at barcelonamedia.org> wrote:
> Currently there is no processing in clam that does polyphonic pitch detection
> as you ask for. We have a monophonic pitch detection (FundamentalFrequency
> output in SMSAnalysisCore) and harmony detection (the TonalAnalysis
> processing). The later gives the harmony, not the concrete notes (meaning set
> of notes not considering their octaves with weights of probability
> (PitchProfile output, is the probability for each pitch starting at G). That's
> quite convenient if you are looking for chords but not enough to extract
> polyphonic scores. TonalAnalysis uses internally many inner classes, one of
> them is the one you are asking, ConstantQTransform, but those classes are not
> exposed as a clam processings although in the wiki they are displayed as such
> just as a way to illustrate how the algorithm works.
>
> Read this:
> http://clam-project.org/wiki/Network_Editor_tutorial#Tonal_Analysis
>
> Anyway the ConstantQTransform code in clam is quite modular and optimized.
> Feel free to use in our own project it as long as you keep the copyrights and
> respect the GPL. If you use the ConstantQTransform consider that each note
> adds, besides a peak at the fundamental pitch, a lot of harmonics (evenly
> placed peaks in frequency) that contaminates the detection higher ptich notes.
> I suggest playing with the SMS related networks and your guitar to understand
> what happens.
>
> MelCepstrum is more about timber identification than pitch detection.
> http://en.wikipedia.org/wiki/Mel-frequency_cepstrum
>
> If you want to contribute clam with your own algorithm for polyphonic
> detection you are very wellcome. In the wiki you can find how to setup your
> extensions and we will help you as we can.
>
> Regards.
> David.
>



More information about the clam-devel mailing list