On why I've created the toolkit, and on how I'm currently sad.
Some time ago I encountered an interesting challenge for the first time: putting together a playlist of songs to play during a DJ set with some friends.
There are many songs I like, and when I listen to them, I can easily identify the right one to set the mood I have in mind for a particular moment.
However, I’m not the kind of person who can instantly recall the title, artist, or album of a specific track when prompted. I struggle to remember melodies unless I actively reconstruct the context, and I find it difficult to make connections between a musical motif - perhaps just briefly hinted at - and another melody I might have heard in the past.
Lacking these intuitive skills, I decided to create a tool to help me with the task.
I particularly liked the idea of visualizing all my favorite songs in a spatial format, arranging them in an organized way on a two-dimensional plane, making it easier to explore and navigate them in new ways.
It was from these thoughts that the "My Loved Song Exploration Toolkit" was born.
The toolkit, which can be seen in action here and is also available as open-source code on GitHub[1] displays a kind of "Clustered Force Layout graph" within a two-dimensional chart, featuring circular entities of different sizes and colors.
Each circle corresponds to a song I have liked on Spotify. Its position in the two-dimensional space is determined by the song's tempo (X-axis) and danceability parameter (Y-axis), while its size and color are mapped to the energy and valence parameters, respectively.
Specifically, by outlining the meaning of each parameter below, we can see that, at least according to Spotify's definition[2]:
tempo: The overall estimated tempo of a track in beats per minute (BPM). In musical terminology, tempo is the speed or pace of a given piece and derives directly from the average beat duration.
danceability: Danceability describes how suitable a track is for dancing based on a combination of musical elements including tempo, rhythm stability, beat strength, and overall regularity. A value of 0.0 is least danceable and 1.0 is most danceable.
energy: Energy is a measure from 0.0 to 1.0 and represents a perceptual measure of intensity and activity. Typically, energetic tracks feel fast, loud, and noisy. For example, death metal has high energy, while a Bach prelude scores low on the scale. Perceptual features contributing to this attribute include dynamic range, perceived loudness, timbre, onset rate, and general entropy.
valence: A measure from 0.0 to 1.0 describing the musical positiveness conveyed by a track. Tracks with high valence sound more positive (e.g. happy, cheerful, euphoric), while tracks with low valence sound more negative (e.g. sad, depressed, angry).
These four parameters are just some of the indices used in the field of music information retrieval[3] Other parameters that would have been interesting to analyze in future versions of the toolkit (unfortunately no longer possible, see below) and that were available through Spotify’s API included loudness, key, mode, and time_signature, as well as speechiness, acousticness, and liveness.
From the filters section of the toolkit, you can refine your search by focusing only on tracks that fall within the defined characteristic ranges.
Alternatively, using the search field, you can find all tracks that belong to a specific artist, a particular album, or share the same word in the title!
In my opinion, the search field is essential for answering that classic question: "What was the name of that track by artist XY? I'm sure I had saved it among my favorites..."
By hovering the mouse over each circle, you can listen to a preview of the track (made available via the Spotify API). Finally, by clicking, you can "select" the given track.
The selected track will appear at the bottom of the site as a row in the table labeled "Selected Songs". Here, you can collect a subset of songs to later export in JSON format for future post-processing.
Unfortunately, I've just realized that the tool will never be updated again, nor will the display of my liked songs be able to include the new tracks that, over the past two years, I've added to my liked song Spotify playlist.
This is due to Spotify's decision[4][5] to discontinue certain APIs on which the tool relied.
This makes me a little sad because I would have been curious to continue with this personal experiment, perhaps even using it in the future to build new playlists for other DJ sets.
However, I'm glad to preserve a sort of "snapshot" of my favorite songs as they were during my last push.
A non-exhaustive list of things I would like to explore regarding the topic of Music Information Retrieval: