Making Music in the Python Shell
These are a few songs that I made using the Echo Nest python client, each with less than 20 lines of code. Remixing a song requires just a few lines of high-level API scripting to extract the beat and structure from the song:
def main( toReverse, inputFilename, outputFilename ) :
audioFile = audio.LocalAudioFile(inputFilename)
if toReverse == 'beats' :
chunks = audioFile.analysis.beats
elif toReverse == 'segments' :
chunks = audioFile.analysis.segments
A couple observations about Echo Nest:
99% of the time taken when creating a remix is uploading to the web-based server. If Echo Nest (or someone else) were to provide a Dropbox-like desktop folder where you could drop music files and they could be instantly uploaded to the cloud, then this service would essentially run in realtime, and allow for live performances off your laptop (or iPhone!) shell.
Someone who is good at procrastinating will have to try getting this up on App Engine. Especially now that the filesize limit on GAE has been raised from 1MB to 10MB.
Music isn’t the only thing this service is good for….more on that, later.
