SoX: How to Change Audio Pitch

Updated

Learn how to change the pitch of an audio file using SoX

SoX: How to Change Audio Pitch

Before we start, make sure you have Homebrew installed on your Mac and an audio file ready, like input.wav.

First, open your Terminal by pressing command + space and typing Terminal. Let's install SoX by running:

brew install sox

Homebrew will download and install the package, which usually takes just a few seconds to finish.

Once that's done, navigate to the folder containing your audio file. To raise the pitch by two semitones, run this command:

sox input.wav output.wav pitch 200

SoX measures pitch in cents, where 100 cents equals one semitone, so 200 raises it by two full semitones. If you want to lower the pitch by two semitones instead, just use a negative number:

sox input.wav output.wav pitch -200

To make sure everything worked, play back your new file right in the terminal by running play output.wav. You should immediately hear the updated pitch.

If you want to experiment with different pitch levels without saving a new file every time, just run play input.wav pitch 200 to preview the sound live.