Skip to main content

The On-the-fly MIDI Data Augmentation Library!

Project description

MIDIOgre

GitHub stars GitHub forks GitHub license

MIDIOgre is a Python library designed for performing data augmentations on MIDI inputs, primarily for machine learning models operating on MIDI data. With MIDIOgre, you can easily generate variations of MIDI sequences to enrich your training data and improve the robustness and generalization of your models.

Demo Plot of MIDIOgre Transformations

Augmentation Functions

Implemented

  • PitchShift: Randomly transpose (pitch shift) MIDI note values of randomly selected instruments in a MIDI file.
  • OnsetTimeShift: Randomly modify MIDI note onset times while keeping their total durations intact.
  • DurationShift: Randomly modify MIDI note durations while keeping their onset times intact.
  • NoteDelete: Randomly delete some notes from a MIDI instrument track.
  • NoteAdd: Randomly add some notes to a MIDI instrument track.
  • TempoShift: Randomly vary the tempo of the whole MIDI file (currently, this does not support tempo changes within the file).

Envisaged

  • NoteSplit: Randomly split some notes in a MIDI instrument track to a random number of chunks.
  • VelocityShift: Randomly alter MIDI note velocities of randomly selected instruments in a MIDI file.
  • Swing-based augmentations
  • MIDI CC based augmentations
  • Semantically-meaningful augmentations (respects rhythms & beats)
  • Suggestions welcome for more!

(Some of these have been inspired from mdtk)

Note

This work is highly primitive at the moment and is undergoing active development. As of now, it is simply a showcase of work and is not ready to be integrated into your ML workflow. However, I intend to get it usable on priority.

Contributing

Contributions to MIDIOgre are welcome! If you'd like to contribute, please reach out to me via email (< my_github_id_without_hyphens>@cmu.edu).

Some areas I could use help (will update this progressively):

  • Writing extensive unit tests (not simply for the sake of maximizing code coverage).
  • Documentation (improving existing docs & adding more info to cater to developers from all kinds of music theory & programming backgrounds).

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

midiogre-0.1.0.post0.tar.gz (91.5 kB view details)

Uploaded Source

Built Distribution

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

midiogre-0.1.0.post0-py3-none-any.whl (41.2 kB view details)

Uploaded Python 3

File details

Details for the file midiogre-0.1.0.post0.tar.gz.

File metadata

  • Download URL: midiogre-0.1.0.post0.tar.gz
  • Upload date:
  • Size: 91.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for midiogre-0.1.0.post0.tar.gz
Algorithm Hash digest
SHA256 21da9fe764ac9bc480e2a969ba027f08203151483da7119244db9443d57a4dbc
MD5 709ef2951826dc8c3daa82a2ae54dd04
BLAKE2b-256 1d5a7cf71b19013a2c10a85b1f54356c9b1a9e707e8d34b7fa35b65c3d1334c5

See more details on using hashes here.

Provenance

The following attestation bundles were made for midiogre-0.1.0.post0.tar.gz:

Publisher: publish.yml on a-pillay/MIDIOgre

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file midiogre-0.1.0.post0-py3-none-any.whl.

File metadata

  • Download URL: midiogre-0.1.0.post0-py3-none-any.whl
  • Upload date:
  • Size: 41.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for midiogre-0.1.0.post0-py3-none-any.whl
Algorithm Hash digest
SHA256 304069ecff2051c8cca87066f82c219bad832cf293815b928eb04c9e92f0acc2
MD5 e5c376311f1f6c85d3ec8397182ef7fb
BLAKE2b-256 7eed0a4213b1809efbdfe3ccd9474464941be05e89bd2a6f56b32545ff5bc99b

See more details on using hashes here.

Provenance

The following attestation bundles were made for midiogre-0.1.0.post0-py3-none-any.whl:

Publisher: publish.yml on a-pillay/MIDIOgre

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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