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.3.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.3-py3-none-any.whl (2.8 MB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: midi2hands-0.0.3.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.3.tar.gz
Algorithm Hash digest
SHA256 4db5000237a2f37dcc820fb62a03dd4bcac7001c02056b29028cd479b114ca92
MD5 cf8ad6569e82b96eeed9ad49fbe0beaa
BLAKE2b-256 fbccd736f687e2160d57209ca068487270e2539d9f6ec99ce116bdf6a6801714

See more details on using hashes here.

File details

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

File metadata

  • Download URL: midi2hands-0.0.3-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.3-py3-none-any.whl
Algorithm Hash digest
SHA256 40823cec0cfb78a09b66dd07ede17a885f80fca502e486b82196d1ca4b2f320e
MD5 3c085f4634570361ca8bf6ce4d1f3225
BLAKE2b-256 dba86fac5753414addf947be9bda92e32692e6f5f7692b32d92904b3a2b5a9bd

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