From 004db225af96e4ff752d852276eb3ed1da4efdac Mon Sep 17 00:00:00 2001 From: mulfordjc Date: Sun, 1 Mar 2015 12:08:17 -0500 Subject: [PATCH] Update README.md --- README.md | 38 ++++++++++++++++++++++++++++++++++++-- 1 file changed, 36 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 820aeb0..6743453 100644 --- a/README.md +++ b/README.md @@ -7,6 +7,40 @@ We want to determine the best transitions between 2 songs if we ignore the tempo 2. How can we ignore tempo in determining a transition? # Resources -1. [The Infinite Jukebox] +1. [Echonest API] +2. [Infinite Jukebox] -[The Infinite Jukebox]: http://infinitejuke.com +### 1. Mini-abstract and relevance of [Echonest API] + +The Ehonest API is an API for song related information. It has methods that allow the user to get song information. Using the pyechonest.track module, you can find the relevant information of a segment to make a good transition. The information needed is pitch, duration, timbre, and loudness. + +```python +import pyechonest.track as track + +t = track.track_from_filename('file.mp3') +t.get_analysis() #this MUST be called before getting segment information can occur +for i in range(0,len(t.segments)): + print t.segments[i] +``` + +This will print the information of each segment. In order to get the specific information requested, we would need to access the element in each segment + +```python +import pyechonest.track as track + +t = track.track_from_filename('file.mp3') +t.get_analysis() +for i in range(0,len(t.segments)): + print t.segments[i]["timbre"] + print t.segments[i]["pitches"] + print t.segments[i]["duration"] + print t.segments[i]["loudness_max"] +``` + +### 2. Mini-abstract and relevence of [Infinite Jukebox] + +derp. + + +[Echonest API]: http://developer.echonest.com/docs/v4 +[Infinite Jukebox]: http://infinitejuke.com