Back to Browse

Genetic Algorithm in Python generates Music (code included)

90.6K views
Premiered Aug 17, 2020
11:50

Can AI learn how to generate or make music? Let's find out. In this video, I implemented a genetic algorithm in python to create a bunch of melodies that will be put together to compose a song in Ableton. You could say I programmed an AI music generator in python. But instead of using a neural network, I went with a genetic algorithm. I will show you how I used evolution with a genetic algorithm to compose a piece of music. You will see the different stages of my program with all the successes and failures while coding it and generating this composition. Check out my newest video: https://youtu.be/Xujt_rFf9Us 🙏 Support me: https://www.patreon.com/kiecodes 🛰 Join our Discord, to interact with other Coders and me: https://discord.gg/j7MXYeTAJd 🧠 Pick my brain: https://calendly.com/kiecodes/ai-consultation Questions of the day ■ What else would you like me to try to generate using a genetic algorithm? If you want to learn more about genetic algorithms check out my other videos: ■ What is a genetic algorithm? - https://youtu.be/uQj5UNhCPuo Genetic Algorithm from Scratch in Python - https://youtu.be/nhT56blfRpE GitHub: https://github.com/kiecodes/generate-music Follow me here: www.facebook.com/kiecodes www.instagram.com/kiecodes Timestamps: 00:00 Intro 00:41 The Idea 01:26 How to generate sound in Python 02:16 The genome 03:28 The fitness function 04:12 Adding rhythm 04:52 Adding scales 05:20 Exporting to MIDI and the first test in Ableton 05:48 Generating chords 06:31 Generating two layers and letting them play together 07:06 Timelapse of generating all the parts for the song 09:20 Finished result --- This video contains advertising content. --- #python #machinelearning #geneticalgorithms

Download

1 formats

Video Formats

360pmp422.0 MB

Right-click 'Download' and select 'Save Link As' if the file opens in a new tab.

Genetic Algorithm in Python generates Music (code included) | NatokHD