This code supports the paper "Guitar Tablature Estimation with a Convolutional Neural Network" that will be presented at the 20th Conference of the International Society for Music Information Retreival (ISMIR 2019).
To visualize the system performance, tab-cnn/demos/
contains video demonstrations showing predicted and ground truth tablature synced with input audio. To run the code, follow the instructions below.
This project was made to be run with Python 3.9.7. You should have the following libraries/packages installed:
- numpy
- scipy
- pandas
- jams
- librosa
- keras
- tensorflow
pip install -r requirements.txt
Download the GuitarSet audio and annotation data from here. (Thanks again to the authors for creating this awesome dataset!)
Unzip and place the downloaded GuitarSet folder in tab-cnn/data/
so that in tab-cnn/data/GuitarSet/
you have the following two folders:
annotation/
audio/
The remaining instructions assume that you are in the tab-cnn/
folder.
Run the following line to preprocess different spectral representations for the audio files:
bash data/Bash_TabDataReprGen.sh
This will save the preprocessed data as compressed numpy (.npz) files in the data/spec_repr/
directory.
The default spectral spresentation is the Constant-Q Transform (CQT). To change representations, an argument can be added when creating the TabCNN object. Specifically, on line 193 in model/TabCNN.py
, a spec_repr
parameter can be set to one of the following:
spec_repr = "c"
, for CQTspec_repr = "m"
, for Mel-scaled spectrogram (Melspec)spec_repr = "cm"
, for CQT + Melspec concatenationspec_repr = "s"
, for Short-time Fourier Transform (STFT)
Run the following line to train and test the TabCNN model:
python model/TabCNN.py
A summary log and a csv results file will be saved in a time-stamped folder within the model/saved/
directory. Additionally, a folder for each fold of data will be created, containing the individual model's weights and predictions.