Skip to content
Framework for estimating temporal properties of music tracks.
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
bin
tempocnn
tests
.gitignore
CHANGES.rst
LICENSE
README.rst
requirements.txt
setup.py

README.rst

Tempo-CNN

Tempo-CNN is a simple CNN-based framework for estimating temporal properties of music tracks.

First and foremost, Tempo-CNN is a tempo estimator. To determine the global tempo of an audio file, simply run the script

tempo -i my_audio.wav

You may specify other models and output formats (mirex, JAMS) via command line parameters.

E.g. to create JAMS as output format and the model originally used in the ISMIR 2018 paper [1], please run

tempo -m ismir2018 --jams -i my_audio.wav

For batch processing, you may want to run tempo like this:

find /your_audio_dir/ -name '*.wav' | xargs tempo -d /output_dir/ -i

This will recursively search for all .wav files in /your_audio_dir/, analyze then and write the results to individual files in /output_dir/. Because the model is only loaded once, this method of processing is much faster than individual program starts.

To increase accuracy for greater than integer-precision, you may want to enable quadratic interpolation. You can do so by setting the --interpolate flag. Obviously, this only makes sense for tracks with a very stable tempo:

tempo -m ismir2018 --interpolate -i my_audio.wav

Instead of estimating a global tempo, Tempo-CNN can also estimate local tempi in the form of a tempogram. This can be useful for identifying tempo drift. To create such a tempogram, run

tempogram -p my_audio.wav

As output, tempogram will create a .png file. Additional options to select different models and output formats are available.

Tempo-CNN provides experimental support for temporal property estimation of Greek folk music [2]. The corresponding models are named fma2018 (for tempo) and fma2018-meter (for meter). To estimate the meter's numerator, run

meter -m fma2018-meter -i my_audio.wav

Installation

Clone this repo and run setup.py install using Python 3.6:

git clone https://github.com/hendriks73/tempo-cnn.git
cd tempo-cnn
python setup.py install

You may need to install TensorFlow using pip from the command line.

License

Source code and models can be licensed under the GNU AFFERO GENERAL PUBLIC LICENSE v3. For details, please see the LICENSE file.

Citation

If you use Tempo-CNN in your work, please consider citing it:

@inproceedings{
   Title = {A Single-Step Approach to Musical Tempo Estimation Using a Convolutional Neural Network},
   Author = {Schreiber, Hendrik and M{\"u}ller Meinard},
   Booktitle = {Proceedings of the 19th International Society for Music Information Retrieval Conference ({ISMIR})},
   Pages = {98--105},
   Month = {9},
   Year = {2018},
   Address = {Paris, France}
}

References

[1]Hendrik Schreiber, Meinard Müller, A Single-Step Approach to Musical Tempo Estimation Using a Convolutional Neural Network Proceedings of the 19th International Society for Music Information Retrieval Conference (ISMIR), Paris, France, Sept. 2018.
[2]Hendrik Schreiber, Technical Report: Tempo and Meter Estimation for Greek Folk Music Using Convolutional Neural Networks and Transfer Learning 8th International Workshop on Folk Music Analysis (FMA), Thessaloniki, Greece, June 2018.
You can’t perform that action at this time.