Beat Karaoke


This project is featured in chapter 3 of Coding and the Arts. To do this project you’ll first need to set up the Spleeter tool, so let’s start there.

Important Update: In the book I neglected to note that EarSketch limits your uploads to 30 seconds, so you’ll need to trim down any full-length songs before uploading them. I recommend using the free and Open Source program Audacity.

Setting up Spleeter

Spleeter is a tool created by the music streaming service Deezer which uses some AI models to separate out the various instruments in an audio file. While it’s far from a perfect solution, I’ve been suprised at just how well it works on most music that I’ve thrown at it!

If you want to install Spleeter on your computer, you’ll want to follow the instructions on their Github wiki. A local installation is definitely the best path if you plan to process lots of files, but if you’re only going to do it a couple of times, the full install is a bit cumbersome. In that case, I have two alternatives

Moises.ai

Moises.ai is a web-based service built on top of Deezer. They require an account to sign up, but provide a up to 5 uploads a month for free.

Spleeter Collab

I’ve put this following Google Collab together based on the demo from the Spleeter Github. In order to use it you’ll want to follow these steps:

  1. Copy the Collab into your own Google Drive (File > Save a copy in Drive)
  2. Upload your file somewhere that can be accessed by URL, if it isn’t online already.
  3. Replace the url in the Colab with your own.
  4. Select “Runtime > Run All” and wait for the process to complete (it can take a while)
  5. Play and download the separated files

Exemplar Project

You can apply just about any concepts you like in this project. Here’s an exemplar that uses the basic fitMedia() and makeBeat() functions.


See inside

See Also