Conditional Generation of Nanyin with Transformer
摘要
Nanyin is one of China’s four major ancient musical traditions, with a long history. However, due to its limited repertoire and singular methods of dissemination, Nanyin faces challenges in terms of inheritance and development. Based on the first Pipa dataset for automatic Nanyin generation, this paper proposes a method for generating Nanyin compositions. In the first stage, musical attributes are automatically extracted from the input sequence, with both direct and latent attributes defined to generate musical features. In the second stage, a Transformer-based generative model is employed to perform bar-level conditional generation through self-supervised learning, using the extracted attributes as control signals. Experimental results show that the model performs excellently in terms of sample quality, generating Nanyin music that resembles the input style and demonstrates diversity and artistic value comparable to human compositions.