/Chord-Progression-Generator-API

A handy tool to automatically generate chord progressions based on a selected mood.

Primary LanguagePython

Chord Progression Generator

A handy tool to automatically generate chord progressions based on a selected mood. Built with the Hooktheory API and Spotipy.

Dataset creation

  1. Get an API key from https://www.hooktheory.com and add it to a file called APIKey.txt.

  2. Obtain authentication to the Spotify API by creating the SPOTIPY_CLIENT_ID AND SPOTIPY_CLIENT_SECRET environment variables. They are availaible on the Spotify for Developers Dashboard

  3. Run the dataset creation script:

    python3 fetch_progressions.py
    

    The dataset is created by first finding one chord progressions, discarding the progressions with low probability(< 0.05), finding two chord progressions from the previously obtained one chord progressions, discarding the low probability ones, and so on.

  4. Run the database creation script with the following command:

    python3 mine_emotions.py
    

    Note: only emotions for four chord progressions have been considered for ease of usage.

Live Version

Heroku

A simplified version with 50 chord progressions has been deployed to https://chord-progression-generator.herokuapp.com

Resources