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

YouTube

Music Theory - Genetic Algorithms and Python

EuroPython Conference via YouTube

Overview

Save Big on Coursera Plus. 7,000+ courses at $160 off. Limited Time Only!
Explore the intersection of music theory, genetic algorithms, and Python programming in this 55-minute EuroPython Conference talk. Delve into the world of counterpoint, inspired by J.S. Bach's genius, and learn about Johann Joseph Fux's "Gradus ad Parnassum" approach to composition. Discover how to apply genetic algorithms to generate computer-generated counterpoint, addressing challenges such as the vast number of potential results and the need for timely, acceptable solutions. Examine the "Wordolution" example to understand the principles of genetic algorithms, and then dive into the practical application of these concepts in music composition. Investigate various species of counterpoint, from first to fifth, and learn how to encode music, create fitness functions, and implement simple commands for generating musical pieces. This talk bridges the gap between classical music theory and modern computational techniques, offering a unique perspective on algorithmic composition.

Syllabus

Intro
TWO CONTRASTING MELODIES
CONTRASTING MELODIC SHAPES
CONTRASTING CONTOURS
CONTRASTING MELODIC DENSITY
COUNTERPOINT IS INGENIOUS As demonstrated by J.S. Bach (contrapuntal genius)
SPOT THE TRANSFORMATION(S)
BUT HOW DOES IT WORK?
JOHANN JOSEPH FUX
GRADUS AD PARNASSUM Steps to Parnassus (dwelling place of the gods).
CANTUS FIRMUS ( Fixed sang based on medieval plainchant)
RULES CONCERNING PITCH
RULES FOR MOVEMENT THROUGH TIME
HOW CAN I USE FUX'S SPECIES TO MAKE COMPUTER GENERATED COUNTERPOINT?
THE PROBLEM: • Silly/huge number of potential results. • Needle in a haystack most potential results wrong • Generating solutions algorithmically is hard. Furthermore, any solution should be: • Timely (take less time than a practiced human). • "Acceptable" (fooling most people most of the time). (In other words, on a par with a human derived solution)
GENETIC ALGORITHMS! • Find acceptable solutions relatively quickly.
WORDOLUTION: AN EXAMPLE / DETOUR Wordolution evolves a solution from a starting population of words containing random letters
The fitness of a candidate solution is based upon its Levenshtein distance (number of different characters) from the target word.
The crossover function is synonymous with breeding new candidate solutions. The genetic information from both parents is mixed together to create two new children
ENCODING MUSIC FOR FOOX
FOOX FITNESS FUNCTIONS
A SIMPLE COMMAND
FIRST SPECIES COUNTERPOINT
THIRD SPECIES COUNTERPOINT
FIFTH SPECIES (UNFINISHED) Fifth species combines all of the previous species as well as extra rules concerning ornamentation of the melody

Taught by

EuroPython Conference

Reviews

Start your review of Music Theory - Genetic Algorithms and Python

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.