This repository contains the source code for running the experiments accompanying our ISMIR 2021 paper on disentanglement versus controllability in the context of symbolic music generation using the dMelodies dataset. Refer THIS for additional results not included in the main paper.
Please cite as follows if you are using the code in this repository in any manner.
Ashis Pati, Alexander Lerch. "Is Disentanglement enough? On Latent Representations for Controllable Music Generation”, in Proc. of the 22nd International Society for Music Information Retrieval Conference (ISMIR) , Online, 2021.
@inproceedings{pati2021disentanglement,
title={Is Disentanglement enough? On Latent Representations for Controllable Music Generation},
author={Pati, Ashis and Lerch, Alexander},
booktitle={22nd International Society for Music Information Retrieval Conference (ISMIR)},
year={2021},
address={Online},
}
-
Clone this repository and
cd
into the root folder of this repository in a terminal window. Run the following commands to initialize the submodules for the dMelodies and dSprites datasets:git submodule init git submodule update
Alternatively the
--recurse-submodules
flag can be used with thegit clone
command while cloning the repository to directly initialize the datasets. -
Install
anaconda
orminiconda
by following the instruction here. -
Create a new conda environment using the
enviroment.yml
file located in the root folder of this repository. The instructions for the same can be found here. -
Activate the
dmelodies
environment using the following command:conda activate dmelodies
The contents of this repository are as follows:
dmelodies_dataset
: submodule containing the dMelodies dataset along with pyTorch dataloader and other helper codesrc
: contains all the source code related to the different model architectures and trainersdmelodiesvae
: model architecture and trainer for the dMelodiesCNN and RNN, also contains the FactorVAE modelutils
: module with model and training utility classes and methods
- other scripts to train / test the models and generate plots
TO BE UPDATED.
Note: To be able to run the training scripts, the dmelodies_dataset
folder must be added to the PYTHONPATH
. This can be done form the command line by adding PYTHONPATH=dmelodies_dataset
before the python
command. For example,
PYTHONPATH=dmelodies_dataset python script_train_dmelodies.py
Alternatively, for IDEs such as PyCharm, the required folder can be added using the instructions here.