Skip to main content

Training and inference for midi hand assignment.

Project description

midi2hands

This project is about training and evaluating deep learning models for the task of predicting what hand is supposed to play what note in a piano piece. There are two main architectures used in this project:

  1. LSTM
  2. Transformer

The models can also be trained in two different ways,

  1. Generative: Auto-regressive models that predict the next note given the previously predicted notes.
  2. Discriminative: Models that predict the hand of the note given the note.

This is discussed in more detail in the report.

This project is integrated in midi2vid, a tool that can generate videos of piano performances from midi files.

Installation

For inference, you can install the package with pip:

pip install midi2hands

For training, you can clone the repository and install the package with pip:

git clone ...
cd midi2hands
pip install -e .[train]

Usage

Here is an example for inference:

midi2hands -i src/midi2hands/data/test/000-Faure_ClaireDeLune_Op46No2.mid

You can also train new models by running train.py. The models can be configured from the script. Here is an example:

python src/midi2hands/train.py

Data

The data is included in the repository. The data comes from the following project, hannds.

License

This project is licensed under the MIT License. See the LICENSE file for details.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

midi2hands-0.0.2.tar.gz (5.1 MB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

midi2hands-0.0.2-py3-none-any.whl (2.8 MB view details)

Uploaded Python 3

File details

Details for the file midi2hands-0.0.2.tar.gz.

File metadata

  • Download URL: midi2hands-0.0.2.tar.gz
  • Upload date:
  • Size: 5.1 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.10.15

File hashes

Hashes for midi2hands-0.0.2.tar.gz
Algorithm Hash digest
SHA256 8a580c36c25d09674823854e8873a8a8d276e9116991a3b086dc0cd718232ed1
MD5 8e18f86976797ff955280ce9d448f7ac
BLAKE2b-256 28647b9553ec26c00149b766e186e40ae4df8f31b04249b55e7eb630e39dfc47

See more details on using hashes here.

File details

Details for the file midi2hands-0.0.2-py3-none-any.whl.

File metadata

  • Download URL: midi2hands-0.0.2-py3-none-any.whl
  • Upload date:
  • Size: 2.8 MB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.10.15

File hashes

Hashes for midi2hands-0.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 104bcc00a828a076cec0951e3d522e6a6f8e4b182d8592b0e9df09ea115ee2a2
MD5 3bd37027aa00782398bf7b6d66bd9930
BLAKE2b-256 dbf7ee5616bcd4e5bfbc4eafdf531d3bd871b27a6d3f85f8dd8e6fcb9462e6f7

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page