The source code for creating this dataset can be found in the src
directory. Below is its file organization.
├─ README.md README file
├─ slice_audio.py Script that slices the audio into clips
├─ compute_ssm.py Script that computes the self-similarity matrices
├─ process_scores.py Script that processes the scores
├─ synthesize_scores.py Script that synthesizes the scores into audios
├─ align_scores.py Script that aligns the scores to the recordings
├─ LICENSE License of the code
├─ requirements.txt Dependencies
├─ environment.yml Conda environment file
├─ environment.dev.yml Conda environment file (for development)
├─ pyproject.toml Project configuration
├─ setup.cfg Project configuration
└─ data
├─ audio.xlsx Worksheet for `audio.csv`
├─ info.xlsx Worksheet for `info.csv`
├─ scores.csv Metadata of the original scores
├─ scores.xlsx Worksheet for `scores.csv`
└─ scores
├─ bwv1001.mscz Original score file
└─ ...
Please run the following to create a conda environment.
conda env create -f environment.yml
For development environment, please also run the following.
conda env update -f environment.dev.yml -n synthesis
We first slice the audio recordings into clips by movement.
python slice_audio.py -c audio.csv -i bach-violin/audio/ -o processed/
We then transform the musical scores into note sequences, stored as CSV files.
python process_scores.py -c audio.csv -i bach-violin/ -o processed/
We then synthesize the scores using FluidSynth, an open-source software synthesizer, with the MuseScore General SoundFont.
python synthesize_scores.py -c audio.csv -i bach-violin/ -o processed/
Finally, we perform dynamic time warping (DTW) on the constant-Q spectrograms of the synthesized audios and those of the recordings to obtain the alignments.
python align_scores.py -c info.csv -i processed/ -o processed/ -p