midi2vec

MIDI2vec computes embeddings for representing MIDI data in vector space

https://github.com/midi-ld/midi2vec

Science Score: 67.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • CITATION.cff file
    Found CITATION.cff file
  • codemeta.json file
    Found codemeta.json file
  • .zenodo.json file
    Found .zenodo.json file
  • DOI references
    Found 2 DOI reference(s) in README
  • Academic publication links
    Links to: zenodo.org
  • Academic email domains
  • Institutional organization owner
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (10.6%) to scientific vocabulary

Keywords

embeddings knowledge-graph link-prediction midi
Last synced: 6 months ago · JSON representation ·

Repository

MIDI2vec computes embeddings for representing MIDI data in vector space

Basic Info
  • Host: GitHub
  • Owner: midi-ld
  • License: apache-2.0
  • Language: Jupyter Notebook
  • Default Branch: master
  • Homepage:
  • Size: 3.21 MB
Statistics
  • Stars: 34
  • Watchers: 3
  • Forks: 5
  • Open Issues: 1
  • Releases: 1
Topics
embeddings knowledge-graph link-prediction midi
Created over 7 years ago · Last pushed almost 2 years ago
Metadata Files
Readme License Citation

README.md

MIDI2vec: Learning Embeddings for MIDI Vector Space Representations

Compute graph embeddings from MIDI.

This library is described in detail in the following paper (bib)

Lisena P., Meroño-Peñuela A. & Troncy R. MIDI2vec: Learning MIDI Embeddings for Reliable Prediction of Symbolic Music Metadata. In Semantic Web Journal, Special issue on Deep Learning for Knowledge Graphs, vol.13, no.3, pp. 357-377, IOSPress, 6 April 2022 http://doi.org/10.3233/SW-210446

The experiments described in the paper are available here.

Pre-computed MIDI embeddings used in the paper are available in Zenodo.

Usage

The library is composed by 2 parts.

midi2edgelist

Convert a MIDI file into a graph, in edgelist format.

Requires Node.js:

cd midi2edgelist

npm install

node index.js -i <midi_folder>

Optional arguments:

  • -i, --input. Input directory containing MIDI files. REQUIRED
  • -o, --output Output directory for the edgelists. Default: ./edgelist
  • -n, --note-groups Number of groups of simultaneous notes to be taken in account for each MIDI. For example, -n 300 uses the first 300 groups. Default: all.

The output is formed by 4 edgelist (notes, program, tempo and time signature) and a csv containing the mapping between the file names and the given identifiers.

edgelist2vec

It uses node2vec for computing the embeddings from the egelists.

It requires Python 3.8.

pip install -r edgelist2vec/requirements.txt

python edgelist2vec/embed.py

Optional arguments:

  • -i, --input Input graph (edgelists) path. Default: .\edgelist;
  • -o, --output Output file name. Default: embeddings.bin;
  • --walk_length Length of walk per source. Default: 10;
  • --num_walks Number of walks per source. Default: 40;
  • -p Return hyper-parameter (as in node2vec). Default: 1;
  • -q Inout hyper-parameter (as in node2vec). Default: 1;
  • --dimensions Number of dimensions. Default: 100;
  • --window-size Context size for optimization. Default: 5;
  • --iter Number of epochs in word2vec. Default: 5;
  • --workers Number of parallel workers. Default: 0 (full use);
  • --exclude Edgelists to be excluded from the computation.

Owner

  • Name: MIDI Linked Data
  • Login: midi-ld
  • Kind: organization

Citation (CITATION.cff)

cff-version: 1.2.0
message: "If you use this software, please cite it as below."
title: "MIDI2vec"
url: https://github.com/midi-ld/midi2vec
date-released: 2022-04-06
type: software
preferred-citation:
  type: article
  authors:
  - family-names: "Lisena"
    given-names: "Pasquale"
    orcid: "https://orcid.org/0000-0003-3094-5585"
    email: pasquale.lisena@eurecom.fr
  - family-names: "Meroño-Peñuela"
    given-names: "Albert"
    orcid: "https://orcid.org/0000-0003-4646-5842"
  - family-names: "Troncy"
    given-names: "Raphael"
    orcid: "https://orcid.org/0000−0003−0457−1436"
  doi: "10.3233/SW-210446"
  title: "MIDI2vec: Learning MIDI embeddings for reliable prediction of symbolic music metadata"
  journal: "Semantic Web"
  month: 04
  year: 2022
  publisher:
  - name: "IOS Press"
  volume: 13,
  issn: "2210-4968"

GitHub Events

Total
  • Watch event: 7
  • Fork event: 1
Last Year
  • Watch event: 7
  • Fork event: 1

Dependencies

midi2edgelist/package-lock.json npm
  • 213 dependencies
midi2edgelist/package.json npm
  • eslint ^7.19.0 development
  • eslint-config-airbnb ^18.2.1 development
  • eslint-plugin-import ^2.22.1 development
  • eslint-plugin-jsx-a11y ^6.4.1 development
  • eslint-plugin-react ^7.22.0 development
  • eslint-plugin-react-hooks ^4.2.0 development
  • @tonejs/midi 2.0.25
  • argparse ^2.0.1
  • esm ^3.2.25
  • fs-extra ^9.1.0
  • fs-stream-sync ^2.0.2
  • klaw-sync ^6.0.0
edgelist2vec/requirements.txt pypi
  • networkx *
  • nodevectors *