https://github.com/emmet-hayes/rlmusicgenerator
A music generator that uses raw reinforcement learning to create compositions. Currently explores both monophonic melodies and chordal sequences using RL tabular methods.
https://github.com/emmet-hayes/rlmusicgenerator
Last synced: 3 months ago
JSON representation
A music generator that uses raw reinforcement learning to create compositions. Currently explores both monophonic melodies and chordal sequences using RL tabular methods.
- Host: GitHub
- URL: https://github.com/emmet-hayes/rlmusicgenerator
- Owner: Emmet-Hayes
- Created: 2023-12-03T15:16:55.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2024-01-07T18:48:57.000Z (over 1 year ago)
- Last Synced: 2025-01-15T14:16:21.295Z (5 months ago)
- Language: Python
- Homepage:
- Size: 70.7 MB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Reinforcement Learning for Music Generation
Implemented and Developed by Emmet Hayes
This project was created as a final project for a Masters-level course in Reinforcement Learning. It explores the effectiveness of off-policy Monte Carlo control methods applied to the task of music generation. In order to run the code, this project requires a working version of Magenta, by Google, at this link: https://github.com/magenta/magenta
Follow the installation steps that are included on the Magenta repository link above. Additionally, there are a few more required dependencies to run the code:
pygame, imageio, matplotlib, and seaborn
To run the code, run the following command in the working directory of the project:
`python3 MIDIMain.py --zero-state`
Here is a list of arguments available for modifying the process of training:
--zero-state : Resets the saved MIDI state.
--dont-play : Skip playing the MIDI output during run.
--scale : Accepts a type of scale as the target sequence (major, minor, ionian, dorian, phrygian, lydian, mixolydian, aeolian, locrian)
--key : Accepts a musical key for the target sequence to be in.
--human-feedback : Enables human feedbackm which will periodically ask the user to rate the performance based on three subjective metrics.
There are two branches for this project that were used for evaluating and completing the project. The main branch is dedicated to monophonic melody sequence generation, while the polyphonic branch is modified to handle polyphonic sequence generation.