Skip to content

Latest commit

 

History

History
199 lines (130 loc) · 7.46 KB

Tips.md

File metadata and controls

199 lines (130 loc) · 7.46 KB

Tips

Examples

Audio features

Spotify collaborates with the Echo Nest Project and provides algorithmic analysis of all tracks. These "audio features" can be used to filter existing playlists. For example, to create a melodic playlist out of "Pitchfork's Best New Tracks":

#order by instrumentalness
https://open.spotify.com/user/pitchforkmedia/playlist/5ItokEl1f0bbHeXWFiisrm

To create a hip-hop playlist:

#order by instrumentalness
#reverse
https://open.spotify.com/user/pitchforkmedia/playlist/5ItokEl1f0bbHeXWFiisrm

To create a workout playlist:

#order by energy
https://open.spotify.com/user/pitchforkmedia/playlist/5ItokEl1f0bbHeXWFiisrm

To create a dancing playlist:

#order by danceability
https://open.spotify.com/user/pitchforkmedia/playlist/5ItokEl1f0bbHeXWFiisrm

Last.fm

To create a playlist of a user's recently played tracks:

http://www.last.fm/user/username/library

To create a playlist of tracks a user has listened to on a particular day:

http://www.last.fm/user/username/library?from=2012-07-21&to=2013-07-21

To create a playlist of a user's favorite tracks for a given year:

http://www.last.fm/user/username/library/tracks?from=2012-01-01&to=2013-01-01

To create a playlist of a user's favorite tracks of all time:

http://www.last.fm/user/username/library/tracks

To create a playlist of a user's loved tracks:

http://www.last.fm/user/username/loved

To create a playlist of a user's favorite albums:

http://www.last.fm/user/username/library/albums

To create a playlist of a user's favorite artists:

http://www.last.fm/user/username/library/artists

To create a playlist of an artist's top tracks:

http://www.last.fm/music/Artist+Name/+tracks

To create a playlist of artists similar to an artist:

http://www.last.fm/music/Artist+Name/+similar

Last.fm's webpages are a goldmine of recommendations. For example, if one has a high compatibility with another user, that user's "top tracks" often makes for an interesting playlist.

Similarly, one's own "top tracks" are also a good source of favorites, especially in combination with a time criteria. The "top tracks" chart for an earlier year is a good indication of one's listening habits in that time period, and a rich source of "lost gems" which one may have forgotten about in the meantime.

Last.fm also provides information about an artist's top tracks and similar artists. Such functionality is built into Spotify as well, but Last.fm's recommendations are a good supplement.

Recipes

Last.fm similar artists, interleaved together

#alternate by artist
http://www.last.fm/music/Artist+Name/+similar

Artist's discography ordered by user's Last.fm rating

#order by lastfm username
#artist Beach House

Top tracks grouped by artist

#order by popularity
#group by entry
#top ...
#top ...
#top ...
...

Top tracks grouped by artist, ordered by Last.fm rating

#order by lastfm
#group by entry
#top ...
#top ...
#top ...
...

Albums ordered by Last.fm rating

#order by lastfm
#group by entry
#album ...
#album ...
#album ...
...

First track from each album

#alternate by album
#album ...
#album ...
#album ...
...

Similar music to multiple artists

#order by popularity
#alternate by artist
#similar ...
#similar ...
#similar ...
...

Similar music to multiple artists, ordered by Last.fm rating

#order by lastfm
#alternate by artist
#similar ...
#similar ...
#similar ...
...

Multiple playlists

Converting multiple playlists at once can easily be done in the Bash shell:

for f in *.txt; do spotgen "$f" "${f%.txt}.spotify.txt"; done

This converts playlist1.txt, playlist2.txt, playlist3.txt to playlist1.spotify.txt, playlist2.spotify.txt, playlist3.spotify.txt.

Furthermore, if the shell supports globbing, then one can recursively convert all playlists in a directory with the **/*.txt pattern:

for f in **/*.txt; do spotgen "$f" "${f%.txt}.spotify.txt"; done

M3U playlists

One can easily import extended M3U playlists containing EXTM3U metadata. If the playlist does not contain metadata (or if the files are badly tagged), however, then one can attempt to infer the title and artist from the file paths instead. To do this, open the playlist in a text editor and use regular expressions to transform it. For example, the regular expression

%s/\(^[^\/]+\).*\/[-0-9]*[-. ]*\(.*\)\..*/\2 - \1/g

transforms the playlist

Beach House/Teen Dream/04 Walk in the Park.mp3
Beach House/Bloom/10 Irene.mp3
Beach House/Bloom/04 Other People.mp3
Beach House/Bloom/06 Troublemaker.mp3
Beach House/Bloom/08 Wishes.mp3

to the compatible text file

Walk in the Park - Beach House
Irene - Beach House
Other People - Beach House
Troublemaker - Beach House
Wishes - Beach House

Since file name standards vary, the transformation requires some personal judgment; that is why it is not built into the script. (See this blog post for more examples.)

Note that other playlist formats, like ASX, PLS, WPL and XSPF, are difficult to work with directly. Therefore, it is recommended to save to M3U format and proceed as outlined above.

Miscellaneous

Single tracks should be on the form Artist - Track. However, Spotify isn't terribly strict about this; Track - Artist also works well, as does a Spotify search. One can even add field filters.

Links