Musly is a fast and high-quality audio music similarity library written in C/C++. It currently implements two music similarity algorithms. A third commercial one can be licensed from OFAI. The implemented similarity routines are described and evaluated in more depth in the Similarity Methods page.
Musly is licensed under the terms of the MPL 2.0 open source license, a permissive weak copyleft license.Musly can be used as library in your program or through a small command line application. The command line application
General information about Audio Music Similarity can be found in my PhD thesis which is also available as book on Amazon.
cmake SRCDIR
while in BINDIR to configure Musly
make && make install
to compile and install Musly
# musly -N
# musly -x mp3 -a /path/to/music
# musly -p metal.00047.au Computing the k=5 most similar tracks to: metal.00047.au metal.00053.au metal.00054.au metal.00056.au metal.00050.au metal.00049.au
Music Similarity Library (Musly) - http://www.musly.org Version: 0.1 (c) 2013-2014, Dominik SchnitzerOptions for musly/musly/musly -h this help screen. -v 0-5 set the libmusly debug level: (0: none, 5: trace). DEFAULT: 0 -i information about the music similarity library -c COLL set the file to write the music similarity features and to use for computing similarities. DEFAULT: collection.musly -k NUM set number of similar songs display when computing playlists ('-p') or evaluating the collection ('-e'). DEFAULT: 5 INITIALIZATION: -n MTH | -N initialize the collection (set with '-c') using the music similarity method MTH. Available methods: mandelellis,timbre '-N' automatically selects the best method. MUSIC ANALYSIS/PLAYLIST GENERATION: -a DIR/FILE analyze and add the given audio FILE to the collection file. If a Directory is given, the directory is scanned recursively for audio files. -x EXT only analyze files with file extension EXT when adding audio files with '-a'. DEFAULT: '' (any) -p FILE print a playlist of the '-k' most similar tracks for the given FILE. If FILE is not found in the collection file, it is analyzed and then compared to all other tracks found in the collection file ('-c'). LISTING: -l list all files in the collection file. -d dump the features in the collection file to the console EVALUATION: -e NUM | -E perform a basic kNN (k-nearest neighbor) music genre classification experiment using the selected collection file. The parameter k is set with option '-k'. The genre is inferred from the path element at position NUM. The genre position within the path is guessed with '-E'. -f NUM Use an artist filter for the evaluation ('-e'). The artist name is inferred from the path element at position NUM. DEFAULT: -1 (No artist filter) -m FILE compute the full similarity matrix for the specified collection and write it to FILE. It is written in MIREX text format (see http://www.music-ir.org/mirex).