Instagram takes normal-looking photos and makes them look shitty in the name of “vintage-cool.” What if phone calls worked the same way? For my Redial final project, I built Instagramophone*, a service that lets a user choose from five different vintage audio filters to apply to their voice. You can try it out for yourself by calling (360) 215-1975.
Callers are asked to choose one of five different filters for their voice, all inspired by vintage sound media. The choices are a wax cylinder, an LP record, an FM radio, a cassette tape and scrambled porn. After recording their message, the effect is applied and played back. Callers then have the option of uploading their sound to Soundcloud.
The application was built in Asterisk, with SoX to do the audio processing and Ruby to upload to Soundcloud. When a user records their message, Asterisk sends the recorded file in to a shell script that does the necessary slicing and dicing to create my desired effect. The cassette tape filter, for example, looks like this:
#split the source recording and apply bends up and down
sox $1 /projects/instagramophone/temp/$tempConversionDir/bend.wav trim 0 1 bend .25,300,.25 .25,-300,.25 : newfile : restart
#recombine the split files
sox /projects/instagramophone/temp/$tempConversionDir/*.wav -c1 /projects/instagramophone/temp/$tempConversionDir/mixdown.wav
#add cassette tape sound effects to beginning and end
sox -c1 /projects/instagramophone/static/wav/cassette.wav /projects/instagramophone/temp/$tempConversionDir/mixdown.wav -c1 /projects/instagramophone/static/wav/cassetteend.wav -r 8000 -c1 /projects/instagramophone/messages/altered/$sourcefile
The scrambled porn filter is a little more complicated. After watching this clip of scrambled pay-per-view (SFW), I wanted to make my filter cut the audio in and out rapidly. I did that by splitting the recorded file in to many tiny chunks and alternating the volume up and down:
#split the file in to 0.1 second chunks
sox $1 /projects/instagramophone/temp/$tempConversionDir/trim.wav trim 0 0.1 : newfile : restart
declare -i counter=0
#loop through all the chunks
for i in /projects/instagramophone/temp/$tempConversionDir/*.wav; do
#alternate high and low volume
if [[ $counter%2 -eq 0 ]]; then
sox -v2.0 $i /projects/instagramophone/temp/$tempConversionDir/$tempEffectDir/$filename
sox -v0.1 $i /projects/instagramophone/temp/$tempConversionDir/$tempEffectDir/$filename
#recombine and add scrambled porn background
sox /projects/instagramophone/temp/$tempConversionDir/$tempEffectDir/*.wav /projects/instagramophone/temp/$tempConversionDir/mixdown.wav
sox -m -v1.5 /projects/instagramophone/temp/$tempConversionDir/mixdown.wav -v0.8 /projects/instagramophone/static/wav/scrambledporn.wav -r 8000 -c1 /projects/instagramophone/messages/altered/$sourcefile
Please call it up and leave a message!
*I searched the name and found that a similar project already exists with the name Instagramophone (link, GitHub), so I hope they don’t mind me using it as well. Both our projects use SoX to apply effects to the voice, but that’s about as much as they have in common.