<< Chapter < Page Chapter >> Page >
Examples of the correction system and the code used to implement it.

These are the files we used to implement our Pitch Correction&Detection system, along with some examples of our results.

Matlab code

When using these programs, type help<name>into MATLAB to determine the format of the inputs and outputs. Vectors are always columns, and sounds are always monaural. Sounds should also be normalized. In general, vectors of pitches refer to windows, and the pitches themselves are in Hertz. Advisory: choose window size of 4000 samples and jump size of 1000, assuming a 44.1 KHz sample.

Pitch detection

Detect using the time-domain Autocorrelation algorithm (findautomin is required):

fastauto.m

findautomin.m

Detect using the frequency-domain HPS algorithm:

hps.m

Determine the pitch to which the program should correct:

Pitch determination

correctfreq.m

Pitch correction

Correct pitch using the Time Shifting algorithm:

tdrev.m

Correct pitch using the PSOLA time domain algorithm:

psolarev.m

Correct pitch using the Modified Phase Vocoder:

modpvshift.m

Examples

These examples were all generated using the FAST-Auto pitch detector with threshold around 0.05, a 4000 point window, and a 1000 point jump size, using the PSOLA correction algorithm.

Flat correction

Below, listen to how the flat note is corrected. The singer starts out holding a tune, but soon dips below that tone. The corrector helps to pick him up and keep him on the right note.

Original Corrected

Scale

Below, listen to how the corrector parses a continuously increasing tone into distinct notes. The singer increased in tone across his entire range, and this was fed into the system. The output sounds as if the singer sang distinct notes.

Original Corrected

Song adjustment

The examples below are derived from a portion of a song: Original

Here, listen to how the corrector operates on this song. The singer was not out of tune to begin with, but there were points at which he deviated from a perfect note and the corrector adjusted his pitch. Corrected

In this last example, we use the correction system in the wrong direction: for distortion! We took the original clip above and attempted to make the singer monotone by demanding the same key for the entire clip. Listen to the results: Adjusted

Get Jobilize Job Search Mobile App in your pocket Now!

Get it on Google Play Download on the App Store Now




Source:  OpenStax, Ece 301 projects fall 2003. OpenStax CNX. Jan 22, 2004 Download for free at http://cnx.org/content/col10223/1.5
Google Play and the Google Play logo are trademarks of Google Inc.

Notification Switch

Would you like to follow the 'Ece 301 projects fall 2003' conversation and receive update notifications?

Ask