This implementation corresponds to the research paper Chord Generation Based on Transformer and Color Harmony Theory. AI transforms music with widespread applications. The paper introduces a Transformer-based chord model, achieving the functionality of generating corresponding chords for a given melody. By incorporating Color Harmony Theory, it aims for superior output through a simple model and enhanced scalability using a template mapping method.
The architecture of the model is illustrated in the following diagram:
- Python 3.9 (Recommended)
-
Clone the repository:
git clone https://github.com/your-username/TCH-Chord.git
-
Navigate to the project directory:
cd TCH-Chord -
Create and activate a virtual environment (optional):
python3 -m venv venv # Create a virtual environment source venv/bin/activate # Activate the virtual environment (Linux or macOS)
-
Install dependencies:
pip install -r requirements.txt
To train the model:
cd CODE
python main.pyParameters and settings can be found in the CODE/config folder.
Feel free to embark on your musical journey with TCH-Chord! If you have any questions, feedback, or would like to contribute, please open an issue. Happy coding and composing!
