Band Stem Mixer

How AI music separation works, and why it is not perfect

Once a song is mixed, the instruments are added together into one waveform (two, in stereo). There is no switch that takes them apart again. AI separation works by estimating what each instrument must have sounded like — very well, but not perfectly. Knowing how helps you get the most out of it.

Why separating a mix is hard

Instruments in a band share the same range of frequencies. A bass note's harmonics overlap the guitar; a snare hit spreads over almost every frequency; a singer and a guitar can play the same note at the same time. In the mixed recording these sounds are added together, and many different combinations of instruments could have produced the same mix. Older methods used simple tricks — for example removing what is in the center of a stereo mix to remove the vocals — which also removed the bass and the kick drum, and left the vocal reverb behind.

How the AI learns to separate

A separation model is trained on songs for which the separate recordings of each part (the “stems”) are available. During training it hears the mix, makes its guess for each part, and is corrected by comparing the guess with the real stems — many thousands of times, across many songs. It learns what a voice, a bass, and a drum kit typically sound like, and uses that knowledge to pull them apart in songs it has never heard.

Because the model learned from examples, it does best on music like what it was trained on — mainly pop and rock with a typical band setup — and can be less sure with unusual instruments or sounds.

The model: Demucs (htdemucs)

Band Stem Mixer uses Demucs, a music separation model published by Meta AI researchers, in its Hybrid Transformer version (htdemucs, Rouard, Massa, and Défossez, ICASSP 2023):

The trained model (its “weights”) is provided by Meta for scientific purposes only and is not covered by the MIT license of the Demucs code. This is why Band Stem Mixer is non-commercial, with no ads.

Why four parts, and why guitar and keys stay together

The four parts — vocals, drums, bass, and other — come from the datasets the model was trained on, which provide stems in those four groups. “Other” is everything else: guitars, keys, synths, strings, horns. The model never learned to tell those apart, so they come out together.

Demucs also has an experimental six-part version that adds guitar and piano. Its own documentation says guitar quality seems okay but piano has a lot of bleeding and artifacts, and it needs more memory; it ran out of memory in a browser during our tests, so Band Stem Mixer uses the four-part model.

Why sounds leak between parts

The model's output is its best estimate, so some sounds end up in the wrong part, or in two parts at once (called bleeding):

For practice — muting your part or hearing a line clearly — this is rarely a problem. For tips, see how to get better separation.

How it runs in your browser

Usually a model like this runs on a server. Band Stem Mixer runs it on your own device, so your song is never uploaded:

Once separated, the four parts are played together in sync, and the mixer only changes their volumes, so moving a fader is instant.