Code Monkey home page Code Monkey logo

musicjson-evaluation's Introduction

musicjson-evaluation

This toolbox is used to evaluate the custom implementation of the Mongeau-Sankoff-Measure for melodic similarity implemented in the musicjson-toolbox. It contains functions to convert songs of the essen folksong collection in **kern format to midi or xml, and from xml to json.

The scores aren't included, but are available from KernScores.

The two implemented algorithms calculate similarity scores between songsheets based on Mongeau-Sankoff-Measure. The MelodyShape-Implementation of 2015-ShapeH is used from Julian Urbano [1].

Commands

Convert songsheet

Generate xml or midi from **kern format:

python bin/convert.py kern/czech midi/czech --midi

python bin/convert.py kern/czech xml/czech --xml

Generate json from xml:

node bin/convert.js path/to/xml path/to/json

Calculate similarity score

MelodyShape:

# Usage:
python bin/similarity.py <algorithm> <collection> <queries> <output> [-c <cutoff>]

# Example: 2015-ShapeH with demo collection
python bin/similarity.py 2015-shapeh collection/midi/ query/midi result/data/2015-shapeh.csv

Mongeau-Sankoff:

# Usage:
node bin/similarity.js <algorithm> <collection> <queries> <output> [-c <cutoff>] [-k <value> [-k <value> [-k <value>]]]

# Example
node bin/similarity.js ms collection/json/ query/json result/data/ms.csv
node bin/similarity.js gar collection/json/ query/json result/data/gar.csv

ms is using original Mongeau-Sankoff-Measure [2], where gar is using the adjusted version by [3].

Use cutoff (only retrieve N-top documents for a query:

# Usage:
python bin/similarity.py <algorithm> <collection> <queries> <output> -c <cutoff>
node bin/similarity.js <algorithm> <collection> <queries> <output> -c <cutoff>

# Example
python bin/similarity.py 2015-shapeh collection/midi/ query/midi result/data/2015-shapeh.csv -c 10
node bin/similarity.js ms collection/json/ query/json result/data/ms.csv -c 10
node bin/similarity.js gar collection/json/ query/json result/data/gar.csv -c 10

Use k parameters for adjustment. ms only uses one parameter, gar is currently only using k1 and k3 but k2 is included for future consistency:

# Usage:
node bin/similarity.js <algorithm> <collection> <queries> <output> -k <value> -k <value> -k <value>

# Example
node bin/similarity.js ms collection/json/ query/json result/data/ms.csv -k 0.1
node bin/similarity.js gar collection/json/ query/json result/data/gar.csv -k 0.1 -k 0.2 -k 0.3

Sources

[1] Urbano, J. (2015). MelodyShape at MIREX 2015 Symbolic Melodic Similarity. In 11th Music Information Retrieval Evaluation eXchange (MIREX 2015). Retrieved from http://www.music-ir.org/mirex/abstracts/2015/JU1.pdf

[2] Mongeau, M., & Sankoff, D. (1990). Comparison of musical sequences. Computers and the Humanities, 24(3), 161–175. Retrieved from http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.666.2716&rep=rep1&type=pdf

[3] Gómez, C., Abad-Mota, S., & Ruckhaus, E. (2007). An Analysis of the Mongeau-Sankoff Algorithm for Music Information Retrieval. Proceedings of the 8th International Conference on Music Information Retrieval (ISMIR), 109–110. Retrieved from http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.133.5044&rep=rep1&type=pdf

musicjson-evaluation's People

Contributors

freakimkaefig 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.