Skip to main content
Log in

Chord-based music generation using long short-term memory neural networks in the context of artificial intelligence

  • Published:
The Journal of Supercomputing Aims and scope Submit manuscript

Abstract

With the rapid development of artificial intelligence (AI), music generation has gained widespread attention. Long short-term memory (LSTM) has advantages in handling time series data and has achieved success in the field of music generation. This neural network is capable of capturing the long-term dependencies in music, thus generating chord music that is coherent and innovative. Therefore, to develop a creative and artistic music generation model, this study initially establishes a hidden Markov model (HMM) for chord recognition in music. Subsequently, the algorithm, leveraging the multi-style chord music generation (MSCMG) network, is proposed and applied for chord music generation. Furthermore, an evaluation of the chord music generation algorithm is conducted, utilizing LSTM neural networks within the context of AI. The findings indicate that the HMM, devised in this study, attains an impressive 81.8% chord recognition rate for piano compositions. Additionally, the algorithm, based on the MSCMG network, achieves a notable similarity score of 82.1% for generating classical-style music, with corresponding scores of 3.45, 3.42, and 3.44 for folk-style, classical-style, and pop-style music, respectively. This investigation lays the groundwork for the fusion of AI technology and music composition, exploring novel avenues for music generation and providing novel tools and insights for creative and theoretical exploration within the realm of music.

This is a preview of subscription content, log in via an institution to check access.

Access this article

Price excludes VAT (USA)
Tax calculation will be finalised during checkout.

Instant access to the full article PDF.

Fig. 1
Fig. 2
Fig. 3
Fig. 4
Fig. 5
Fig. 6
Fig. 7
Fig. 8
Fig. 9

Similar content being viewed by others

Data availability

The raw data supporting the conclusions of this article will be made available by the authors, without undue reservation.

References

  1. Alfaro-Contreras M, Iñesta JM, Calvo-Zaragoza J (2023) Optical music recognition for homophonic scores with neural networks and synthetic music generation. Int J Multimed Inf Retriev 12(1):12

    Google Scholar 

  2. Bello K, Mayol P (2019) Classification of acoustic guitar strum using convolutional neural networks and long-short-term-memory. Philip e-J Appl Res Dev 9:49–57

    Google Scholar 

  3. Bhangale KB, Kothandaraman M (2022) Survey of deep learning paradigms for speech processing. Wireless Pers Commun 125(2):1913–1949

    Google Scholar 

  4. Bihani H, Bothe S, Acharya A, Desai T, Joglekar P (2023) Automatic music melody generation using LSTM and markov chain model check for updates. IOT with Smart Syst.: ICTIS 2(720):249

    Google Scholar 

  5. Briot JP (2021) From artificial neural networks to deep learning for music generation: history, concepts and trends. Neural Comput Appl 33(1):39–65

    MathSciNet  Google Scholar 

  6. Carsault T, Nika J, Esling P, Assayag G (2021) Combining real-time extraction and prediction of musical chord progressions for creative applications. Electronics 10(21):2634

    Google Scholar 

  7. Chakraborty S, Dutta S, Timoney J (2021) The Cyborg Philharmonic: Synchronizing interactive musical performances between humans and machines. Human Soc Sci Commun 8(1):1–9

    CAS  Google Scholar 

  8. Chen F, Meng H (2022) The use of wireless network combined with artificial intelligence technology in the reform of music online teaching system. Wirel Commun Mob Comput 2022:1–10

    Google Scholar 

  9. Chen P, Han D (2022) Effective wind speed estimation study of the wind turbine based on deep learning. Energy 247:123491

    Google Scholar 

  10. Chen S, Zhong Y, Du R (2022) Automatic composition of Guzheng (Chinese Zither) music using long short-term memory network (LSTM) and reinforcement learning (RL). Sci Rep 12(1):15829

    ADS  CAS  PubMed  PubMed Central  Google Scholar 

  11. Costa LF, Barchi TM, de Morais EF, Coca AE, Schemberger EE, Martins MS, Siqueira HV (2023) Neural networks and ensemble based architectures to automatic musical harmonization: a performance comparison. Appl Artif Intell 37(1):2185849

    Google Scholar 

  12. Dua M, Sadhu A, Jindal A, Mehta R (2022) A hybrid noise robust model for multireplay attack detection in Automatic speaker verification systems. Biomed Signal Process Control 74:103517

    Google Scholar 

  13. Gimeno P, Viñals I, Ortega A, Miguel A, Lleida E (2020) Multiclass audio segmentation based on recurrent neural networks for broadcast domain data. EURASIP J Audio, Speech, Music Proc 2020:1–19

    Google Scholar 

  14. Gunawan AAS, Iman AP, Suhartono D (2020) Automatic music generator using recurrent neural network. Int J Comput Intell Syst 13(1):645–654

    Google Scholar 

  15. Guo Y, Liu Y, Zhou T, Xu L, Zhang Q (2023) An automatic music generation and evaluation method based on transfer learning. PLoS ONE 18(5):e0283103

    CAS  PubMed  PubMed Central  Google Scholar 

  16. Hewahi N, AlSaigal S, AlJanahi S (2019) Generation of music pieces using machine learning: long short-term memory neural networks approach. Arab J Basic Appl Sci 26(1):397–413

    Google Scholar 

  17. Jiang F, Zhang L, Wang K, Deng X, Yang W (2022) BoYaTCN: research on music generation of traditional chinese pentatonic scale based on bidirectional octave your attention temporal convolutional network. Appl Sci 12(18):9309

    CAS  Google Scholar 

  18. Jin C, Tie Y, Bai Y, Lv X, Liu S (2020) A style-specific music composition neural network. Neural Process Lett 52:1893–1912

    Google Scholar 

  19. Jin C, Wang T, Liu S, Tie Y, Li J, Li X, Lui S (2020) A transformer-based model for multi-track music generation. Int J Multimed Data Eng Manage (IJMDEM) 11(3):36–54

    Google Scholar 

  20. Keerti G, Vaishnavi AN, Mukherjee P, Vidya AS, Sreenithya GS, Nayab D (2022) Attentional networks for music generation. Multimed Tools Appl 81(4):5179–5189

    Google Scholar 

  21. Li SY, Sung Y (2023) Transformer-based Seq2Seq model for chord progression generation. Mathematics 11(5):1111

    Google Scholar 

  22. Li S, Sung Y (2023) MelodyDiffusion: chord-conditioned melody generation using a transformer-based diffusion model. Mathematics 11(8):1915

    Google Scholar 

  23. Liang Q, Zeng Y (2021) Stylistic composition of melodies based on a brain-inspired spiking neural network. Front Syst Neurosci 15:639484

    PubMed  PubMed Central  Google Scholar 

  24. Liu W (2023) Literature survey of multi-track music generation model based on generative confrontation network in intelligent composition. J Supercomput 79(6):6560–6582

    Google Scholar 

  25. Majidi M, Toroghi RM (2023) A combination of multi-objective genetic algorithm and deep learning for music harmony generation. Multimed Tools Appl 82(2):2419–2435

    Google Scholar 

  26. Marinescu AI (2019) Bach 2.0-generating classical music using recurrent neural networks. Procedia Comput Sci 159:117–124

    Google Scholar 

  27. Mateja D, Heinzl A (2021) Towards machine learning as an enabler of computational creativity. IEEE Trans Artif Intell 2(6):460–475

    Google Scholar 

  28. Mukherjee H, Dhar A, Ghosh M, Obaidullah SM, Santosh KC, Phadikar S, Roy K (2020) Music chord inversion shape identification with LSTM-RNN. Procedia Comput Sci 167:607–615

    Google Scholar 

  29. Poo LJ, Lan Y (2023) Optimized intellectual natural language processing using automated chord tag construction for auto accompaniment in music. Multimed Tools Appl 1–21.

  30. Prashant Krishnan V, Rajarajeswari S, Krishnamohan V, Sheel VC, Deepak R (2020) Music generation using deep learning techniques. J Comput Theor Nanosci 17(9–10):3983–3987

    Google Scholar 

  31. Purwins H, Li B, Virtanen T, Schlüter J, Chang SY, Sainath T (2019) Deep learning for audio signal processing. IEEE J Select Topics Signal Proc 13(2):206–219

    ADS  Google Scholar 

  32. Shvets A (2019) Structural harmony method in the context of deep learning on example of music by Valentyn Sylvestrov and Philipp Glass. Proc EVA London 2019:318–320

    Google Scholar 

  33. Siphocly NNJ, El-Horbaty ESM, Salem ABM (2021) Top 10 artificial intelligence algorithms in computer music composition. Int J Comput Dig Syst 10(01):373–394

    Google Scholar 

  34. Sturm BL, Ben-Tal O, Monaghan Ú, Collins N, Herremans D, Chew E, Pachet F (2019) Machine learning research that matters for music creation: a case study. J New Music Res 48(1):36–55

    Google Scholar 

  35. Tamás J, Árvai L (2023) Development of a music generator application based on artificial intelligence. Product Syst Inf Eng 11(1):1–13

    Google Scholar 

  36. Wang N, Xu H, Xu F, Cheng L (2021) The algorithmic composition for music copyright protection under deep learning and blockchain. Appl Soft Comput 112:107763

    Google Scholar 

  37. Wang Z, Dixit P, Chegdani F, Takabi B, Tai BL, El Mansori M, Bukkapatnam S (2020) Bidirectional gated recurrent deep learning neural networks for smart acoustic emission sensing of natural fiber–reinforced polymer composite machining process. Smart Sustain Manuf Syst 4(2):179–198

    Google Scholar 

  38. Wu G, Liu S, Fan X (2023) The power of fragmentation: a hierarchical transformer model for structural segmentation in symbolic music generation. IEEE/ACM Trans Audio, Speech, Lan Proc 31:1409–1420

    Google Scholar 

  39. Xiang Z, Guo Y (2020) Controlling melody structures in automatic game soundtrack compositions with adversarial learning guided gaussian mixture models. IEEE Trans Games 13(2):193–204

    Google Scholar 

  40. Yadav O, Fernandes D, Dube V, D’Souza M (2021) Apollo: a classical piano composer using long short-term memory. IETE J Educat 62(2):60–70

    Google Scholar 

  41. Yang C, Li Q (2021) Music emotion feature recognition based on Internet of things and computer-aided technology. Comput-Aided Des Appl 19(S6):80–90

    Google Scholar 

  42. Yu CH, Buehler MJ (2020) Sonification based de novo protein design using artificial intelligence, structure prediction, and analysis using molecular modeling. APL Bioeng 4(1):016108

    CAS  PubMed  PubMed Central  Google Scholar 

  43. Yu CH, Qin Z, Martin-Martinez FJ, Buehler MJ (2019) A self-consistent sonification method to translate amino acid sequences into musical compositions and application in protein design using artificial intelligence. ACS Nano 13(7):7471–7482

    CAS  PubMed  Google Scholar 

  44. Zeng T, Lau FC (2021) Automatic melody harmonization via reinforcement learning by exploring structured representations for melody sequences. Electronics 10(20):2469

    Google Scholar 

  45. Zhao Y, Xia X, Togneri R (2019) Applications of deep learning to audio generation. IEEE Circuits Syst Mag 19(4):19–38

    Google Scholar 

  46. Zhou L, Wen J, Wang Z, Deng P, Zhang H (2023) High-fidelity wind turbine wake velocity prediction by surrogate model based on d-POD and LSTM. Energy 275:127525

    Google Scholar 

Download references

Acknowledgements

The authors acknowledge the help from the university colleagues.

Funding

This research received no external funding.

Author information

Authors and Affiliations

Authors

Contributions

The author confirms being the sole contributor of this work and has approved it for publication.

Corresponding author

Correspondence to Fanfan Li.

Ethics declarations

Conflict of interest

All authors declare that they have no conflict of interest.

Ethical approval

This article does not contain any studies with human participants or animals performed by any of the authors.

Informed consent

Informed consent was obtained from all individual participants included in the study.

Additional information

Publisher's Note

Springer Nature remains neutral with regard to jurisdictional claims in published maps and institutional affiliations.

Rights and permissions

Springer Nature or its licensor (e.g. a society or other partner) holds exclusive rights to this article under a publishing agreement with the author(s) or other rightsholder(s); author self-archiving of the accepted manuscript version of this article is solely governed by the terms of such publishing agreement and applicable law.

Reprints and permissions

About this article

Check for updates. Verify currency and authenticity via CrossMark

Cite this article

Li, F. Chord-based music generation using long short-term memory neural networks in the context of artificial intelligence. J Supercomput 80, 6068–6092 (2024). https://doi.org/10.1007/s11227-023-05704-3

Download citation

  • Accepted:

  • Published:

  • Issue Date:

  • DOI: https://doi.org/10.1007/s11227-023-05704-3

Keywords

Navigation