Audio pitch analysis

5k views Asked by At

I'm very new to sound analysis in fact doing it for the first time all I need to do is to analyse an mp3 file or any other format and detect as pitch varies. simply I want to trim audio file where high notes occur.

sound wave

I've tried NAudio and few articles but of no avail so if someone guides me in right direction for some tutorial and what API to use.

3

There are 3 answers

2
Ilya Tereschuk On
  1. The first you must know is how the pitch is related to waveform.
  2. Notice: simple single-channel waveform is represented by simple byte array. It consists of RIFF header with some necessary parameters and the wave sequence itself. More complicated waveforms (multichannel, high bit rate) are represented in some other way (int instead of byte array, interference and so on).
  3. SO: In order to manipulate audio pitch, you have to learn how waveform is made (step 2) and write (or google) a certain algorithm, which will operate with a waveform's pitch in a way mentioned in step 1.

If you are very new to audio programming, there is a great beginner tutorial: generating constant waveforms with C#.

0
Igor Ševo On

You could use an FFT to get the spectrum of the recording. By checking the spectrum for specific frequencies you could decide which parts of the audio contain high pitches.

Some theory:

Some resources:

0
kervin On

Try a C# binding to Aubio

aubio is a tool designed for the extraction of annotations from audio signals. Its features include segmenting a sound file before each of its attacks, performing pitch detection, tapping the beat and producing midi streams from live audio.

http://aubio.org/