Tristan Jehan, one of the founders here at the Echo Nest, has created a Python script that will take a 4/4 song and turn it into a waltz. The script uses Echo Nest remix, a Python library that lets you algorithmically manipulate music. Here’s an example of the output of the script when applied to the song ‘Fame’:
Turning a 4/4 song into a 3/4 song while still keeping the song musical is no easy feat. But Tristan’s algorithm does a pretty good job. Here’s what he does:
- Start with a 4/4 measure
- Cut the 4/4 measure into 2 bars with 2 beats in each bar
- Stretch the first beat of each bar by 100%
- Adjust the tempo to a typical waltz tempo
Here’s a graphic that shows the progression:
Here are some more examples:
Tristan has made the waltzifier code available on github. If you want to make your own waltzes, get yourself an Echo Nest API key and grab Echo Nest remix and start enjoying the power of 3.
#1 by bedroom on March 23, 2012 - 2:45 pm
I hate to be nitpicking, but the Meshell and Craig Davis tracks have not been “walzified”. They’ve turned into a 6/8, a 2 beats ternary measure with the kickdrum on the 1 and the snare landing on the 2 (it goes 1-and-and, 2-and-and). That can be easily explained by the Echo Nest API having trouble detecting half-time feel. The other songs worked better, you get the kickdrum on the 1 and the snare on the 3, it’s a real 3/4 measure.
#2 by nick on March 30, 2012 - 4:07 pm
excuse my probably nubile question.
How/why do you go from line 3 and line 4 in the diagram?
#3 by Paul on March 30, 2012 - 5:55 pm
Nick – line 3 and 4 are actually the same. The eighth notes in the first beat are perceived as beats one and 2. — Paul