Skip to content
Research Article Peer ReviewedAt least two reviewers Open Access

Comparative Analysis of cVAE, cGAN, and LSTM Models for Music Generation Based on Weather Conditions

1Department of Information Technology, International Burch University
✉ Corresponding author: Bećir Isaković  · becir.isakovic@ibu.edu.ba
Proceedings International Symposium on AI-Driven Engineering Systems Volume 22 Pages 89–95 Year 2025
PDF BibTeX RIS

Abstract

Generative Artificial Intelligence is gaining popularity every day and uses contextual data to personalize and enhance user experiences. This paper explores music generation that is conditioned on weather. It influences musical compositions by connecting MIDI music data with corresponding weather attributes, for example sunny and cloudy weather. In this paper, three generative models are compared for the task of weather based music generation; Conditional Variational Autoencoder (cVAE), a Conditional Generative Adversarial Network (cGAN) and Long Short-Term Memory (LSTM) network. Mentioned models are implemented and trained on combination of large MIDI corpus with historical weather information. Performance of models in this paper are evaluated using metrics that capture musical diversity and quality, such as pitch range, unique pitches and pitch variance, and for fidelity to real data is measured by mean squared error and KL divergence. Results of the paper showed that the cVAE produced the most diverse music for music that is context sensitive. Using cVAE in this approach helped the model in achieving the widest pitch range and variety of notes with low error. Runner ups in this comparison was cGAN that generated relevant music, but with slightly less diversity while LSTM showed higher error and inability to integrate the weather context. Contributions to this work is made of the first comparative analysis of these architectures for weather based music generation, exploration of their strength and limits and evidence that environmental data can be used to influence AI generated music. Results showed the relevance of blending weather data with music generation which can serve as a foundation for applications such as adaptive game soundtracks, mood based music therapy or dynamic background music that is being generated according to the user's environment.

Keywords

Cite this article

Karavdić, N., & Isaković , B. (2025). Comparative Analysis of cVAE, cGAN, and LSTM Models for Music Generation Based on Weather Conditions. In International Symposium on AI-Driven Engineering Systems (pp. 89–95). SET Technology. https://doi.org/10.36287/setsci.22.11.001

Article History

Published
10 Jul 2025

License

© 2025 SET Technology. This article is distributed under the terms of the CC BY 4.0.

Research Contributions (2019+)Peer reviewed by at least two reviewers
Open AccessCC BY 4.0
Open Discovery Metadata · DOI · OAI-PMH
Global Reachresearchers worldwide