Git Product home page Git Product logo

adeishs / fanimae Goto Github PK

View Code? Open in Web Editor NEW
0.0 1.0 0.0 77 KB

A desktop music information retrieval system. An experimental tool used for PhD research. A very fast symbolic music information retrieval system.

Home Page: https://adeishs.github.io/fanimae/

License: Other

Gnuplot 0.42% C 74.58% Perl 25.00%
music music-information-retrieval information-retrieval search search-engine search-algorithm n-gram index database c perl perl5 research research-project

fanimae's Introduction

Fanimae MIREX 2010 Edition (patch 3)

Overview

Fanimae MIREX 2010 Edition is a desktop music information retrieval system. In this version, two algorithms are implemented: ngr5 and pioi. Refer to the paper describing the algorithms.

ngr5 is the 5-gram coordinate matching implemented in Fanimae MIREX 2005 Edition. This is based on Uitdenbogerd and Zobel (2002).

pioi is the dynamic programming matching described in §7 of Suyoto and Uitdenbogerd (2008).

Like Fanimae MIREX 2005 Edition, this version also ships with a MIDI parser to convert MIDI files into sequence files to facilitate searching.

Installation

fnmib and fnmspioi are written in C and should be able to be compiled by any ISO C-compliant (to the 1990 standard) compiler. Consult your C implementation documentation on how to build the programs. If you are using GCC and GNU Make, you can use Makefile.gnu.

Both fnmib and fnmspioi require oakpark (included in the distribution). oakpark is not part of the RMIT MIRT Project.

fnmsngr5 and fnmmp are written in Perl and have been tested with perl version 5.10.1. fnmmp requires the MIDI package from CPAN.

Depending on your environment, you may wish to adjust the path to perl in the she-bang line in the Perl scripts.

How to use

Note: if you want to use Fanimae in a fully MIREX-compliant way, follow the instructions in Section 4 instead.

  1. Run fnmmp.pl to convert a directory containing a collection of MIDI files to a Fanimae sequence file, e.g.
    % ./fnmmp.pl /directory/containing/collection my-seq
    
    my-seq will be produced in your current working directory.
  2. Run fnmmp.pl to convert a directory containing a query set of MIDI files to a Fanimae sequence file, e.g.
    % ./fnmmp.pl /directory/containing/queries my-query
    
  3. [This is only mandatory if you want to search using the ngr5 algorithm.] Run fnmib to generate an index of sequences, e.g.
    % ./fnmib my-idx my-seq
    
    The following files will be produced: my-idx.fdl, my-idx.filp, and my-idx.fipp. If you wish to rename the index, you must rename all of them, e.g. if you wish to rename my-idx to your-idx, you should rename my-idx.fdl, my-idx.filp, and my-idx.fipp to your-idx.fdp, your-idx.filp, and your-idx.fipp respectively.
  4. To search:
    • Using the ngr5 algorithm: Run fnmsngr5.pl to search. fnms.pl expects queries to be fed from the standard input, e.g.
      % ./fnmsngr5.pl my-idx < my-query
      
    • Using the pioi algorithm: Run fnmspioi to search. fnmspioi expects queries to be fed from the standard input, e.g.
      % ./fnmspioi my-seq < my-query
      

The answers will be output to the standard output.

Producing MIREX-compliant results

Note: this has only been tested against the official MIREX 2010 Symbolic Melodic Similarity dataset.

Make sure that the following CPAN modules are installed:

  • Fcntl
  • File::Spec
  • File::Copy
  • File::Path
  • FileHandle
  • IO::File
  • IPC::Run
  • MIDI
  • MIDI::Simple

The fnmmirex.pl wrapper script has been written for the purpose of MIREX 2010. Usage:

% ./fnmmirex.pl alg /coll/files/dir/ query.mid

alg is either ngr5 or pioi.

The first invocation takes a bit longer than subsequent invocations as the first one will also build the index and sequence files and cache them for subsequent uses.

Usage examples:

./fnmmirex.pl ngr5 essen/midi/ query.mid

The output will be:

query.mid ans1.mid ans2.mid ans3.mid ... ans10.mid

Separate indexing and searching invocations can be achieved if needed.

To only index:

% ./fnmmirex.pl - /coll/files/dir/

To search, simply use the script by specifying the algorithm as specified above, e.g.:

./fnmmirex.pl ngr5 essen/midi/ query.mid

./fnmmirex.pl pioi essen/midi/ query.mid

Licence

The use of Fanimae is governed by the MIT Licence.

fanimae's People

Contributors

adeishs avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.