Skip to content

Latest commit

 

History

13 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 

Repository files navigation

MusicGeneticAlgorithm

Update 2024: I coded this in high school. Safe to say, it's not the best code. I'm keeping it here for posterity and potential future updates.

This program generates a set of melodies based on the key that the user inputs. The melodies are evolved using a genetic algorithm for a specified number of generations. The fitness function of the genetic algorithm currently takes into account melodic smoothness and rhythm. The program outputs the melodies as MIDI files in the same directory as the genetic.py script

Usage

pip install -r requirements.txt
python genetic.py

About

A genetic algorithm that generates melodies in a user-defined key and of a user-defined tempo

Topics

Resources

Stars

6 stars

Watchers

1 watching

Forks

Releases

Packages

Used by

Contributors

Languages