>_
~/projects/automated-musicians
Engineering capstone / 2021-2022
Capstone / music systems / pattern analysis

Automated Musicians

This senior-year engineering capstone project explored automated music generation through programmed music theory and pattern recognition. The work was divided into three key segments: musical algorithms, pattern recognition and extraction, and a music composition generator. Each segment built the foundation for the next, with the goal of autonomously creating musically coherent compositions.

>>
compile motifs --extract-patterns --generate-score
All_ProjectsYouTube_DemoGitHub_RepoCBC_Feature
composition_signal
Operational Intent
+

Music theory rules were encoded first so later pattern extraction had a structured base to operate on.

+

Pattern recognition stages focused on identifying recurring note relationships that could be reused compositionally.

+

The generation pipeline explored how algorithmic structure could produce coherent musical output instead of random sequences.

Music Algorithms

In this initial phase, we conducted a deep-dive study of the algorithmic structure of music theory. We reviewed and implemented code models that mirrored this structure, analyzing music and setting the groundwork for creating new melodies through chords and triads, cadences, musical scales, rhythm, and time signatures.

Pattern Recognition

In the next phase, we chose sheet music instead of sound files to stay aligned with our emphasis on music theory. We encoded the sheet music into ABC format and fed hundreds of compositions into the system, which helped identify recurring patterns. This data served as a foundation for understanding common musical structures.

Composition Generator

The final stage merged the identified musical patterns. Using the musical algorithm models developed earlier, we aimed to replicate the complex process of music composition. Integrating these patterns through our algorithms led to the creation of new, coherent songs and fulfilled the objective of automated music generation.

Project Context

This project was conducted during senior-year engineering capstone work and focused on automated music generation through programmed music theory, pattern recognition, and composition automation.

The system was structured in stages so that music-theory modeling supported pattern extraction, and the extracted structures then fed the composition generator.

Metadata
Duration:
2021-2022
Domain:
Music AI
Delivery:
Capstone Project
Coverage:
Theory / Extraction / Generation
Music Algorithms

In this initial phase, we conducted a deep-dive study of the algorithmic structure of music theory. We reviewed and implemented code models that mirrored this structure, analyzing music and setting the groundwork for creating new melodies through chords and triads, cadences, musical scales, rhythm, and time signatures.

Music Algorithms - Chords
Half steps (semitones) and whole steps (tones) in music notation.
Music Algorithms - Ionian Scale
Ionian scale, also known as the major scale, showing its pattern of whole and half steps.
Music Algorithms - Aeolian Scale
Aeolian scale, also known as the natural minor scale, showing its pattern of whole and half steps.
Pattern Recognition And Extraction

In the next phase, we chose sheet music instead of sound files to stay aligned with our emphasis on music theory. We encoded the sheet music into ABC format and fed hundreds of compositions into the system, which helped identify recurring patterns. This data served as a foundation for understanding common musical structures.

Pattern Recognition and Extraction - Sheet Music
The original sheet music uploaded to the system to be encoded into ABC format.
Pattern Recognition and Extraction - ABC Format
ABC format of the sheet music, used by the system for pattern recognition.
Composition Generator

The final stage merged the identified musical patterns. Using the musical algorithm models developed earlier, we aimed to replicate the complex process of music composition. Integrating these patterns through our algorithms led to the creation of new, coherent songs and fulfilled the objective of automated music generation.

Music Composition Generator - Extrapolation Algorithm Pseudocode
Pseudocode for the extrapolation algorithm used to merge patterns.
Conclusion

We generated unique music that caught the attention of a CBC News reporter during our presentation day at the 2022 UNB Engineering Symposium. The event was a significant platform for showcasing the project, and the reporter's interest made the experience even more exciting. The positive feedback we received strengthened our confidence and highlighted the project's potential at the intersection of music and technology.

Final Thoughts

The project was a fresh and challenging venture into the intersection of music and technology. It reconnected me with my early exposure to music theory while significantly testing the programming skills and knowledge I had developed through coursework. It pushed us into a continuous learning process and opened the door to future exploration in this domain.