Earlier today I came across some classical sheet music that included a "playalong" CD, just like a regular recording except it omits the solo cello part. After a quick listen it became clear there were two problems:
- The recording was made at A=442, rather than the more standard A=440.
- The tempi of the movements was not to my taste, either too fast or too slow.
SoX, the "Swiss Army knife of sound processing programs", can easily adjust the latter, but to remedy the former it must be provided with a dimensionless "cent" unit—ie. 1/100th of a semitone—rather than the 442Hz and 440Hz reference frequencies.
First, we calculate the cent difference with:
Next, we rip the material from the CD:
$ sudo apt-get install ripit flac [..] $ ripit --coder 2 --eject --nointeraction [..]
And finally we adjust the tempo and pitch:
$ apt-get install sox libsox-fmt-mp3 [..] $ sox 01.flac 01.mp3 pitch -7.85 tempo 1.00 # (Tuning notes) $ sox 02.flac 02.mp3 pitch -7.85 tempo 0.95 # Too fast! $ sox 03.flac 03.mp3 pitch -7.85 tempo 1.01 # Close.. $ sox 04.flac 04.mp3 pitch -7.85 tempo 1.03 # Too slow!
(I'm converting to MP3 at the same time it'll be more convenient on my phone.)