MIDI Gen AI

Generative Chord prediction model, Demo available on GitHub

May 21, 2023

Description

MIDI Gen AI is a cutting-edge chord prediction tool, designed using a Transformer neural network architecture. The project is a testament to my proficiency in AI, music theory, and programming. It is hosted as a Google Colab notebook on GitHub, showcasing a fully functional prototype.

About the Prototype

The prototype operates using pretrained weights, allowing it to analyze a starter MIDI file and predict a suitable chord progression. It considers the specific musical genre and desired variation, which is managed by the top-p sampling method. The output is a new MIDI file that accurately reflects the input parameters and can be easily downloaded for further use or analysis.

About the Model and Training

  • Dataset and Design: MIDI Gen AI is built on a robust dataset of 20.9 million MIDI tokens, ensuring a wide range of musical styles. The model is a decoder-only transformer with self-attention and feed-forward networks, specialized for sequential data like music.
  • Normalization and Masking: The model incorporates layer normalization for stability and masked self-attention to retain the sequential integrity of music data.
  • Training and Evaluation: Trained on a GPU using PyTorch and a categorical cross-entropy loss function, the model's efficacy was evaluated based on its real-time chord prediction accuracy across diverse musical genres.

Source Code

Demo