echoplot – Plot song loudness using the EchoNest API

As I’m working on the second part of my analysis of the Rolling Stone 500 Greatest songs of all time, I needed to draw the loudness representation of various songs extracted from the EchoNest API. I’ve been using mathplotlib with pyechonest, and as the process is quite repetitive, I’ve packaged everything as echoplot, so you can easily plot song loudness using the EchoNest API.

pip install echoplot

Once you’ve setup your EchoNest API key as an environemnt variable ECHO_NEST_API_KEY, just run echoplot

marvin-7:~ alex$ echoplot -h
usage: echoplot [-h] [-s START] [-e END] artist title

Plot loudness of a song using the EchoNest API.

positional arguments:
  artist                the song's artist, e.g. 'The Clash'
  title                 the song's title, e.g. 'London Calling'

optional arguments:
  -h, --help            show this help message and exit
  -s START, --start START
                        start analysis at a given time (seconds)
  -e END, --end END     end analysis at a given time (seconds)

For example

marvin-7:~ alex$ echoplot 'The Clash' 'London Calling'
The Clash - London Calling
The Clash – London Calling

or

marvin-7:~ alex$ echoplot Radiohead 'Paranoid Android'
Radiohead - Paranoid Android
Radiohead – Paranoid Android

The plot also displays the different segments of the song (chorus, verse, etc.), also provided by the EchoNest API. Echoplot’s source code is on github and the package is on PyPI.

Leave a Reply

Your email address will not be published. Required fields are marked *