How to make music with AI piano duet

How to use AI in your song writing process.

How to make music with AI piano duet

You can trust PC GuideOur team of experts use a combination of independent consumer research, in-depth testing where appropriate – which will be flagged as such, and market analysis when recommending products, software and services. Find out how we test here.

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

Editor’s pick
Only $0.00019 per word!

Content Guardian – AI Content Checker – One-click, Eight Checks

8 Market leading AI Content Checkers in ONE click. The only 8-in-1 AI content detector platform in the world. We integrate with leading AI content detectors to give unparalleled confidence that your content appear to be written by a human.
EXCLUSIVE DEAL 10,000 free bonus credits

Jasper AI

On-brand AI content wherever you create. 100,000+ customers creating real content with Jasper. One AI tool, all the best models.
TRY FOR FREE

WordAI

10x Your Content Output With AI. Key features – No duplicate content, full control, in built AI content checker. Free trial available.
TRY FOR FREE

Copy.ai

Experience the full power of an AI content generator that delivers premium results in seconds. 8 million users enjoy writing blogs 10x faster, effortlessly creating higher converting social media posts or writing more engaging emails. Sign up for a free trial.
TRY FOR FREE

Writesonic

Create SEO-optimized and plagiarism-free content for your blogs, ads, emails, and website 10X faster. Start for free. No credit card required.

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!
AI piano duet
AI piano duet in action.

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.

Steve is the AI Content Writer for PC Guide, writing about all things artificial intelligence. He currently leads the AI reviews on the website.