Published August 31, 2021 | Version v2

TransformerGrooveInfilling (standalone code)

Authors/Creators

Description

This is a standalone version of the code accompanying my Master Thesis: Completing Audio Drum Loops with Transformer Neural Networks, under the supervision of Sergi Jordà and Behzad Haki at Music Technology Group at the Universitat Pompeu Fabra (Barcelona).

Abstract:

Infilling drums refers to complementing a drum pattern with additional drum events that are stylistically consistent with the loop. This task can be applied to computer-assisted composition; for instance, the composer can sketch some instrument parts of a drum beat and obtain the system's suggestions for new parts. In this thesis, we present the Transformer Groove Infilling, a Transformer Neural Network approach to the infilling task. Until now, the infilling of drum beats has been implemented using Recurrent Neural Network (RNN) architectures, in particular, sequence-to-sequence models that employ LSTM cells. However, in such architectures, as a consequence of sequential computation, proximity is emphasized when dealing with dependencies in the input sequence. Furthermore, those models receive the audio loops as symbolic input sequences. In contrast, the Transformer Groove Infilling model is based on the Transformer architecture, which relies entirely on self-attention mechanisms to represent the input sequences, which allows for faster training since parallelization is possible. In addition, we present a novel direct audio representation that enables the Transformer Groove Infilling to receive the input drum loops in the audio domain, avoiding their transcription and tokenization.

We train several instances of the Transformer Groove Infilling model to perform the following infilling subtasks: the infilling of closed hi-hats, the infilling of both kicks and snares, and the infilling of a drum loop without an instrument constraint. For comparison purposes, we also trained an equivalent model with a symbolic input representation in order to highlight the efficiency of the audio representation proposed in this thesis.

Files

TransformerGrooveInfilling_standalone.zip

Files (1.6 GB)

Name Size
md5:ba0e23ef476f69af46d418e5e64cfce8
1.6 GB Preview Download