How to Create Music with Artificial Intelligence using MIDI

2 min read
How to Create Music with Artificial Intelligence using MIDI
Photo by Possessed Photography / Unsplash

The use of AI (Artificial Intelligence) has revolutionized our world, including the music industry, allowing musicians to explore new ways of creating music. There are two known ways to use AI to create music - one is to work with raw audio, and the other is to use the symbolic approach, which involves working with MIDI files.

MIDI (Musical Instrument Digital Interface) is a language that allows synths and computers to communicate with each other. MIDI is not only a way of sending signals between devices, but also a way of encoding musical information in a structured and universal format. This makes MIDI a language that AI can learn and understand, just like natural languages or programming languages. MIDI files also don't hog up too much space in your memory, making it easy to train AI networks with them.

The first approach is to convert raw audio into MIDI. Basic Pitch is a free audio-to-MIDI converter developed by Spotify that can detect pitch bends. It's a powerful tool for converting raw audio to MIDI. For instance, if you have an audio recording of a John Coltrane gig that features only an upright bass and a piano, you can effortlessly convert this audio into MIDI by uploading the file to Basic Pitch. The tool will convert it to MIDI in no time.

Once you have the MIDI file, you need to use a Digital Audio Workstation (DAW) to load the file on a MIDI track and assign an instrument to it. There are many DAWs on the market, but Ableton Live is a popular choice. With Ableton Live, you can assign any instrument to the MIDI track, and it will play it.

But what if you want to create music from scratch using AI? Magenta Studio is a collection of open-source tools and models built on Magenta, which uses cutting-edge machine learning techniques for music generation. Continuator is one of the tools that uses AI to create new music. It takes a melody as input and generates new melodies based on that input. You can use Continuator to create new melodies, chord progressions, and drum patterns.

Another exciting tool that allows you to incorporate MIDI into your AI projects is This MIDI does not exist. It uses AI to generate new MIDI files based on existing ones. The tool generates a new MIDI file every time you refresh the page, allowing you to explore different variations of the same melody.

Apart from just MIDI, AI can also help with audio editing and making remixes. LALAL.AI is a powerful tool that can extract stems from audio tracks without any loss in quality. You can separate the vocal, instrumental, drums, bass, piano, electric guitar, acoustic guitar, and synthesizer tracks from a song. Then you can feed the Basic Pitch with some beats that you like and extract MIDI files from them and generate variations using Magenta Studio big set of tools!

Another amazing AI tool for stems extraction is Vocalremover.org. It's a free online tool that separates vocals from instrumentals. It uses AI to create karaoke versions of songs and provides two tracks - a karaoke version with no vocals and an acapella version with isolated vocals. With some post audio processing and polishing, you can extact pretty good quality beats and acapellas for your mixes!

In conclusion, using AI to create music has never been more interesting. With tools like Basic Pitch, Magenta Studio and This MIDI does not exist, you can explore new ways of creating music and push the boundaries of what is possible. So why not give it a try and see where AI can take your music?

Harduex blog


Follow