dominikschnitzer / musly

Musly - Music Similarity Library
http://www.musly.org
Mozilla Public License 2.0
138 stars 26 forks source link

Musly

(c) 2013-2014, Dominik Schnitzer dominik@schnitzer.at and 2014-2016, Jan Schlüter jan.schlueter@ofai.at

Musly is a program and library for high performance audio music similarity computation. Musly only uses the audio signal when computing similarities! No meta data is used in the similarity computation process.

The source code is released under the MPL 2.0 see the file <musly/COPYING>

Version History

VERSION 0.2 (under development)

Not released yet.

The second public Musly release. It includes the following changes and additions:

VERSION 0.1

Released on 30 Jan 2014.

The first public Musly release. It includes two basic audio music similarity measures:

For benchmarks and qualitative comparisons between other audio music similarity measures visit http://www.musly.org.

Installation

Musly uses the CMake build system, and depends on Eigen 3 and ffmpeg or libav 0.8 or above.

Ubuntu prerequisites

On Ubuntu, all requirements can be installed with: sudo apt-get install cmake libeigen3-dev libavcodec-dev libavformat-dev libavutil-dev

Windows prerequisites

For Windows, the easiest way seems to be to use MSYS2. Install it and launch the "MinGW-w64 Win64 Shell" from the start menu (not the "MSYS2 Shell"), then run:

# Update repository information
pacman -Sy
# Install prerequisites
pacman -S mingw-w64-x86_64-{gcc,cmake-git,pkgconf,eigen3} make wget p7zip
# Download and install precompiled ffmpeg libraries
wget https://ffmpeg.zeranoe.com/builds/win64/dev/ffmpeg-latest-win64-dev.7z
wget https://ffmpeg.zeranoe.com/builds/win64/shared/ffmpeg-latest-win64-shared.7z
7z x ffmpeg-latest-win64-dev.7z
7z x ffmpeg-latest-win64-shared.7z
mv ffmpeg-latest-win64-dev/include/* /usr/include
mv ffmpeg-latest-win64-dev/lib/* /usr/lib
mv ffmpeg-latest-win64-shared/bin/* /usr/bin
rm -rf ffmpeg-latest-win64-*
# Download and extract latest musly snapshot from git
wget https://github.com/dominikschnitzer/musly/archive/master.zip
7z x master.zip
cd musly-master

Compilation

To compile Musly, it is good practice to create an empty directory to build in. This can be placed inside your Musly source tree. Assuming you are in the source tree, run the following commands to build and install Musly (Note: For Windows, add -G"MSYS Makefiles" to both of the cmake lines below):

mkdir -p build && cd build  # create and switch into build directory
cmake ..                    # configure Musly
make                        # compile Musly
sudo make install           # install Musly

To perform a self-test of the library, optionally run (still inside build):

cmake -DBUILD_TEST=ON ..
make
# cp -a libmusly/*.dll libmusly/*/*.dll test/  # required for Windows only
ctest -V

It should end with 100% tests passed, 0 tests failed.

Command Line Tool

The command line interface is able to:

The command line tool is called "musly". Use "musly -h" to read about all available options. See http://www.musly.org for more information.

Library

Please see the library documentation in <doc/html> directory or on-line.

Development

To help Musly development and fix bugs the most convenient way is to use Eclipse. To generate an Eclipse project run:

cmake -G"Eclipse CDT4 - Unix Makefiles"\
      -DCMAKE_ECLIPSE_EXECUTABLE=/path/to/eclipse/eclipse \
      /path/to/musly-src

from an empty directory. The directory is filled with Eclipse project information which can be imported as an Eclipse project.