Next music production by communicating with AI

piqcy
programming-soda
Published in
3 min readApr 23, 2017
Music session by I (KORG littlebits) & Google Magenta

I’m studying the machine learning and also love music! So I’m interested in using the machine learning to music production.
Recently I developed “magenta session” that enables you to generate the music by communicating with AI. It’s powered by Google Magenta project.

You can try this from here, and code is available on GitHub.

icoxfog417/magenta_session

From now, I’ll introduce you thw way to have a fun with “magenta session”!

Background

At first, let me introduce Google Magenta. It’s the project by Google Brain that to adapt AI technology to the art. You can get source code from here, and it is good start point to use the machine learning in the music production. Tutorial is very useful, so it’ll be easy to generate the music by Google Magenta.

When I knew the Magenta, I came up with collaborating with it. To produce music only by the machine learning is very hard, so I thought “collaboration” will be better than standalone usage.

You know Google released A.I. Duet, but I thought this is not enough. Because you can’t control Magenta’s timing, so the collaboration is unstable. Additionally, you can’t record the music session with Magenta! So I decide to make the alternative tool.

Implementation

Architecture of magenta session

By referring the A.I. Duet code, I developed magenta session. It enables you to control your playing time and Magenta’s, and most importantly, you can record the music session and download it by the download button. It is implemented by Web MIDI API.

And I think you want to collaborate with your own, training model. “magenta session” enables you too!

Collaborate with Your own model

The guide to train your own model is available here. It’s 6 steps.

6 steps to train you model

I prepared the scripts that makes training the model easier than original tutorial.

Then, you can use your trained model by setting the environment variable. You can confirm what kinds of model that “magenta session” use from here.

Dive into next music production!

Now you can make your own model and collaborate with it. So please try it and have a fun!

You can use MIDI controller like keyboard that supports MIDI output. I’m using KORG littlebits(SYNTH KIT) at the top image. It’s very interesting gadget to make music!

And to make the model that trained by your favorite artist is good. I trained my model by Coldplay. (Does this sound good…?)

You can find MIDI files from below sites.

If you like game music…

Here is generated music from model trained by Final Fantasy IV.

Of course, you have to convert MIDI file to mp3 or wav file to share it on SoundCloud or the other sites. You can do it by below site.

MIDI to MP3 Online Converter

Additionally, you can share raw MIDI file on this site.

Picotune

I think you feel like “hmm, strange music…”. Yes, but I think here is not the “end point” but also the “start point” of the music generation. Google Magenta offers not only music generating feature, but also the framework to do it. So you can use it and create more suitable model on it.

Please make various music, and share it by “#magenta_session” tag! I’m glad if this post helps you to touch the music production by machine learning.

--

--

piqcy
programming-soda

All change is not growth, as all movement is not forward. Ellen Glasgow