Encoding musical rules
- Problem
- A composition algorithm needs more than a list of pitches.
- Approach
- Model scales, chords, rhythm, cadences, and time signatures.
- Result
- Provide structure for extraction and generation.
PROJECT_06 / Algorithmic composition
Music theory, pattern extraction, and a composition pipeline.
STACKPython · NumPy · Pandas · ABC notation
The team explored automated music generation through programmed music theory and pattern recognition. The system was divided into three stages so each step supplied structured information to the next.
My contribution
As part of the capstone team, I contributed to implementing music-theory models, extracting recurring patterns, and combining those patterns into a composition workflow.
Random notes are not enough to produce a coherent composition. The system needed representations of scales, rhythm, chords, and recurring musical relationships before it could generate meaningful sequences.
We chose sheet music rather than sound files to stay aligned with the music-theory focus. Compositions were encoded in ABC notation, recurring patterns were extracted, and the generator combined them within the modeled musical structure.
Technical decisions
ABC notation makes notes and relationships directly available to the algorithm without first solving audio transcription.
Theory modeling, extraction, and generation each have a distinct purpose and an explicit handoff.
Hundreds of compositions provided data for finding common musical structures. The composition stage merged extracted patterns using the theory models developed earlier.
The team generated unique music and presented the project at the 2022 UNB Engineering Symposium, where it attracted CBC coverage.