This repository contains tools for generating chord sequences that match the melody of audio inputs. The project was developed during the Generative AI Workshop at UPF Barcelona and Sound of AI.
- Markov Chain Modeling
- Chord Classifier Sampling
Using the Choco Dataset, we:
- Developed a parser to convert Harte annotations to MIDI
- Created n-order Markov transition matrices from unique chords
- Extracted melodies using Spotify Basic Pitch and Essentia Melodia
- Generated harmonies matching the detected melodies
- Variational Auto Encoder (VAE) that compresses Choco JAM data into latent representations for chord sampling
- Max/MSP patch with OSC communication
- Automatic generation when new audio files are detected
Note: This is an exploratory project evaluating different approaches to chord sequence generation.
- Python 3.11 (required)
- basic-pitch
- librosa
- numpy
conda create -n genmus_bcn2024 python=3.11
conda activate genmus_bcn2024
pip install basic-pitch librosa numpyNote: Basic Pitch requires Tensorflow and Python 3.11 for proper dependency installation.
pip install -r requirements.txt
- Clone the Choco Dataset into the
/datafolder - Run markov_sequence_generator.py to build transition matrices from the dataset
- Place your target audio loop in the
/data/loopfolder - Execute the main script to generate chord sequences for your input
- Find the generated MIDI sequences in the
/data/midifolder