Monday, June 27, 2011

Retrieve analysis (MFCC & Chroma) from EchoNest

EchoNest "offers an incredible array of music data and services for developers to build amazing apps and experiences". Me actually, haven't used EchoNest for nothing more than extracting MFCC and chroma features from songs. The feature extraction procedure is a "black box", however the motivation for employing it is obvious: EchoNest can act as benchmark tool.
    I had initially built a simple webpage for uploading and retrieving single songs. Eventually I realized that this is not efficient for lots of tracks. So I built a Matlab interface/function that performs batch processing.

GU interface
This program requires WGET but apart from that it's rather simple. It is based on Ellis' urlreadpost function; I simply modified some parts to fit my needs. There you have it:

Retrieve EchoNest analysis (sendspace link). Remember that you need an EchoNest API key.

Here's additionally the html code for the webpage I mentioned. It offers two forms: one to upload to EchoNest and one to retrieve the corresponding analysis file.



<html>
<title>Upload and Analyze</title>
<body>
<H1>Analyze a file using EchoNest API</H1>
<hr>


<H2> Upload </H2>
<FORM id="Form1" ACTION = "http://developer.echonest.com/api/v4/track/upload?api_key=*****************&filetype=wav&format=xml" method="POST" enctype="multipart/form-data">
<input type="file" name="track" ><br>
<P><INPUT TYPE = SUBMIT value="Submit">
</FORM>
<br>
After submitting an XML file will be shown. Use the "id" field on the form below to retrieve the analysis link.


<H2> Retrieve Analysis </H2>
<FORM id="Form2" ACTION = "http://developer.echonest.com/api/v4/track/analyze?api_key=*****************&format=xml&bucket=audio_summary" method="POST" enctype="multipart/form-data">


ID value:<input type="text" name="id"  size="25"><br>


<P><INPUT TYPE = SUBMIT value="Submit">
</FORM>
</body></html>

0 comments: