Package: unmixer
unmixer - create and explore isolated tracks from music filesunmixeris a graphical utility and Python package for creating isolated tracks
(drums, bass, vocals, etc.) from music files.unmixeris a frontend fordemucs,
an excellent command-line utility for music source separation from theMeta Researchteam. The creation of isolated tracks
is handled entirely bydemucs;unmixerprovides a graphical interface for
viewing, playing, and exporting the isolated tracks in any combination.InstallationThe easiest way to install the package is to download it fromPyPIusingpip.
Note thatunmixerdepends onPython3.11 or newer; please
ensure that you have a recent version of Python installed before proceeding.Run the following command in a shell (Linux or macOS is assumed):$ pip install --upgrade unmixerThe package does depend on a few external Python packages available on PyPI. If you wish to
sandbox your installation inside a virtual environment, you may choose to usevirtualenvwrapperor a similar
utility to do so.When successfully installed, a program calledunmixerwill be placed on yourPATH. See the
Usage section below for details about how to use this program.DependenciesThe utility expectsffmpegto be installed for mixing isolated
tracks. See the project'sDownloadspage for
instructions on downloading and installingffmpeg.UsageTheunmixerprogram is a graphical utility for exploring isolated tracks extracted
from a music file.At any time, you can use the-hor--helpflags to see a summary of options that
the program accepts.$ unmixer -h
usage: unmixer [-h] [music_file_or_track_dir]

create and explore isolated tracks from music files

positional arguments:
  music_file_or_track_dir
                        path to the file to unmix, or path to a directory containing isolated tracks

options:
-h, --help            show this help message and exitCreating Isolated TracksTo create isolated tracks for a specific song, pass the path to the song tounmixer.
For example:$ unmixer /path/to/Limelight.mp3When invoked with no arguments,unmixerwill open a Song Importer window containing
a button labeledExplore isolated tracks...and another button labeledChoose a song...(see the screenshot below). The Song Importer window may also be opened at any time using
the keyboard shortcutCtrl+0(Cmd+0on macOS).Press theChoose a song...button and select a music file that you want to create
isolated tracks from. Alternatively, you may drag a music file from elsewhere on your computer
and drop it on the Song Importer window. When a song has been selected, the interface will
change to reflect that the song is ready to be processed (see the screenshot below).Use the radio buttons to set the desired output format for the isolated tracks (MP3 or WAV)
and the name of the "other" track (see Customizing the "Other" Track Name, below). PressMore settings...to customize additional settings such as the output directory, prediction
model, and so on.If you selected the wrong song by mistake, pressChoose a different song...to select a
different file. When you are ready to unmix the song into isolated tracks, press theStartbutton at the bottom right of the Song Importer window. The interface will change to reflect
that the song is being processed (see the screenshot below).Once processing has started, theStartbutton will change to aCancelbutton; use this
button to abandon processing of the song.Please be patient during the process of creating the isolated tracks, as it will
take some time to complete! The time required largely depends on the length of the source
song, the selected prediction model, and other factors such as whether your device
supports GPU acceleration or the configured parallelism. As a baseline, with no GPU
acceleration and a single CPU process, it typically takes about as long as the source song
itself (or a bit longer) to create the isolated tracks for a song. For example, if a song
is 5 minutes long, it will likely take roughly 5 minutes to create isolated tracks for
that song.NOTE:Althoughunmixerdoes not display a progress bar in its graphical interface
showing the status of processing the song, the progress will be shown in the process's
standard output (assuming the standard output is not redirected to a file). Check the
shell or terminal from which you launched theunmixerUI to get a better approximation
of how long it will take to process the song. A visual progress bar may be added in
a future version.Output FormatBy default, isolated tracks are created as WAV files for the highest quality. To create
FLAC or MP3 files instead, use theIsolated track output formatradio buttons in the
Song Importer window to select the desired format.NOTE:Mixes exported using the Track Explorer (see below) will use the same format
as the source isolated track files.NOTE:If you selected an output format other than WAV, replace the.wavfile extension
in the following sections with the appropriate extension (.flacor.mp3).Output TracksThe following isolated tracks are created by default:bass.wavdrums.wavother.wavvocals.wavThese are the sources that are supported bydemucs; unfortunately, there is currently
no specific source available for guitar, piano, or any others besides bass, drums, and
vocals. Any part of the song's audio that is not identified as bass, drums, or vocals
will be found in theother.wavfile.NOTE:demucsdoes include one pre-trained model,htdemucs_6s, which includes guitar
and piano as additional sources. This model is still in an experimental stage and does not
perform reliably at separating all sources.Customizing the "Other" Track NameIn some cases, the isolated trackother.wavmay contain primarily a single instrument,
such as a guitar or piano. In these cases, it may be useful for the resulting output track
to have a corresponding name such asguitar.wavorpiano.wavinstead of the
defaultother.wav.To change the name of the "other" track toguitar.wavorpiano.wav, use the"Other" track nameradio buttons in the Song Importer window to select the desired name.
It is not currently possible to customize the name of the "other" track to be any arbitrary name,
although this feature may be added in a future version.Output DirectoryBy default,unmixercreates isolated tracks in subdirectories of the directory~/unmixer.
Each song's isolated tracks will be placed in a new subdirectory of the output directory
named based on the selected prediction model and the song's filename. For example, isolated tracks
for a song namedSubdivisions.mp3created using the modelhtdemucswould be placed in the
directory~/unmixer/htdemucs/Subdivisionsby default (note that the subdirectory does not include
the.mp3file extension).NOTE:Creating isolated tracks for multiple songs with the same filename using the same model
will result in any previous songs' isolated tracks being overwritten! If you need to process
multiple distinct songs with the same filename, be sure to rename the created directories (or
rename the song files themselves) to avoid conflicts!To customize the output directory for isolated tracks, pressMore settings...in the Song
Importer window and adjust theOutput directorysetting in the Unmixer Preferences window
that opens. You may also enable or disable creation of a subdirectory named for the selected
prediction model. A subdirectory of the selected output directory will be created for each
song's isolated tracks, as described above.Other SettingsTo see all customizable settings, pressMore settings...in the Song Importer window after
selecting a song. The Unmixer Preferences window will appear (see the screenshot below).
Hover over each setting's label to see a description of that setting in the status bar at
the bottom of the Unmixer Preferences window. See thedemucs docsfor
details about settings such as clip mode, segmentation of input songs, and so on.Changes made to the settings are saved automatically; however, changes made to settings while
a song is being processed will not take effect until the next time a song is imported. PressRestore Defaultsat the bottom of the Unmixer Preferences window to revert all settings
to their default values.NOTE:Some settings may not be available or have limited configurability depending on the
selected prediction model. For example, thehtdemucsfamily of models has a maximum segment
length of 7.8 seconds, sounmixerrequires that songs processed using this model be split into
segments with a maximum segment length of no more than 7 seconds (sincedemucsaccepts the
segment length as an integer). Similarly,unmixerdoes not allow customizing the "other"
track name when using thehtdemucs_6smodel because this model already includes guitar and piano
as distinct sources.Exploring Isolated TracksTo explore isolated tracks located in a specific directory, pass the path to the directory tounmixer. For example:$ unmixer ~/unmixer/YYZAlternatively, press theExplore isolated tracks...button in the Song Importer window
(see above) and select a directory containing isolated tracks. You may also drop a directory
containing isolated tracks onto the Song Importer window to open a Track Explorer window for
that directory.NOTE:If you usedunmixerto create isolated tracks for a song, the Track Explorer window
will open automatically when the song is finished processing, unless you disabled that setting.
(Again...please be patient!)The Track Explorer window displays the name of the song at the top, a set of playback controls
at the bottom, and a waveform and a set of controls for each isolated track found in the input
directory (see the screenshot below).Playback ControlsUse the ▶️ (Play) / ⏸️ (Pause) button found in the playback controls at the bottom of the
Track Explorer window (or press the Space bar) to control playback of the currently selected
track(s). Press the ⏮️ (Restart) button to start playback at the beginning of the song. Press
the ⏪️ (Skip Back) button to skip back one second at a time; press and hold the button to
repeatedly skip back until the button is released. Press the ⏩️ (Skip Forward) button to skip
forward one second at a time; press and hold the button to repeatedly skip forward until the
button is released. The left and right arrow keys may also be used to skip back and forward,
respectively.Use the volume slider to the right of the playback controls to adjust the playback volume of the
currently selected tracks. Alternatively, the keyboard shortcutsCtrl+UpandCtrl+Down(Cmd+UpandCmd+Downon macOS) may be used to raise and lower the volume, respectively.
Note that the underlying isolated track files themselves are NOT modified.unmixerdoes not
currently provide a way to adjust the relative volume levels of the various isolated tracks in the
overall mix, although this feature may be added in a future version.When the song is playing, you can drag the triangular playhead (displayed above the very topmost
track, with a white line extending down over all of the waveforms) to skip to a specific part of
the song. Dragging the playhead while the song is paused is not currently supported.Track ControlsEach track has its ownMutebutton andSolobutton displayed to the left of the track's
waveform. Use a track'sMutebutton to remove that track from the mix you hear when playing
the song. Inversely, use a track'sSolobutton to hearonlythat track when playing
the song. As the name implies, only one track may have theSolobutton active at a time.
A track may not be both soloed and muted at the same time; soloing a muted track will unmute
the track automatically. Playback will pause automatically if all tracks are muted at the
same time.Exporting a Custom MixUse theExport...button found in the playback controls at the bottom of the Track Explorer
to export the currently selected (i.e., unmuted) tracks as a new file. A dialog box will open,
allowing you to select a destination for the file and pressSave. For example, to create an
instrumental mix of a song, mute theVocalstrack and export the remaining tracks as a new mix.NOTE:Exporting is disabled when only a single track is selected, since that single track
is already a self-contained file that does not need to be re-exported. Similarly, exporting is
also disabled when all tracks are selected, since the resulting mix is the same as the original
song file that produced the isolated tracks in the first place.If you export custom mixes in the same directory where the isolated tracks are located, the
custom mixes will also be loaded if you reopen the same directory usingunmixerin the future.
If you want to avoid this, save any custom mixes to a different directory, such as aremixessubdirectory of the directory where the isolated tracks are located.