With the accelerating progress of information technology, the demand for music composition continues to grow. However, existing music generation algorithms primarily focus on improving the quality of generated samples, with most methods offering only limited control over the generated sequences. To address this issue, this paper proposes a music generation algorithm based on multi-branch fusion. The algorithm enhances the diversity and quality of generated music by incorporating a melody description branch and fusing expert description features, learned description features, and melody description features through parallel cross-attention. To further optimize the model’s generative capabilities, this paper introduces the RoBERTa pre-trained model and a contrastive learning method based on instance discrimination. The contrastive learning method treats each sample as an independent category, maximizing the consistency of the same sample in the feature space while minimizing the similarity between different samples to learn discriminative representations. Based on the aforementioned research, comparative and ablation experiments were conducted on the LakhMIDI dataset. The results demonstrate that the proposed algorithm achieves improvements of 0.059 in chord accuracy, 0.056 in two cosine similarity metrics, and 0.055 in note density, validating the algorithm’s effectiveness and advantages (This work was supported by the Key Research and Development Program of Shaanxi under Grant No. 2024GX-YBXM-556).

错误:搜索内容不能为空,请输入英文关键词
错误:关键词超出字数限制,请精简
高级检索

Research on Controllable Music Generation Algorithm Based on Multi-branch Fusion

  • Xinyao Wei,
  • Chen Li,
  • Lihua Tian,
  • Jihua Zhu

摘要

With the accelerating progress of information technology, the demand for music composition continues to grow. However, existing music generation algorithms primarily focus on improving the quality of generated samples, with most methods offering only limited control over the generated sequences. To address this issue, this paper proposes a music generation algorithm based on multi-branch fusion. The algorithm enhances the diversity and quality of generated music by incorporating a melody description branch and fusing expert description features, learned description features, and melody description features through parallel cross-attention. To further optimize the model’s generative capabilities, this paper introduces the RoBERTa pre-trained model and a contrastive learning method based on instance discrimination. The contrastive learning method treats each sample as an independent category, maximizing the consistency of the same sample in the feature space while minimizing the similarity between different samples to learn discriminative representations. Based on the aforementioned research, comparative and ablation experiments were conducted on the LakhMIDI dataset. The results demonstrate that the proposed algorithm achieves improvements of 0.059 in chord accuracy, 0.056 in two cosine similarity metrics, and 0.055 in note density, validating the algorithm’s effectiveness and advantages (This work was supported by the Key Research and Development Program of Shaanxi under Grant No. 2024GX-YBXM-556).