Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
mulfordjc committed Mar 1, 2015
1 parent 4e57888 commit 004db22
Showing 1 changed file with 36 additions and 2 deletions.
38 changes: 36 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

0 comments on commit 004db22

Please sign in to comment.