Instructor: Rajagopal Venkatesaramani
Team: Mehr Singh Anand (Project Manager), Mihalis Koutouvos, William Sartorio, Nalini Singh
Make sure you are in the root folder.
Install dependencies:
pip install -r requirements.txt
pip install streamlitRun app:
streamlit run app.pyTo test endpoint(s), go to http://127.0.0.1:8000/docs after running the app
Traditional chord progression follows patterns that simultaneously satisfy statistical regularities (e.g., transition probabilities between chords) and theoretical constraints (e.g., voice leading, resolution, tension). Existing work tends to optimize a single technique in isolation. This project directly compares two fundamentally different AI approaches applied to the same task, offering insight into the tradeoffs between learned pattern recognition and rule-guided optimization.
Models chord transitions as conditional probabilities derived from observed sequences. Captures what composers statistically do based on training data.
Encodes chord progressions as candidate solutions and evolves them over generations using a fitness function grounded in music theory rules. Captures what composers should do according to theoretical constraints.
Both models are evaluated on the same dataset of chord progressions. Metrics include harmonic coherence, adherence to voice leading rules, and subjective musical quality. A rule-based system supplements both models for error correction and constraint enforcement.
## Repository Structure
├── models/
│ ├── data/
│ │ ├── chord_bases.txt
│ │ ├── chord_bases_no_repeats.txt
│ │ ├── chord_bases_no_repeats_proc...
│ │ └── chord_bases_processed.pt
│ ├── model_states/
│ │ ├── chord_model_epoch_10.pth
│ │ └── chord_model_no_repeats_epo...
│ └── shared_files/
│ ├── chord_identities.py
│ ├── generate_chords_from_model.py
│ ├── genetic_algo.py
│ ├── lstm.py
│ └── markov_model.py
├── visualizations/
├── Images/
├── additional_notes/
│ └── README.md
├── main.py
├── remove_repeats.py
├── requirements.txt
└── README.md
Python 3.10+
pip install -r requirements.txt# Markov Chain
python markov/train.py --data data/progressions.csv
python markov/generate.py --length 8
# Genetic Algorithm
python genetic/evolve.py --generations 500 --population 100| Milestone | Target Date |
|---|---|
| Project Proposal | January 25, 2025 |
| First Check-In | Last week of February |
| Second Check-In | March 27th 2026 |
| Presentation Slides | April 8, 2026 |
| Online Presentation | April 12, 2026 |
| 2 Page Overview + Final Deliverables | April 17, 2026 |
We thank the CS 4100 teaching staff - in particular the TAs specializing in genetic algorithms and machine learning - for their guidance throughout this project.
CS 4100 - Artificial Intelligence, Northeastern University