Class Central is learner-supported. When you buy through links on our site, we may earn an affiliate commission.

YouTube

Melody Harmonization with Genetic Algorithms - Generative Music AI Course

Valerio Velardo - The Sound of AI via YouTube

Overview

Implement a genetic algorithm in Python to automatically generate melody harmonizations. Dive into the intricacies of genetic algorithms applied to music composition, exploring concepts such as population initialization, parent selection, crossover, mutation, and fitness evaluation. Learn how to create a MelodyData class, develop a GeneticMelodyHarmonizer, and implement various fitness criteria including chord-melody congruence, chord variety, harmonic flow, and functional harmony. Follow along with code examples, gain insights into the main function's structure, and discover how to further explore and expand upon the provided code for advanced melody harmonization techniques.

Syllabus

Intro
Harmonization task
What we'll build
Get the code
Main function: First pass
Example generation
MelodyData
GeneticMelodyHarmonizer
Generate
Initialise population
Select parents
Create new population
Crossover
Mutate
FitnessEvaluator
Chord melody congruence
Chord variety
Harmonic flow
Functional harmony
Main function: Second pass
Exploring the code further...
What's up next?

Taught by

Valerio Velardo - The Sound of AI

Reviews

Start your review of Melody Harmonization with Genetic Algorithms - Generative Music AI Course

Never Stop Learning.

Get personalized course recommendations, track subjects and courses with reminders, and more.

Someone learning on their laptop while sitting on the floor.