Mapping of Songs using SOM

The goal of this project is to create a simple and comfortable method for the user to organize his music files’ database.

Abstract
The goal of this project is to create a simple and comfortable method for the user to organize his music files’ database. The proposed solution is based on the fact that when the information is displayed visually it is easier to receive it. Thus, instead of the standard arrangement of music files in folders and sub-folders, we will display all of the musical files of the user in a map, where every song is represented by a point. The map will be created in a way that songs that “sound alike” will be placed next to each other, while different musical pieces will be placed far from each other on the map. Saying that two songs sound alike is subjective, hence we will let the user influence the arrangement of the songs in the map by asking him to place a few songs on the map.

The Algorithm
Parameter Analysis

Each song is analyzed in order to get a vector of 16 parameters that represents the song. The parameters are:

1. Short Time Parameters: Energy and Zero Crossings.
2. Spectral Short Time Parameters: Short Time Fourier Transform (5 spectral bands), Spectral Flux (5 spectral bands), Spectral Centroid, Rolloff Point.
3. Tempo Parameter: Tempo, Rhythmicity.
14 of the parameters are short time parameters. The short time parameters are analyzed on 10 short windows of 50ms of each song. The median of the 10 results is then taken as the relevant parameter.

Distance Function
The distance function was defined as a weighted euclidean distance function:
1
We calculate the 2 coefficients using the user’s input, which is placing a few songs on the map.

SOM Algorithm
The “self-organizing maps” algorithm (SOM) maps a set of n-dimensional vectors onto a two dimensional array of nodes in such a way that vectors projected onto adjacent nodes are more similar than vectors projected onto distant ones.

We transform the songs’ vectors from the 16-dimensional space to the 2-dimensional area of the user’s screen, using the SOM algorithm that uses the weighted euclidean distance function.

Tools
The algorithm was implemented using Matlab 5.3.

Data analysis was done using JMP 4.0.2 and MS Excel 97.

Results
An example for a map is shown below. Our songs’ database consists of 110 songs from 4 different music genres:

1. Classic – colored in blue
2. Hard Rock – colored in red
3. Dance Music – colored in black
4. Pop Music – colored in green
We used a 10X20 neuron map. For the map below we (as the user) placed 5 songs from each genre on each corner of the map.
3
As one can observe, there is a clear separation between the four genres.

Conclusions
Our approach for organizing music files (songs) in a map by their characteristics was found suitable. The SOM algorithm was found useful for our case, due to the representation of each song as vector of parameters. The parameters that were retrieved were found effective.

Acknowledgments
We would like to thank Shie Manor for supervising this project. Our acknowledgment goes also to the laboratory staff and to the Ollendorff Research Center Fund for their support.