
The Wub Machine automatically remixes music in a dubstep style - thanatropism
http://the.wubmachine.com
======
psobot
Ah, cool! I'm the owner/maintainer/person-who-built-this-project a couple
years ago. For some context:

\- The Wub Machine used to use music intelligence APIs provided by the Echo
Nest, a music data company that was recently bought by Spotify. It now uses a
combination of open-source algorithms that work _just okay_.

\- It's somewhat open source (well, an old version of the codebase is):
[https://github.com/psobot/wub-machine](https://github.com/psobot/wub-machine)

~~~
bravura
Do you have a writeup of what it does to the music?

All the writeups I've seen on your blog describe the web stack and frontend,
but not how you are manipulating the music.

~~~
psobot
I don't have a writeup, unfortunately, but the "algorithm" I use is really
simple and on Github:

[https://github.com/psobot/wub-
machine/blob/master/remixers/d...](https://github.com/psobot/wub-
machine/blob/master/remixers/dubstep.py#L312-L377)

The algorithm mixes a pre-generated template (in the key of the song) in with
rearranged samples from each section of the song. If the song has 10
"sections" (verse, chorus, bridge, etc.) then the remix will have 10 sections
too, and samples within each section will be rearranged and mixed with the
template.

From the above link:

    
    
          Compiles one "section" of dubstep - that is, one section (verse/chorus) of the original song,
          but appropriately remixed as dubstep.
          Chooses appropriate samples from the section of the original song in three keys (P1, m3, m7)
          then plays them back in order in the generic "dubstep" pattern (all 8th notes):
          |                         |                         :|
          |: 1  1  1  1  1  1  1  1 | m3 m3 m3 m3 m7 m7 m7 m7 :| x2
          |                         |                         :|
          On the first iteration, the dubstep bar is mixed with a "splash" sound - high-passed percussion or whatnot.
          On the second iteration, hats are mixed in on the offbeats and the wubs break on the last beat to let the
          original song's samples shine through for a second, before dropping back down in the next section.
          If samples are missing of one pitch, the searchSamples algorithm tries to find samples
          a fifth from that pitch that will sound good. (If none exist, it keeps trying, in fifths up the scale.)
    
          If the song is not 4/4, the resulting remix is sped up or slowed down by the appropriate amount.
          (That can get really wonky, but sounds cool sometimes, and fixes a handful of edge cases.)

------
V-2
It just hangs ("waiting")

------
dang
Discussed a bit in 2012, with some interesting links:
[https://news.ycombinator.com/item?id=3874284](https://news.ycombinator.com/item?id=3874284).

