基于主题条件CNN-BiLSTM的旋律自动生成方法
摘要:
为了有效地生成结构化的旋律,提出了一种基于主题条件CNN-BiLSTM的旋律自动生成方法。将旋律表示为钢琴卷帘窗的形式,使用定长、变长相结合的方法分割钢琴卷帘窗;通过Ward聚类算法对钢琴卷帘窗片段进行聚类分析,将获取的最大簇作为歌曲的旋律主题;以旋律主题作为条件使用基于CNN-BiLSTM结构的模型进行旋律生成 ,其上半部分CNN可以有效地提取钢琴卷帘窗中所包含时间和音高之间的信息,下半部分利用LSTM 和BiLSTM更好地捕捉到序列中的时序信息。结果表明,相较于现有的MidiNet模型,使用的旋律主题条件CNN-BiLSTM模型在准确率、归一化KL散度方面分别高出23%和0.17,生成的乐曲在连贯性和情感表达方面也优于传统的模型。
To effectively generate structured melodies,a melody auto-generationmethod based on theme-conditioned CNN-BiLSTM is proposed. Melodies are represented in the form of piano roll windows, and the piano roll windows are segmented using a combination of fixed-length and variable-length methods.The Ward clustering algorithm is used to perform cluster analysis on the piano roll window segments, and the largest cluster obtained is taken as the melody theme of the song.The melody theme is used as a condition to generate melodies using a model based on the CNN-BiLSTM structure. The upper part of the CNN can effectively extract the information between time and pitch contained in the piano roll window, and the lower part uses LSTM and BiLSTM to capture the temporal information better in the sequence, The results show that, compared to the existing MidiNet model, the melody theme-conditioned CNN-BiLSTM model achieves improvements of 23 % in accuracy and 0.17 in normalized KL divergence. The generated music is also superior to traditional models in terms of coherence and emotional expression.
作者:
曹西征,张航,李伟
Cao Xizheng,Zhang Hang,Li Wei
机构地区:
计算机与信息工程学院;智慧商务与物联网技术河南省工程实验室;河南省教育人工智能与个性化学习重点实验室
引用本文:
曹西征,张航,李伟。基于主题条件CNN-BiLSTM的旋律自动生成方法[J] . 学报(自然科学版) , 2025,53(3) :135-142. (Cao Xizheng,Zhang Hang,Li Wei.Automatic melody generation method based on conditional CNN-BiLSTM[J] .Journal of Henan Normal University (Natural Science Edition) , 2025, 53(3) : 135-142. DOI:10. 16366/j. cnki.1000-2367. 2023. 09. 04. 0002. )
基金:
国家自然科学基金;河南省重点科技攻关项目
关键词:
音乐生成;自动作曲;CNN-BiLSTM;旋律主题提取;聚类
music generation; automatic composition; CNN-BiLSTM; main melody extraction; clustering
分类号:
TP391. 9