Skip to main page content
U.S. flag

An official website of the United States government

Dot gov

The .gov means it’s official.
Federal government websites often end in .gov or .mil. Before sharing sensitive information, make sure you’re on a federal government site.

Https

The site is secure.
The https:// ensures that you are connecting to the official website and that any information you provide is encrypted and transmitted securely.

Access keys NCBI Homepage MyNCBI Homepage Main Content Main Navigation
. 2025 Jan 24:11:e2265.
doi: 10.7717/peerj-cs.2265. eCollection 2025.

Deep gradient reinforcement learning for music improvisation in cloud computing framework

Affiliations

Deep gradient reinforcement learning for music improvisation in cloud computing framework

Fadwa Alrowais et al. PeerJ Comput Sci. .

Abstract

Artificial intelligence (AI) in music improvisation offers promising new avenues for developing human creativity. The difficulty of writing dynamic, flexible musical compositions in real time is discussed in this article. We explore using reinforcement learning (RL) techniques to create more interactive and responsive music creation systems. Here, the musical structures train an RL agent to navigate the complex space of musical possibilities to provide improvisations. The melodic framework in the input musical data is initially identified using bi-directional gated recurrent units. The lyrical concepts such as notes, chords, and rhythms from the recognised framework are transformed into a format suitable for RL input. The deep gradient-based reinforcement learning technique used in this research formulates a reward system that directs the agent to compose aesthetically intriguing and harmonically cohesive musical improvisations. The improvised music is further rendered in the MIDI format. The Bach Chorales dataset with six different attributes relevant to musical compositions is employed in implementing the present research. The model was set up in a containerised cloud environment and controlled for smooth load distribution. Five different parameters, such as pitch frequency (PF), standard pitch delay (SPD), average distance between peaks (ADP), note duration gradient (NDG) and pitch class gradient (PCG), are leveraged to assess the quality of the improvised music. The proposed model obtains +0.15 of PF, -0.43 of SPD, -0.07 of ADP and 0.0041 NDG, which is a better value than other improvisation methods.

Keywords: Cloud frameworks; Containerization; Gated recurrent units; Music improvisation; Reinforcement learning.

PubMed Disclaimer

Conflict of interest statement

The authors declare there are no competing interests.

Figures

Figure 1
Figure 1. Proposed architecture.
Figure 2
Figure 2. Accuracy analysis of different deep learning techniques.
Figure 3
Figure 3. Sample musical notes.
Figure 4
Figure 4. Performance comparison on NDG parameter performance with various RL methods vs proposed deep gradient RL method.
Figure 5
Figure 5. Performance comparison on PCG parameter.
Figure 6
Figure 6. Spectrogram visualization for proposed music improvisation model for Dataset 2.

References

    1. Ban Y, Liu Y, Yin Z, Liu X, Liu M, Yin L, Li X, Zheng W. Micro-directional propagation method based on user clustering. Computing and Informatics. 2023;42(6):1445–1470. doi: 10.31577/cai_2023_6_1445. - DOI
    1. Bell C. Algorithmic music composition using dynamic Markov chains and genetic algorithms. Journal of Computing Sciences in Colleges. 2011;27(2):99–107. doi: 10.5555/2038836.2038850. - DOI
    1. Carnovalini F, Rodà A. A multilayered approach to automatic music generation and expressive performance. 2019 international workshop on multilayer music representation and processing (MMRP); Piscataway. 2019. pp. 41–48. - DOI
    1. Chen H, Xiao Q, Yin X. 2019. Generating music algorithm with deep convolutional generative adversarial networks. 2019 IEEE 2nd international conference on electronics technology (ICET); Piscataway. 2019. pp. 576–580. - DOI
    1. Dai C. Design of an improvisational singing training system based on machine learning algorithms. International conference on cognitive based information processing and applications; Cham. 2023. pp. 213–221. - DOI

LinkOut - more resources