The document is about an API workshop on November 21, 2010 presented by Paul Lamere from The Echo Nest. The workshop covered The Echo Nest's APIs for analyzing music audio and metadata. It showed how to use the APIs to build applications that can identify songs, generate playlists, visualize music, and enable music remixing and mashups. The Echo Nest's APIs allow developers to analyze tracks, segments, beats, bars and other musical elements to build a variety of music applications and experiences.
13. Get your gaga on ... from python
>> from pyechonest import artist
>>
>> gaga = artist.search_artists(‘Lady Gaga’)[0]
>> gaga
<Artist ‘Lady Gaga’>
>> gaga.hotttnesss()
0.86328906000000005
>> gaga.similar(2)
[<Artist 'Ashley Tisdale'>, <Artist 'Britney Spears'>]
Friday, November 20, 2009
14. ARTIST RADIO IN TEN LINES OF CODE
def wander(band, max=10):
""" generate a playlist by wandering a seed artist neighborhood """
played = []
while max:
if band.audio():
audio = random.choice(band.audio())
if audio['url'] not in played:
play(audio)
played.append(audio['url'])
max -= 1
band = random.choice(band.similar())
Friday, November 20, 2009
15. Find Weezer’s neighbors in Java
ArtistAPI artistAPI = new ArtistAPI(MY_ECHO_NEST_API_KEY);
List<Artist> artists = artistAPI.searchArtist("Weezer”, false);
if (artists.size() > 0) {
for (Artist artist : artists) {
List<Scored<Artist>> similars =
artistAPI.getSimilarArtists(artist, 0, 10);
for (Scored<Artist> simArtist : similars) {
System.out.println(" " + simArtist.getItem());
}
}
}
Friday, November 20, 2009
16. Things you can build with
The Echo Nest
Artist API
Friday, November 20, 2009
34. Visualizing Kid-A
Song visualizations by using Echo Nest Analysis
Visualizations by Chris Mueller
Friday, November 20, 2009
35. Visualizing Song self similarity
The shape of the song
Madonna, Like A Prayer
Reich, Steve – Music for 18 Musicians: Pulses
Visualization by Chris Mueller
Friday, November 20, 2009
36. SYNCHSTEP
MATCH MUSIC TO YOUR PACE
Friday, November 20, 2009
37. Song visualization on the iPhone
Cocoa framework for the Echo Nest
Friday, November 20, 2009
38. Beethoven Hero
Synchronizing visualizations with music
By Anita Lillie
Friday, November 20, 2009
43. >> song.segments
[segment, segment, segment...]
>> song.segments[10].start
34.502
>> song.segments[10].timbre
[-30.2, -10.4, 4.5, 3.2...]
>> song.segments[10].pitch
[0.5, 0.13, 1.0, .... ]
>> song.beats.reverse()
>> for i in segments:
i.stretch(2)
i = i + othersong.segment[12]
>> You can mix elements, time stretch them, detect & change pitch, move them
around, repeat them on downbeats, find a closest match in another song, detect and
modify volume envelopes, read/write mp3, aiff, wav
ALL SONG ELEMENTS ARE ITEMS IN A LIST
Friday, November 20, 2009
44. WHAT
THE ECHO NEST REMIX API
DOES
Friday, November 20, 2009
45. def one(input_filename, output_filename):
audiofile = audio.LocalAudioFile(input_filename)
bars = audiofile.analysis.bars
collect = audio.AudioQuantumList()
for bar in bars:
collect.append(bar.children()[0])
out = audio.getpieces(audiofile, collect)
out.encode(output_filename)
Friday, November 20, 2009