Music Reconstruction Using Genetic Algorithms
Introduction:
The final project for my CS5100: Foundations in Artificial Intelligence class served as an exploration of the structure and function of genetic algorithms with music generation as the application.
​
What are genetic algorithms?
Genetic algorithms, inspired by natural selection and evolution, simulate an artificial environment where the fittest individuals survive, reproduce, and introduce genetic diversity through mutations. This process refines the population’s traits, trending towards optimal solutions without relying on complex mathematics. Their strength lies in analyzing diverse data manipulations efficiently.
​
The process:
My group preprocessed MIDI (Musical Instrument Digital Interface) files to access their encoded data and quantify their musical features such as tempo, time signature, velocity, and key signature. Defining a gene as a singular instrumental track from the MIDI file, and an individual as a combination of these genes, the genetic algorithm iteratively recombined the gene pool into new individuals. The algorithm ranked every individual's objective fitness based on its genetic strengths (music feature alignment) and let the better fit individuals "survive" while removing the lesser. ​​​
Presentation
Report
Code