I have a wav file containing a series of chords, each containing 3 or 4 notes, played concurrently.

I need to find the frequencies of each note in each chord, and I can use matlab to do any computation.

Currently I think I need to find the spectrogram of the wav file and convert the frequencies from normailsed frequencies to normal frequencies (I know the sampling rate). Here is the spectrogram:

enter image description here

Is this a good approach to solving this problem?

I've already tried it, but the spectrogram isn't particularly informative. Is there an alternative method that I'm ignoring?

  • $\begingroup$ Are you allowed to process the chords seperatley? $\endgroup$
    – Deve
    Jan 14, 2013 at 17:30
  • $\begingroup$ There's no restrictions like that, no. I guess I could use a window to isolate each chord and then find the spectrum. $\endgroup$
    – Tom Kealy
    Jan 14, 2013 at 17:47

2 Answers 2


A spectrogram is problematic because the frequencies are not well localized. You would be better off selecting a time window that only contains one chord and running an FFT to identify the frequencies. Be aware that an FFT will essentially quantize the actually frequencies you are looking for into bins. The resolution of the frequency bins depends on the length of your time window. The longer the time window, the better the frequency resolution.

As an alternative, you can look into what is known as the constant Q transform which can be adapted to have frequency bins the align with the normal progression of musical notes. See: http://www.elec.qmul.ac.uk/people/anssik/cqt/smc2010.pdf

  • $\begingroup$ This is supposed to be a straightforward task: I'll just use a window in the time domain, and then take the FFT. $\endgroup$
    – Tom Kealy
    Jan 14, 2013 at 21:18
  • $\begingroup$ A spectrogram is a windowed FFT so you're not going to gain anything, except trading off one window for another. That's because you are subject to the uncertainty principle. $\endgroup$
    – Emre
    Jan 15, 2013 at 0:00
  • $\begingroup$ If this is a constrained toy transcription problem with chords composed only of 1 or 2 second long held notes consisting of just one pure unmodulated sine wave per note pitch, then try longer FFT windows with 1 seconds worth of samples in length per window. $\endgroup$
    – hotpaw2
    Jan 15, 2013 at 8:50

Polyphonic pitch estimation is still a difficult problem. Search on the MIREX forum for current research papers. Simplistic spectrum based approaches usually require component pitches with extremely simple timbres (nearly pure unmodulated sine waves, etc.) rarely found in real-life polyphonic music. More typical polyphonic music can contain a dense set of overlapping overtones plus other transient noises. More complicated timbres creating polyphonic chords may require a statistical pattern matching based approach (against a database of potential instrument sounds), and/or machine learning algorithms, in addition to any signal processing for spectrum and envelope information.

  • $\begingroup$ There's a difference between getting a computer to identify pitches reliably and precisely getting a human who knows a little bit about sound waves, signal processing, and potentially the music theoretic context of the audio file, to identify the notes in a specific example. The latter is often much easier. $\endgroup$
    – Mr. Nichan
    Jun 6, 2023 at 10:42

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.