Now, instead of well-weighed opinions, here’s some gushing stuff about stuff I found.

In May 2010, one of the coolest music-related things ever hit the Internet: The Swinger came to be.

The Swinger is a relatively simple application: It just takes a music file, finds the beats, then stretches every other beat and compresses every other beat, without altering the pitch. In layman terms: It turns “thump thump thump thump” beat into “thaaa-dappa thaaa-dappa” beat. It’s a very simple idea, but it works pretty effectively; the only big problems are finding the beats automatically and time-stretching the audio, which are a bit challenging problems for people (like me) who don’t know jack about DSP.

The thing came to be, and vanished. But all was not lost.

Now, the concept was grand and noble, but there are some problems with this particular concept, most of them legal. The biggest mistake they made was that they posted Metallica’s Enter Sandman on the website. What happens when you take an averagely badass metal song and add 55% more shoulder-wringing sexiness to it, a fact that is not very Trüe? That’s right, the Metallica guys smell Napster again and sue the whole lot. OK, these days the copyright enforcement operates in a rather civil manner and only the track was nuked from Soundcloud - but still…

The second legal problem was that the source code relied on Echo Nest, a cloud-based audio processing system. The source code may be open, but it relied on a framework that isn’t, and it wasn’t runnable without an API key to begin with.

The sad part is, I just kept looking at the page and didn’t notice that people are working on fully open source stuff. It took me until the files disappeared from Soundcloud to start wondering who the hell has a copy of the awesome swingin’ Money for Nothing. Then I started wondering if such tools would be already out there in the OSS world.

Yes, there is. Apparently, only after a couple of weeks, Chris Cannam took up the challenge and provided a fully open source implementation.

It’s a bloody shell script.

OK, it relies on Vamp audio analysis plugin architecture and Rubberband time-stretching library, but dadgummit - it’s a shell script.

Now, currently, running the script on Debian Unstable requires some arts and crafts. You need the package vamp-examples to get the vamp-simple-host tool. The Vamp Aubio (sic) binaries can be found in Vamp plugin page; the precompiled binaries worked just fine for me. Rubberband provided with Debian in rubberband-cli is, at the moment, obsolete; you need to compile Rubberband 1.6 from source (I recommend stow for handy /usr/local directory tree management).

A simple observation: Yes, the shell script works just as well as the examples on The Swinger page. Too bad it sometimes gets out of sync, but I’d say that the shell script’s rendition of Enter Sandman was less problematic than the one from Echo Nest. At least the glitching was intermittent and the entire last part of the song wasn’t out of sync.

However, what really excites me are two things: The actual swing algorithm is pretty simple, and Vamp plugin support is coming (or has already come?) to Audacity; it would be relatively easy to do automatic beat detection using Vamp Aubio to produce a label track, then tweak the results by hand, export the labels, and feed them to a script that produces a mapfile for Rubbedband. 100% accurate hand-tweaked swinging!

Can’t promise anything yet, but here would be one hacking project for me…