Procedural music generation has become increasingly important in modern digital industries, particularly in video games, adaptive multimedia systems, virtual reality environments, and interactive entertainment platforms, where real-time and context-aware music generation is required. Addressing this need, a stacked Long Short-Term Memory (LSTM) based framework is proposed for symbolic MIDI music generation. The aim is to learn sequential pitch dependencies from large-scale symbolic data and generate coherent musical note progressions through autoregressive prediction. The model is trained on the MAESTRO v3.0.0 dataset, consisting of over seven million extracted note events transformed into discrete pitch sequences. A sliding window approach is used to construct supervised learning pairs that capture local temporal dependencies for next-note prediction. The architecture includes two stacked LSTM layers followed by a softmax-activated dense output layer, producing probability distributions over the pitch vocabulary. Training is conducted using the Adam optimizer and sparse categorical cross-entropy loss. Experimental results show stable convergence across eight epochs, with a consistent reduction in training loss, indicating effective learning of sequential musical structures. During inference, temperature-based stochastic sampling is applied to enhance diversity and reduce repetitive generation patterns. Qualitative evaluation of generated MIDI outputs demonstrates that the model preserves local melodic continuity and produces structurally coherent sequences, despite relying solely on pitch-level representations without explicit rhythmic or expressive features. Overall, the proposed framework offers a scalable and implementation-oriented solution for procedural music generation and provides a strong baseline for real-time applications in adaptive audio systems, while highlighting the potential of LSTM architectures for modeling symbolic musical sequences in computational creativity contexts.
Keywords
Music Generation, Symbolic MIDI Modeling, Deep Learning, Long Short-Term Memory and Sequence Modeling.