• Stars
    star
    118
  • Rank 299,923 (Top 6 %)
  • Language
    Python
  • License
    GNU General Publi...
  • Created over 3 years ago
  • Updated almost 3 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

End-to-end beat and downbeat tracking in the time domain.

WaveBeat

End-to-end beat and downbeat tracking in the time domain.

| Paper | Code | Video | Slides |

Setup

First clone the repo.

git clone https://github.com/csteinmetz1/wavebeat.git
cd wavebeat

Setup a virtual environment and activate it. This requires that you use Python 3.8.

python3 -m venv env/
source env/bin/activate

Next install numpy, cython, and aiohttp first, manually.

pip install numpy cython aiohttp

Then install the wavebeat module.

python setup.py install

This will ensure that madmom installs properly, as it currently fails unless cython, numpy, and aiohttp are installed first.

Predicting beats

To begin you will first need to download the pre-trained model here. Place it in the checkpoints/ directory, rename to get the .ckpt file.

cd checkpoints
wget https://zenodo.org/record/5525120/files/wavebeat_epoch%3D98-step%3D24749.ckpt?download=1
mv wavebeat_epoch=98-step=24749.ckpt?download=1 wavebeat_epoch=98-step=24749.ckpt

Functional interface

If you would like to use the functional interface you can create a script and import wavebeat as follows.

from wavebeat.tracker import beatTracker

beat, downbeats = beatTracker('audio.wav')

Script interface

We provide a simple script interface to load an audio file and predict the beat and downbeat locations with a pre-trained model. Run the model by providing a path to an audio file.

python predict.py path_to_audio.wav

Evaluation

In order to run the training and evaluation code you will additionally need to install all of the development requirements.

pip install -r requirements.txt

To recreate our reported results you will first need to have access to the datasets. See the paper for details on where to find them.

Use the command below to run the evaluation on GPU.

python simple_test.py \
--logdir mdoels/wavebeatv1/ \
--ballroom_audio_dir /path/to/BallroomData \
--ballroom_annot_dir /path/to/BallroomAnnotations \
--beatles_audio_dir /path/to/The_Beatles \
--beatles_annot_dir /path/to/The_Beatles_Annotations/beat/The_Beatles \
--hainsworth_audio_dir /path/to/hainsworth/wavs \
--hainsworth_annot_dir /path/to/hainsworth/beat \
--rwc_popular_audio_dir /path/to/rwc_popular/audio \
--rwc_popular_annot_dir /path/to/rwc_popular/beat \
--gtzan_audio_dir /path/to/gtzan/ \
--gtzan_annot_dir /path/to/GTZAN-Rhythm/jams \
--smc_audio_dir /path/to/SMC_MIREX/SMC_MIREX_Audio \
--smc_annot_dir /path/to/SMC_MIREX/SMC_MIREX_Annotations_05_08_2014 \
--num_workers 8 \

Training

To train the model with the same hyperparameters as those used in the paper, assuming the datasets are available, run the following command.

python train.py \
--ballroom_audio_dir /path/to/BallroomData \
--ballroom_annot_dir /path/to/BallroomAnnotations \
--beatles_audio_dir /path/to/The_Beatles \
--beatles_annot_dir /path/to/The_Beatles_Annotations/beat/The_Beatles \
--hainsworth_audio_dir /path/to/hainsworth/wavs \
--hainsworth_annot_dir /path/to/hainsworth/beat \
--rwc_popular_audio_dir /path/to/rwc_popular/audio \
--rwc_popular_annot_dir /path/to/rwc_popular/beat \
--gpus 1 \
--preload \
--precision 16 \
--patience 10 \
--train_length 2097152 \
--eval_length 2097152 \
--model_type dstcn \
--act_type PReLU \
--norm_type BatchNorm \
--channel_width 32 \
--channel_growth 32 \
--augment \
--batch_size 16 \
--lr 1e-3 \
--gradient_clip_val 4.0 \
--audio_sample_rate 22050 \
--num_workers 24 \
--max_epochs 100 \

Cite

If you use this code in your work please consider citing us.

@inproceedings{steinmetz2021wavebeat,
    title={{WaveBeat}: End-to-end beat and downbeat tracking in the time domain},
    author={Steinmetz, Christian J. and Reiss, Joshua D.},
    booktitle={151st AES Convention},
    year={2021}}

More Repositories

1

ai-audio-startups

Community list of startups working with AI in audio and music technology
1,543
star
2

auraloss

Collection of audio-focused loss functions in PyTorch
Python
731
star
3

pyloudnorm

Flexible audio loudness meter in Python with implementation of ITU-R BS.1770-4 loudness algorithm
Python
635
star
4

dasp-pytorch

Differentiable audio signal processors in PyTorch
Python
226
star
5

steerable-nafx

Steerable discovery of neural audio effects
Jupyter Notebook
201
star
6

micro-tcn

Efficient neural networks for analog audio effect modeling
Python
150
star
7

ronn

Randomized overdrive neural networks
Jupyter Notebook
137
star
8

pymixconsole

Headless multitrack mixing console in Python
Python
116
star
9

AutomaticMixingPapers

Important papers and associated code on automatic mixing research
HTML
102
star
10

automix-toolkit

Models and datasets for training deep learning automatic mixing models
Python
95
star
11

IIRNet

Direct design of biquad filter cascades with deep learning by sampling random polynomials.
Python
83
star
12

NeuralReverberator

Reverb synthesis via a spectral autoencoder
Python
80
star
13

flowEQ

Ξ²-VAE for intelligent control of a five band parametric EQ
MATLAB
67
star
14

bela-zlc

Zero-latency convolution on Bela platform
C++
26
star
15

MixCNN

Convolutional Neural Network for multitrack mix leveling
Python
18
star
16

neural-2a

Neural network model of the analog LA-2A dynamic range compressor
CMake
17
star
17

findio

The Spotify search you don't need and never wanted
HTML
13
star
18

computational-music-creativity

Materials for the Computational Music Creativity course at UPF-MTG (Spring 2020)
TeX
12
star
19

PhaseAnalyzer

C++ plugin built with the JUCE Framework to provide insight about the relative phase relationship of audio signals
C++
10
star
20

pyloudnorm-eval

Evaluation of a number of loudness meter implementations
Python
10
star
21

Cinuosity

Novel playlist generation and music discovery in Spotify
JavaScript
9
star
22

mids

Implementation of content-based audio search algorithm.
Python
8
star
23

auxCord

Sync Spotify accounts to build tailored playlists
JavaScript
7
star
24

youtube-audio-dl

Utility to automate download and normalization of YouTube audio streams
Python
6
star
25

amida

audio mixing interface for data acquisition
Python
5
star
26

pyreqs

Easily build requirements.txt files automatically
Python
4
star
27

machine-learning

Materials for the Machine Learning course at UPF-MTG (Winter 2019)
Jupyter Notebook
4
star
28

consynthance

Studying consonance as a result of vocal similarity
Jupyter Notebook
4
star
29

arte

generative artwork created with canvas-sketch
JavaScript
3
star
30

LDA-Music

LDA topic modeling of raw audio data for music suggestions
Python
3
star
31

ML4AP

Slides for my talk Applications of machine learning for assistive and creative audio plugins
JavaScript
3
star
32

cavae

Covert art variational autoencoder for generating new cover art
Python
3
star
33

aes-presenters-145th

Analysis of papers and presenters at the 145th AES Convention in NYC
Python
2
star
34

AudioTechTalks-S19

Materials and associated code for audio technology talks at Clemson University - Spring 2019
JavaScript
2
star
35

aes-stats-147th

Analysis of papers from the 147th AES Convention in NYC
Python
2
star
36

macOS-laptop

Setup script for config and installation on a fresh macOS machine
Shell
2
star
37

tempnetic

Tempo estimation
Python
2
star
38

sBucket

Build large Spotify playlists using user top tracks and seed track recommendations
Python
1
star
39

ev-sound-analysis

Analyzing audio from electric vehicles to determine FMVSS 141 compliance
Python
1
star
40

personal-website

Personal website built with Angular 7 and Bootstrap 4
HTML
1
star
41

LoudnessHistory

An analysis of the perceived loudness of music over time.
Python
1
star