Skip to content

jeffreyjohnens/style_rank

Repository files navigation

StyleRank

StyleRank is a method to rank MIDI files based on their similarity to an arbitrary musical style delineated by a collection of MIDI files. MIDI files are encoded using a novel set of features and an embedding is learned using Random Forests. For a detailed explanation see the paper.

alt text

Getting Started

Installing

Python2 is not supported. Python>=3.6.5 is supported.

pip install pybind11
pip install style_rank

Basic Examples

# rank midi files with respect to a style delineated corpus_paths
from style_rank import rank
to_rank_paths = ["in_style.mid", "out_of_style.mid", "somewhat_in_style.mid"]
corpus_paths = ["corpus_1.mid", "corpus_2.mid", "corpus_3.mid"]
rank(to_rank, corpus)
>>> ["in_style.mid", "somewhat_in_style.mid", "out_of_style.mid"]

# get a list of all the features
from style_rank import get_feature_names
get_feature_names()
>>> ['ChordMelodyNgram', 'ChordTranDistance', ..., 'IntervalClassDist', 'IntervalDist']

# extract features to csv's in the /path/to/csv_output folder
from style_rank import get_feature_csv
feature_names = ['IntervalClassDist', 'IntervalDist']
paths = ["corpus_1.mid", "corpus_2.mid", "corpus_3.mid"]
get_feature_csv(paths, '/path/to/csv_output', feature_names=feature_names)

Built With

Citing

If you want to cite StyleRank, please use the following citation.

Ens, J. and Pasquier, P. Quantifying Musical Style: Ranking Symbolic Music based on Similarity to a Style. In: Proceedings of the International Symposium on Music Information Retrieval. 2019 pp. 870-877.

License

This project is licensed under the ISC License - see the LICENSE.md file for details

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published