Skip to content
Julia interface to musdb, a signal separation challenge
Julia
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
src
LICENSE
README.md
REQUIRE

README.md

Musdb.jl

Julia interface to musdb, a signal separation challenge

Musdb

This is a Julia wrapper around the python Musdb interface to the musdb18 music separation challenge dataset.

Goal

Really, to play around in Julia a bit. I was amazed that an Ideal Bitmask can reproduce individual instruments from the mix so well from a demo.

Prerequisites

You should have instaled the python package mentioned above.

You should also download the musdb18 dataset to a local disk.

For playback, this package uses PortAudio. It further uses PyCall to wrap the python interface and DSP for a default implementation of the short time Fourier transform.

Install

Pkg.clone("https://github.com/davidavdav/Musdb.jl")

Synopsys

## load the module, and name it `m` for short
# m = include("src/Musdb.jl")
import Musdb
m = Musdb 
# m.setdefaultplaybackdevice()
## load the musdb18 dataset
mus = m.DB("/path/to/audio/data")
## load tracks via PyCall
tracks = m.load_mus_tracks(mus)
## load a particular track as a `stems` structure
s = m.stems(tracks[50])
## play a particular channel
m.play(s[:vocals]) ## it takes a while before vocals tune in...
## compute an ideal bitmask
ibm = m.IBM(s)
## play signal reconstructed using the amplitude and phase from the target channel, this should be perfect
m.play(ibm, :vocals, false)
## the same, but use mask found in computing `ibm`, and the signal from :mixed
m.play(ibm, :vocals)
## compute Ideal Ratio Mask
irm = m.IRM(m.stems(tracks[1]))
m.play(irm, :vocals)

Results so far

It seems we can reconstruct the audio signal fairly well from the stft with istft, and the IBM and IRM masks work OK, although reconstruction shows some artifacts here and there.

You can’t perform that action at this time.