My Awesome Phase Vocoder (Audio Examples and Free Software Download)

I've been spending a good amount of time working on a phase vocoder lately. I'm happy to say I have an early working demo version that sounds quite good.

Piano Waveform Stretched and Compressed

The phase vocoder allows for stretching and compressing the time duration of audio (as shown in the waveforms above) without changing the pitch or having adverse effects on the quality of the audio.

The phase vocoder is a crucial part of many popular music production software packages, and used in various other audio processing applications. For music production, it allows for beat matching audio snippets (i.e. loops). When used in conjunction with a resampler, one can produce multiple notes from a single audio sample (e.g. a single piano key strike).

I won't go into all of the details of how the phase vocoder works, but the basic process consists of taking a short duration of audio, converting it to the frequency domain and calculating new "stretched" or "compressed" phase values. Once the new phases are calculated, the frequency information is converted back to the time domain resulting in a new output signal. Overlapping and adding these output signals results in stretched or compressed audio output.

Audio Stretching/Compressing Examples

The following short snippets of audio demonstrate the quality of my phase vocoder. Each sound has three different audio samples: the original sound, an example of the sound stretched using my phase vocoder and an example of the sound compressed, again, using my phase vocoder:

Sound Original Stretched Compressed
Piano
808Kick
Guitar
Synth

The stretch and compress values applied to the above sounds vary. For example, the piano is stretched to 150% of the original sound and compressed to 75%. The 808 kick is 400%/25%, the guitar is 180%/40%, and the synth is 200%/50% respectively.

The Software (Updated)

If you're interested in giving it a try on your own audio, a command line executable can be easily built for Windows, MacOS or Linux using the instructions on github here.

The command line usage is quite simple. For example, to stretch the audio to twice as long use the following options:

 PhaseVocoder --input inputfile.wav --output outputfile.wav --stretch 2.0

For command line usage please use the '--help' option. For extended help and additional usage examples please use '--longhelp'.

Also, please note that the Phase Vocoder currently only accepts mono (single channel) 16 bit uncompressed wave files as input.

Date: February 14th, 2017 at 9:42pm
Author: Terence Darwen
Tags: Audio Software, Cross-Platform Development, Phase Vocoder, Digital Signal Processing, DSP, C++

Previous Next