# Split a song into stems

> Separate a mix into vocals, drums, bass and everything else: how it works, where it leaks, and what to make with the parts.

Canonical: https://maru.audio/help/split-a-song-into-stems
Documentation index: https://maru.audio/help/llms.txt

Stem separation takes a finished mix and gives you back four aligned parts:
vocals, drums, bass and other. Mute the vocal for a karaoke track, loop the
drums under a new bass line, or sample one instrument that was never recorded
on its own.

## Try it

Open [StemSep](https://maru.audio/modules/stemsep), choose a song or an example, pick a model and
press **Split stems**. Solo each stem, then export them as WAV files that stay
lined up with the original.

## How it works

A trained model has listened to many songs alongside their original
multitrack recordings. Given a new mix, it estimates which parts of the sound
belong to each instrument and builds a mask for each one. The four stems add
back up to roughly the original. [Stem separation](https://maru.audio/learn/stem-separation.md)
in Learn walks through the technique.

StemSep offers methods that run in different places:

| Method | Where it runs | Your audio |
| --- | --- | --- |
| On this device | In your browser, after a one-time model download | Stays on your computer |
| Maru server | On Maru's servers | Uploaded for processing |
| Commercial provider | On a separation service, with your own key | Uploaded to that provider |

## Ideas

- **Practise with the band.** Remove your instrument from a song and play along.
- **Remix and mash up.** Put one song's vocal over another's drums; see
  [Stems to remix](https://maru.audio/learn/stems-to-remix.md).
- **Sample cleanly.** Pull a drum break or a bass phrase out of a mix before
  you chop it.
- **Transcribe better.** Separate first, then
  [turn the bass stem into MIDI](https://maru.audio/help/turn-audio-into-midi.md).
- **Find the groove.** Track beats on the drum stem rather than the full mix;
  see [Follow the beat](https://maru.audio/help/follow-the-beat.md).

## What it gets wrong

- **Leakage.** A little hi-hat in the vocal stem, a little vocal in "other".
  Soloed stems reveal it; in a mix it often disappears.
- **Artefacts.** Reverb tails, distorted guitars and dense mixes produce watery
  or phasey sounds.
- **Four buckets only.** Piano, guitar, strings and synths all land in "other".
- **Rights do not change.** A separated vocal is still the original artist's
  recording. Check what you are allowed to release.
- Songs can be up to 3 minutes and 128 MiB.

## Build your own

Remix StemSep in Studio, or ask your coding agent to build on it:

```text
Read the Maru docs page "Separate stems in a module", then read StemSep's
source with `maru module files stemsep` and `maru module read stemsep
src/index.ts`. Build a practice tool that separates a song, mutes the
instrument I choose, and loops a section I mark so I can play along.
```

Developers can start from [Separate stems in a module](https://maru.audio/docs/separate-stems-in-a-module.md).
The [model directory](https://maru.audio/models) compares separation models.
