<?xml version="1.0" encoding="UTF-8"?>

<article xmlns:xlink="http://www.w3.org/1999/xlink" article-type="research-article" dtd-version="1.3" xml:lang="en">
 <front>
  <journal-meta>
   <journal-id journal-id-type="publisher">setsci</journal-id>
   <journal-title-group>
    <journal-title>SETSCI Conference Proceedings</journal-title>
   </journal-title-group>
   <issn publication-format="electronic">2687-5527</issn>
   <publisher>
    <publisher-name>SET Technology</publisher-name>
   </publisher>
  </journal-meta>
  <article-meta>
   <article-id pub-id-type="doi">10.36287/setsci.22.11.001</article-id>
   <article-id pub-id-type="publisher-id">f9d37d3f-5b3f-4ff4-856b-e308ceeddd53</article-id>
   <title-group>
    <article-title>Comparative Analysis of cVAE, cGAN, and LSTM Models for Music Generation Based on Weather Conditions</article-title>
   </title-group>
   <contrib-group>
    <contrib contrib-type="author">
     <name>
      <surname>Karavdić</surname>
      <given-names>Nedim</given-names>
     </name>
     <xref ref-type="aff" rid="aff1"/>
    </contrib>
    <contrib contrib-type="author" corresp="yes">
     <name>
      <surname>Isaković </surname>
      <given-names>Bećir</given-names>
     </name>
     <xref ref-type="aff" rid="aff1"/>
    </contrib>
   </contrib-group>
   <aff id="aff1">
    <institution>Department of Information Technology, International Burch University</institution>
   </aff>
   <pub-date date-type="pub">
    <day>10</day>
    <month>07</month>
    <year>2025</year>
   </pub-date>
   <volume>22</volume>
   <fpage>89</fpage>
   <lpage>95</lpage>
   <permissions>
    <copyright-statement>© 2025 SET Technology</copyright-statement>
    <copyright-year>2025</copyright-year>
    <copyright-holder>SET Technology</copyright-holder>
    <license xlink:href="https://creativecommons.org/licenses/by/4.0/">
     <license-p>CC BY 4.0</license-p>
    </license>
   </permissions>
   <abstract>
    <p>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.</p>
   </abstract>
   <kwd-group xml:lang="en">
    <kwd>Music Generation</kwd>
    <kwd>cVAE</kwd>
    <kwd>cGAN</kwd>
    <kwd>LSTM</kwd>
    <kwd>MIDI</kwd>
   </kwd-group>
  </article-meta>
 </front>
 <back>
  <ref-list>
   <ref id="ref1">
    <mixed-citation>A. van den Oord, S. Dieleman, H. Zen, K. Simonyan, O. Vinyals, A. Graves, N. Kalchbrenner, A. Senior, and K. Kavukcuoglu, “WaveNet: A Generative Model for Raw Audio,” 2016.</mixed-citation>
   </ref>
   <ref id="ref2">
    <mixed-citation>G. Hadjeres, F. Pachet, and F. Nielsen, “DeepBach: a Steerable Model for Bach Chorales Generation,” 2017.</mixed-citation>
   </ref>
   <ref id="ref3">
    <mixed-citation>J. Engel, K. K. Agrawal, S. Chen, I. Gulrajani, C. Donahue, and A. Roberts, “GANSynth: Adversarial Neural Audio Synthesis,” 2019.</mixed-citation>
   </ref>
   <ref id="ref4">
    <mixed-citation>Z. Zheng, C. Cai, and Y. Zhang, “Real-Time Intelligent Big Data Processing: Technology, Platform, and Applications,” 2019.</mixed-citation>
   </ref>
   <ref id="ref5">
    <mixed-citation>A. N. Navaz and T. Karthikeyan, “Real-Time Data Streaming Algorithms and Processing Technologies: A Survey,” 2019.</mixed-citation>
   </ref>
   <ref id="ref6">
    <mixed-citation>J.-P. Briot, G. Hadjeres, and F.-D. Pachet, “Deep Learning Techniques for Music Generation,” 2020.</mixed-citation>
   </ref>
   <ref id="ref7">
    <mixed-citation>P. Dhariwal, H. Jun, C. Payne, J. W. Kim, A. Radford, and I. Sutskever, “Jukebox: A Generative Model for Music,” 2020.</mixed-citation>
   </ref>
   <ref id="ref8">
    <mixed-citation>W. X. Zhao, Y. Wu, J. Liu, and J. Xu, “Retrieval-Augmented Generation for AI-Generated Content: A Survey,” 2023.</mixed-citation>
   </ref>
   <ref id="ref9">
    <mixed-citation>J. Wen and K. M. Ting, “Computational Intelligence Techniques for Music Composition: A Review,” 2023.</mixed-citation>
   </ref>
   <ref id="ref10">
    <mixed-citation>Google Cloud, “Enabling Real-Time AI with Streaming Ingestion in Vertex AI,” 2022. [Online]. Available: https://cloud.google.com/blog/products/ai-machine-learning/real-time-ai-with-streaming-ingestion-in-vertex-ai</mixed-citation>
   </ref>
   <ref id="ref11">
    <mixed-citation>Y. Zhao, X. Wang, and C. Liu, “Domain Adversarial Training on Conditional VAE for Controllable Music Generation,” 2022.</mixed-citation>
   </ref>
   <ref id="ref12">
    <mixed-citation>D. Conner, T. Johnson, and K. Lee, “Music Generation Using LSTM Networks for Sequence Modeling,” 2022.</mixed-citation>
   </ref>
   <ref id="ref13">
    <mixed-citation>Lakh MIDI Dataset.</mixed-citation>
   </ref>
   <ref id="ref14">
    <mixed-citation>Historical Hourly Weather Data 2012-2017</mixed-citation>
   </ref>
  </ref-list>
 </back>
</article>
