Manipulate your MIDI file in bar level, and converting between MIDI and REMI-z format.
Project description
REMI-z tokenizer and MultiTrack music data structure
This is the official implementation of the REMI-z tokenizer in the paper Unlocking Potential in Pre-Trained Music Language Models for Versatile Multi-Track Music Arrangement.
This tool helps to convert your music between MIDI and REMI-z representation, which is an efficient sequence representation of multitrack music, meanwhile facilitate manipulate the music at bar level.
The core of this tokenizer is the MultiTrack class as the data structure for multitrack music, which is a hierachical format. Here are the structural details:
- The music is represented by an MultiTrack object, which is list of bars.
- Each Bar object represents all notes being played within one bar, grouped by Track object, together with time signature and tempo info of this bar.
- Each Track object represents one instrument, contatining notes of that instrument in this bar.
- Each Note object represent one note, including onset, offset, pitch, velocity information.
- Each Track object represents one instrument, contatining notes of that instrument in this bar.
- Each Bar object represents all notes being played within one bar, grouped by Track object, together with time signature and tempo info of this bar.
This Multitrack object can be create from various formats (e.g., MIDI or REMI-z), and convert into various formats (e.g., MIDI, and REMI-z representation).
Install
Install from pip
pip install REMI-z
Install from source
git clone https://github.com/Sonata165/REMI-z.git
cd REMI-z
pip install -r requirements.txt
pip install .
Usage
Please refer to the demo.ipynb.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
File details
Details for the file remi_z-0.5.9.tar.gz.
File metadata
- Download URL: remi_z-0.5.9.tar.gz
- Upload date:
- Size: 19.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.0.1 CPython/3.12.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
8480e6894447b4a8d67ee8713746fe5b98129765b26851be390a99de5e63305c
|
|
| MD5 |
c9efc54243c1e50ad21c0650b0b7ae0c
|
|
| BLAKE2b-256 |
af159260eef7f07a6be2f9ed32caa899f6705205366db6a16f9ba8285cb57649
|