Beat This! (ONNX)
Beat and downbeat tracking: framewise beat and downbeat logits at 50 frames per second for any piece of music, with no fixed
tempo range or meter. A conversion to ONNX of the final0 checkpoint of
Beat This! (Foscarin, Schlüter, Widmer, ISMIR 2024), with the log-mel front end fused
into the graph.
- Input
waveform:[1, N]float32, mono, 22.05 kHz, values in [-1, 1], whereN = (frames - 1) * 441 + 1024. It is the audio around a run offramesspectrogram frames: the frame at indexiis centred on samplei * 441, so the run[a, b)needs samplesa * 441 - 512to(b - 1) * 441 + 512. At the very start and end of a piece, extend by reflection (the centred STFT'sreflectpadding); everywhere else use the real neighbouring audio. - Input
pad_frames:[2]int64, the number of all-zero spectrogram frames to put before and after the run: 6 at the start and end of a piece, as the reference does, otherwise 0. - Outputs
beatanddownbeat:[1, T]float32 logits,T = pad_frames[0] + frames + pad_frames[1].beatalready includes the downbeat term, as in the PyTorch model. - Chunking, as in the reference: 1500-frame chunks that overlap by 6 frames on each side, the last chunk moved left to end at the end of the piece; drop 6 frames of each chunk's output at both ends and keep the first prediction where chunks overlap.
- A beat is a peak of the beat logits over a window of 7 frames with a logit above 0; peaks one frame apart are merged; a downbeat is moved to the nearest beat. Matches the PyTorch model to within 1e-4 on the conversion fixtures.
Converted by the Silly MIDI Tools scripts in scripts/beat-this/.
See NOTICE.md for the attribution and the changes made, and LICENSE for the licence text.
Inference Providers NEW
This model isn't deployed by any Inference Provider. 🙋 Ask for provider support