Created by Paul Nasca and released in 2006, PaulStretch is an interesting audio tool designed for extreme sound stretching. It utilises a unique algorithm that produces incredibly smooth and unexpected results.
How extreme is the sound stretching? Well, since version 2.1 you are able to stretch a sound up to one quintillion times! One commenter on Synthtopia has done the head work for us:
“A one second sample stretched a quintillion times will last 31.7 billion years. I need a larger hard drive.”
In 2010, PaulStretch had a surge of popularity when a Justin Bieber song was given the PaulStretch treatment and set the internet on fire. The 3 minute pop song ‘U Smile’ was transformed into a 30 minute ambient masterpiece after being stretched by 800%.
This unexpected and unrecognisable result is what makes PaulStretch so much fun to use. With experimentation you can find a variety of interesting sounds and textures to be in used in audio / video productions, or maybe the next viral remix!
PaulStretch is available to download as a GUI application for Windows and Linux. A community maintained OSX port is also available which can be found here.
In 2011 Paul Nasca recreated the C++ algorithm with a simplified Python implementation which is available as a few different Python scripts. Although this implementation does not have the complete feature set found in the desktop GUI, it is still fully capable of producing a variety of great results. As a command line tool, the Python version also has the added benefit of further scripting potential such as batch processing and other cool stuff.
This article will primarily explore the setup and usage of the Python scripts, however any version of PaulStretch is well worth checking out.
Python is often already installed on a number of systems, this can be verified by heading to a command line window and entering:
If Python is installed, a version number will be returned. If installation is required on your system, checkout the Python Wiki for more information. I was able to get by with the default OSX version of 2.7x.
A few extra python dependencies called numpy and scipy are required for PaulStretch to run, these can be easily installed with the python package manager pip.
For OSX users, pip can be installed with the following command:
sudo easy_install pip
For Debian / Ubuntu systems, pip can be installed with apt:
sudo apt-get install python-pip
Once pip is ready to use, both dependencies can be installed with the following command:
pip install numpy scipy
Download the .py scripts hosted on Github or clone the repository if you have git installed:
git clone https://github.com/paulnasca/paulstretch_python.git
There are three PaulStretch Python scripts available, paulstretch_stereo.py is the recommended one to start with.
For information about running the script for the first time pass the --help parameter:
As you can see, there are only a few available options to get started. At just 150 lines long this is an impressively small script, but don’t underestimate it’s power!
In this example I will be starting with a 1.5 second sample of the Amen drum break. This is what the waveform looks like before processing:
Since it worked well for Justin Bieber I am going to specify a stretch parameter of 800% --stretch=“800”. Next I select the source file amen.wav and the output file amen-stretch.wav. My final command looks like this:
paulstretch_stereo.py --stretch="800" amen.wav amen-stretch.wav
After just a few seconds of processing time (seriously it is so fast) my file is ready. The end result is an impressive 19 minutes and 49 seconds long.
The paulstretch_newmethod.py script is also worth checking out as it offers a unique option to preserve transients. This also features a faster stretching method which apparently beats the GUI version in a speed test.
I put this new method to the test with a transient sensitivity amount of -t 0.9, I also kept the original drum sample:
paulstretch_newmethod.py --stretch="800" -t 0.9 amen.wav amen-2.wav
The end result is a much more defined waveform without the smooth and gentle flow of the previous method. It might not be the best choice if you are wanting a smooth ambient transformation but there is definitely potential to find and explore interesting sounds.
PaulStretch is a fascinating processing tool. Experimentation with different sound sources is highly recommended as you will encounter surprising and varying results. Some of the most unique sounds will come from the most unexpected sources.
Make sure to check out the other great Open Source projects by Paul Nasca, more info can be found on his website.