Correcting Pitch

In most cases, the pitch of your source is correct - that is, the recording is at the pitch and has the duration intended by the performers. However, the farther back the original was made, the more likely that it is now at the wrong pitch regardless of the form in which you find it. In the first three decades of sound recording, a '78' would be recorded (usually) somewhere between 60 and 95 rpm! Later, errors became less frequent and less extreme, but they still occurred. The best way to solve the problem for transfer to your computer (and to your CD-R) is to change the pitch at the source - with a variable-speed turntable or tape player. There are also variable-speed CD players, but they offer control only at their analogue outputs; whether you would prefer to record from a corrected analogue signal or from off-pitch DAE is up to you. If you are using a variable-speed player, then, you simply adjust it until the pitch is right to you and record through the line input of your sound card. So from here on I assume you're starting from a fixed-speed source and you have to correct pitch digitally. For convenience, all sampling rates below are in KHz.

Determining pitch

Well, this should be easy, right? Maybe so, maybe not. It depends on your source and on your ear. First, we assume that whatever pitch error exists, it is constant through the recording. That was not strictly true in the earliest days, but correction for changes during the recording is beyond the scope of this primer (i.e., I don't know how I would do it if I had to).

Step one is to record a short selection in which the pitch can easily be determined. I recommend doing that in monaural at a reduced sample rate, perhaps 22.05. It makes handling the file easier and should serve your purposes as well as working with a file four times the size. That file is loaded into your favorite WAV editor. For this purpose, I find GoldWave the best choice because its speed controls are the most comfortable for me. All you need to do in GoldWave is to adjust the playback speed until the pitch on your test file checks with your pitchpipe or other reference. Now note the error - the difference between the playback speed and that at which you recorded. For reference, a semitone is about 6% in speed; half an octave is about 40%.

Resampling

One way to correct pitch is to record at the nominal sampling rate you will be using, say 44.1, and then to resample to correct. For example, if your 22.05 test played back best at a rate of 23.3 KHz your WAV is about a semitone flat. In GoldWave, you can simply record the whole selection at 44.1 sampling, then transpose it down a semitone. The same thing is done slightly differently in other editors, but the effect is the same: approximately six samples are thrown away out of every hundred and the others are adjusted to fit. GoldWave gives you no control over how that adjustment is done and uses a simple, quick algorithm for the purpose. CoolEdit Pro and other WAV editors provide control in the form of pre- and post-filtering and relatively complex interpolation schemes. Since that interpolation is done 44,100 times per second per channel in this example, even a fast CPU will take substantial time to do a good job. Only you can determine how much time you want to spend processing and how important the errors are.

Off-Sampling

(Note: this term is my invention. If you have a better one, please let me know.)

Most audio capture programs allow you to pick from a few sampling rates. Typically, they are 48, 44.1, 32, 22.05 and lower. However, Mike Looijmans' CDWAV is not so choosy. In addition to its presets, you may type in any integer sample rate you would like. If the playback is best at 6% higher speed than recording, then you can record at a sampling rate 6% lower than your target and if you have a way to interpret the result as 44.1, you would be on pitch. With the right tools, that's straightforward.

Record in CDWAV at your shifted sample rate - here 41.5. Record the selection as a .PCM file. PCM is a raw format (other extensions are RAW and SND). Now, open that file as PCM in CoolEdit and lie to the program - tell it that the rate is 44.1. In this case, lying is good for you. All you need to do now is to clip off the click in the header (a real PCM doesn't have a header, but CDWAV recorded it with the WAV envelope, which has to go). Save the file as WAV - and you're done. No resampling, so no approximations or delays.


E-mail me at cdrecording@mrichter.com
Return to Mike's home page