3 ms·
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 pr
by psobot 11y ago
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 11y agoDo 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 11y agoI 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/dubstep.py#L312-L377 https://github.com/psobot/wub-machine/blob/master/remixers/d... 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.)
- Mizza 11y agoNeat! I remember using the Echo Nest APIs for Music Hack Day in Boston a few years ago and made something semi-similar that would automatically make "chopped and screwed" remixes of songs: https://github.com/Miserlou/DJMichael5000Botts https://github.com/Miserlou/DJMichael5000Botts example - https://github.com/Miserlou/DJMichael5000Botts/raw/master/djm-houses.mp3 https://github.com/Miserlou/DJMichael5000Botts/raw/master/dj...
- nicd 11y agoWould you mind commenting on which open-source algorithms you are using in your updated codebase? I'm very interested in hacking on a similar project, but I'd like to avoid using the Echo Nest if possible. Huge fan of your work! (Forever.fm, in particular, is an inspiration for me)