CMU-CS-25-157
Computer Science Department
School of Computer Science, Carnegie Mellon University



CMU-CS-25-157

Autoregressive Customizable Bach Chorale
Generation Using a Lightweight Hybrid Model

Umut Olmez

M.S. Thesis

December 2025

CMU-CS-25-157.pdf


Keywords: Bach Chorales, Autoregressive Sequence Modeling, Symbolic Music Generation, Temporal Convolutional Neural Network, Transformer, Self Attention, RoPE

Music, especially Bach's music which is a staple in the teaching of fundamentals of musical composition, exhibits various patterns and rules throughout various parameters, such as harmony, melody and structure, that give it a defining structure when we listen to it and make it different than just noise. Many of these parameters are simplified in Bach chorales, making them great for studying the fundamentals of tonal composition and making them a perfect candidate to be generated by a computer. Looking at both the earlier autoregressive methods and the recent hybrid models, this thesis produced a lightweight and customizable hybrid model that can take in any initial sequence of chords and start generating a chorale on top of it. With an augmented symbolic dataset of 4584 chorales, using a TCNN and a transformer with self attention and RoPE, the model captures local voice leading patterns and more global structural cues to generate a chorale autoregressively. The final model was able to train under 1.5 hours in most cases and is very easy to customize with adjustable layer numbers, model dimension, kernel size and dilation, and extra steps during fusion of transformer and TCNN layers. The generated chorales exhibited interesting musical material, some mimicking Bach's style successfully through 2 bar phrases that end sensibly, 4 bar phrases with half cadences and perfect cadences, modulations to the correct relative key, and idiomatic four-part writing patterns. But it was also observed that the chorales started to degenerate especially after the first few phrases. The final model can be used by students or musicians being introduced to four-part writing as an assistant and is even able to create interesting ideas for experienced composers.

35 pages

Thesis Committee:
Roger Dannenberg (Chair)
Chris Donahue

Jignesh Patel, Interim Head, Computer Science Department
Martial Hebert, Dean, School of Computer Science


Return to: School of Computer Science

This page maintained by reports@cs.cmu.edu