Applied Sciences (Jul 2024)

Automatic Composition System Based on Transformer-XL

  • Ze Li,
  • Qing Huang,
  • Xinhao Yang,
  • Qing Chen,
  • Li Zhang

DOI
https://doi.org/10.3390/app14135765
Journal volume & issue
Vol. 14, no. 13
p. 5765

Abstract

Read online

An automatic composition system that includes music generation and music assessment is designed in this paper. In terms of music generation, we modify the Transformer-XL model for generating music. The Mask mechanism based on Transformer-XL is improved to make the attention of model tend to pay on the bidirectional information, so that the generated popular piano music forms a coherent whole. In terms of music assessment, we combine objective and subjective assessment to judge the generated music in a comprehensive way. Meanwhile, we put forward a new objective assessment method, namely the piano roll classification scoring network. It converts music into pictures and uses classification models in the CV, enabling the network itself to classify and score the generated music. The assessment results from subjective and objective experiments show that by improving the Mask mechanism of Transformer-XL, the model is trained to be better and the generated music could achieve the effect of imitating the real music.

Keywords