A genetic algorithm that creates small musical compositions, exported as MIDI files.
Report Bug
·
Request Feature
Table of Contents
Johann Sebastian Bot is a genetic algorithm created by Dustin Roan, Jeremy Schmich, and Alex Hoopes as a project for their Artificial Intelligence course (CS480).
The idea was to generate a number of random pieces of music split into different "populations", objectively measure each piece of music's quality, and then mix the best members of each population to form new pieces of music. Add in some more randomly generated pieces of music and perform this same process over several thousands of generations, and voila! You will have some small pieces of music that sound pretty decent. :)
Feel free to download and play any of the Sample.mid
files to see Johann's work in action!
This was built purely in Python - we used a couple small packages in order to play the music and generate MIDI files, but that's all that was used.
-
Docker
docker compose build
docker compose up
- Run will show up in ./currentRun directory
-
Python
pip install -r requirements.txt
python bot.py
- Run will show up in ./currentRun directory
It has been a while since we've worked on this project, and honestly if we were to work on it again we might just start from scratch and build a Johann v2.0.
That being said, our general ideas for continuing would be to make the music more complex, include other instruments aside from the single MIDI piano, and maybe even develop some kind of website to host the music that Johann Sebastian Bot would create!
See the open issues for a list of proposed features (and known issues).
We haven't had any frequently asked questions yet but this is where they'll go. :)
Contributions are what make the open source community such an amazing place to be learn, inspire, and create. Any contributions you make are greatly appreciated.
- Fork the Project
- Create your Feature Branch (
git checkout -b feature/AmazingFeature
) - Commit your Changes (
git commit -m 'Add some AmazingFeature'
) - Push to the Branch (
git push origin feature/AmazingFeature
) - Open a Pull Request
Distributed under the GPL 2.0 License. See LICENSE
for more information.
Authors: