Research on Automatic Melody Generation Model for Chinese Folk Music Style
Main Article Content
Abstract
This study addresses challenges in Chinese folk music generation, including insufficient style feature extraction, weak melodic coherence, and limited automation. An automatic melody generation model for Chinese folk music style is proposed. First, a comprehensive database is constructed using pitch, rhythm, and timbre features from multi-ethnic musical samples, including Han, Tibetan, Yi, Mongolian, Korean, and Dai music. Mel-frequency cepstral coefficients are used to extract timbre features, and long short-term memory networks are used to model temporal dependence in melodies. An attention mechanism is then introduced to enhance the capture of stylistic features, while a variational autoencoder controls the latent melodic style space. A custom loss function incorporates pitch deviation, rhythmic smoothness, and style consistency to improve generation quality. In 1,000 test samples, the generated melodies show a 32.7% improvement in style similarity and a 24.9% improvement in rhythmic smoothness. The average subjective human rating reaches 4.32 out of 5, approximately 20% higher than the baseline model. The study provides a modeling framework for intelligent generation of culturally distinctive melodies.
Downloads
Article Details

This work is licensed under a Creative Commons Attribution 4.0 International License.
Authors who publish with this journal agree to the following terms:
- Authors retain copyright and grant the journal right of first publication with the work simultaneously licensed under a Creative Commons Attribution License that allows others to share the work with an acknowledgement of the work's authorship and initial publication in this journal.
- Authors are able to enter into separate, additional contractual arrangements for the non-exclusive distribution of the journal's published version of the work (e.g., post it to an institutional repository or publish it in a book), with an acknowledgement of its initial publication in this journal.
- Authors are permitted and encouraged to post their work online (e.g., in institutional repositories or on their website) prior to and during the submission process, as it can lead to productive exchanges, as well as earlier and greater citation of published work (See The Effect of Open Access).
References
C. Fan, Z. Zhang, S. Ding, Y. Teng, and Y. Wang, “An interactive melody generation method based on variational autoencoder,” Computer Applications Research, vol. 38, no. 2, pp. 479-483+488, 2021, doi: 10.19734/j.issn.1001-3695.2019.11.0608.
Y. Li, L. Wang, Y. Xue, et al., “Analysis and research on intelligent music generation system based on short-time Fourier transform,” Journal of Intelligent Systems, vol. 20, no. 3, pp. 750-760, 2025, doi: 10.11992/tis.202405043.
H. Li, “Background music generation based on image recognition,” IT Manager World, vol. 25, no. 6, pp. 109-112, 2022.
Z. Song, C. Peng, L. Wang, and Y. Zheng, “A Tibetan music generation network based on an emotion-guided diffusion model,” Computer Applications Research, vol. 42, no. 8, pp. 2283-2289, 2025, doi: 10.19734/j.issn.1001-3695.2025.01.0014.
B. Xu and T. Liu, “Semi-supervised emotional music generation based on improved Gaussian mixture variational autoencoder,” Computer Science, vol. 51, no. 8, pp. 281-296, 2024, doi: 10.11896/jsjkx.230500124.
Y. Gao, “Music melody generation and LIF supervised training based on spiking neural network,” Second International Conference on Advanced Algorithms and Signal Image Processing (AASIP 2022), pp. 84, 2022, doi: 10.1117/12.2659783.
Q. Feng, “Emotionally consistent music melody generation algorithm integrating prompt perception and hypernetwork optimization,” Scientific Reports, vol. 15, no. 1, 2025, doi: 10.1038/s41598-025-21571-9.
A. Magar, A. Acharya, S. Bothe, et al., “Automatic Music Generation,” International Journal for Research in Applied Science and Engineering Technology, vol. 11, no. 11, pp. 1945-1950, 2023, doi: 10.22214/ijraset.2023.56835.
R. Chowdhury S, S. Biswas, S. Nandy, et al., “Music Generation Using Deep Learning,” Power Devices and Internet of Things for Intelligent System Design, pp. 147-165, 2025, doi: 10.1002/9781394311613.ch6.
S. Agarwal and N. Sultanova, “Music Generation through Transformers,” International Journal of Data Science and Advanced Analytics, vol. 6, no. 6, pp. 302-306, 2024, doi: 10.69511/ijdsaa.v6i6.231.