axeldelafosse / stemgen

🎛 Stemgen is a Stem file generator. Convert any track into a Stem and have fun with Traktor.
https://stemgen.dev
MIT License
207 stars 39 forks source link
audio-processing deep-learning demucs ffmpeg music native-instruments ni-stem stems traktor

🎛 Stemgen

Stemgen is a Stem file generator. Convert any track into a Stem and have fun with Traktor.

A Stem file is an open, multi-channel audio file that contains a track split into four musical elements – bass, drums, vocals, and melody, for example. With each element available independently, you have more control over the music you play.

Stemgen uses demucs to separate the 4 stems and ni-stem to create the Stem file.

Screenshot Before Screenshot After

Our new file contains four stems: drums, bass, other (melody) and vocals.

[!NOTE] Traktor Pro 4 includes stem separation! Fortunately, it is backward-compatible and you can upgrade without any issue. But unfortunately, Stemgen still makes sense because:

  • Stemgen is the only way to create lossless ALAC stem files... for now! Please make yourself heard on the forum if you think lossless stems matters
  • Stemgen is the only way to create your own stem files from Ableton Live and from a CLI
  • Stemgen writes the metadata of the original files to the stem files, so you can easily sync them between computers

Why?

"It's no secret that I'm fully behind the approach to encourage individuality in creativity and for artists to play differently. Stems is a new format that mirrors my constant quest for spontaneity to drive the art of performance forwards. I hope that releasing my album From My Mind To Yours in this format, mastered by LANDR, inspires others to support the approach and bring even more flexibility to the art of DJing amongst its most progressive supporters." – Richie Hawtin

Stems are fun but nobody's releasing them. Stemgen is a way to create your own stems with only one command.

May 2023 Update: I saw François K last week in Paris at the Loft Babies party and I discovered that he's playing with Stems. I highly recommend checking out his videos on YouTube: https://www.youtube.com/playlist?list=PLCr4LSsJFk48tmNoKn-l7mgsB5XUd2Af9. He's a legend and a true pioneer. I'm so happy to see him having fun with Stems. And trust me: it's even better in real life. Can't wait to see him again!

"There is a really big difference between using a tool, a computer as a tool, to make it do specific things we want it to do, in the manner in which we want it to accomplish it. In most other situations, we all find ourselves dealing with a pre-programmed or pre-determined path that the software designer has decided we must use the software in order to get certain things done. And I think that makes it that we, little by little, become controlled by the path that was designed by the people who wrote the software and forced into these gullies that they created of usage, that this is how we are supposed to be doing things. And after a while I think it's making us forget who we were and what the essence of what the music was supposed to be about and really represented.

And this right here -- I have to be honest -- it's groundbreaking to me in that sense. It's putting me back in touch with using these tools that I'm using right now as mere instruments of my will, rather than me being forced around the way they were designed to be operated, and in the process losing the very essence of what I was trying to express. Goddammit!" – François K, Expansions (Live Stems Dub and Talk)

What?

Requirement

Usage

You can use stemgen.py to generate stems:

Bring your own stems

Manually

You can use stem.py to create stems:

With Ableton Live

You can use Ableton Live to create stems:

Quick install on macOS

Quick install on Linux

Long install on Windows

qaac

If you plan to encode in AAC, you should install qaac. Here is a quick guide:

Then, to use Audio Toolbox from Apple:

Then, to support FLAC files:

Enjoy! You can now encode AAC stems with Apple Audio Toolbox, the highest quality AAC encoder.

Performance

Screenshot Input Screenshot Output

Disclaimer

If you plan to use Stemgen on copyrighted material, make sure you get proper authorization from right owners beforehand.

License

MIT