Last Updated on
Computational music is a rapidly developing field. With open-source tools and musical neural networks like MusicLM from Google, artificial intelligence is bringing new innovations to the music and entertainment industries. One such tool is the AI duet piano art project by ex-Google Creative Lab technologist Yotam Mann. Yotam’s magenta project puts machine learning inside your computer’s keyboard, inspiring new musical experiences through AI. So, how do we make use of it? Here’s how to make music with AI piano duet.
How does AI duet piano work?
AI piano duet is a browser-based tool for generating musical ideas. The neural net takes your own organic melodies as an input, and generates new rhythmic patterns based on that. That is to say, based on the rhythm and key you’re already playing in, AI piano duet will use neural network technology to play along with you.
You can use the center row of the keyboard as a MIDI keyboard. This means that the keys of your computer keyboard act as an input, and you can play them as if they were the keys of a piano.
How it does this is, at its core, a lesson in machine learning technology. The front-end client takes an input from your computer keyboard, and converts it into a MIDI input using the WebMIDI library from the Web MIDI API. Then, in the back-end, a Flask server uses TensorFlow, Tone.js and Google’s open-source tools from the Magenta project platform to return new musical concepts overlapping with the player’s input.
Essential AI Tools
Winston AI detector
Originality AI detector
How do you play duet on piano?
A piano duet is the act of two pianists playing simultaneous parts of the same piece. Some tunes have two many notes happening at the same time for just tow hands to manage. In other cases, many pieces of classical music are composed intentionally for the duet form; the term piano duet is not simply a practical necessity or afterthought.
Playing a duet on piano, then, requires a partner. You wont always have access to another human performer, particularly not at the very beginning of the process. When fishing for inspiration, having a free, artificially intelligent duet partner is a very economical alternative.
How to make music with AI piano duet
To make music with AI piano duet, follow these simple steps:
- Visit the AI piano duet page from AI Experiments with Google.
- Click “Launch the experiment” (or “Get code” for advanced users)
- Play the “How it works” video to get up to speed.
- Play the AI keyboard itself. You can do so by either clicking/dragging along the on-screen keys or by using the center row of the keyboard you’re currently typing on. You can also connect an actual MIDI keyboard, if you’re familiar with playing piano.
- Listen to the AI piano feedback, and draw inspiration from that! There is no output for the notes to feed into your music production software or digital audio workstation (DAW). However, as the project is built on Google’s open-source code from Magenta, software-savvy users can add that feature in themselves!
Yotam Mann, a prolific musical software engineer, maintains an official website of creative ideas and computer programs, in addition to Google’s other musical experiments on the creativitywith.ai website.
Fun creative projects such as a drum machine, Chrome Music Lab, GAN.style, and Magenta Studio allow professionals and hobbyists alike to experiment with computational music.