Create the environment.
conda env create -f environment.yml
Activate the environment.
conda activate mtmt
Run setup script.
python scripts/setup.py
-
Make sure to place the X, Y and XY MIDI files in
data/X/X/
,data/Y/Y/
anddata/XY/XY/
respectively. The X, Y, XY files for a sample should have the same filename. -
Run
scripts/compute_info_flow.py
python compute_info_flow.py OUTPUT_FILE_PATH
OUTPUT_FILE_PATH is the file path where the results will be stored as a .pkl
file. The path should include the name of the file. You can save them in results/
.
Example:
python compute_info_flow.py results/example.pkl
- Open
notebooks/visualize.ipynb
to visualize results. The notebook has code to visualize the experiments used in the paper. Theresults/
directory has sample results for these experiments, so you don't have to run thecompute_info_flow.py
script with data.
Three utility scripts have been provided in the scripts/
directory:
change_instrument.py
: Script to change instrument of a track in a midi file.combine_midi.py
: Script to combine 2 midi tracks into a single midi file.split_midi.py
: Script to split a midi file into 2 separate midi files, each containing a single track.
Usage instructions for these scripts are documented inside the files.
This repository uses the official implementation of "Multitrack Music Transformer" (ICASSP 2023).
Multitrack Music Transformer
Hao-Wen Dong, Ke Chen, Shlomo Dubnov, Julian McAuley and Taylor Berg-Kirkpatrick
Proceedings of the IEEE International Conference on Acoustics, Speech and Signal Processing (ICASSP), 2023
[homepage]
[paper]
[code]
[reviews]