Skip to content

onurio/harmonizing-ai

Repository files navigation

Chord Prediction Model

Introduction

Chord prediction is a common task in music generation and analysis. This project demonstrates the implementation of a chord prediction model using PyTorch. The model uses an Transformer-based architecture to predict chords based on sequences of input notes for real-time harmonizing. The project also contains Max patches for use in AbletonLive for realtime harmonization.

Live Demo

Live Demo

examples

Melody

melody-no-harm.mov

Harmonized Melody

melody-yes-harm.mp4
harmed.mp4

Usage

  1. Clone this repository:

    git clone https://github.com/onurio/harmonizing-ai.git
    cd harmonizing-ai
  2. Install the required dependencies:

    pip install -r requirements.txt
  3. Put all midi files in the midi folder

  4. Run the script to create the training data:

    parse-midi.py
  5. Run the training notebook:

    HarmonizeTransformer.ipynb
  6. Run the prediction script:

    TransformerPredict.py
  7. In AbletonLive use the max patch ai-harm.amxd to play midi notes and receive their respective harmonies.

Contributing

Contributions to this project are welcome! You can contribute by:

  • Adding new features to the model architecture
  • Optimizing the training process
  • Enhancing the documentation

Please fork the repository, make your changes, and submit a pull request.

License

This project is licensed under the MIT License.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published