Lurker News
I worked on a web service that allows you to import a song and define a target length that the song will be shortened or lengthened to. It does this by analyzing the song and finding repeating audio patterns. This is helpful for making any song match a video or performance with a set duration. You can also specify areas of the song to prefer or avoid. An example is available here: https://mofi.loud.red/edit/8bd3fdf780f8c3927e41029f3b957f8a7...

The cool thing is that after the song is analyzed on the server, the client can recompute and preview the results completely client-side through an implementation that uses Web Workers and WebAssembly. The audio previewing uses Tone.js. I am thinking of writing up some more details about the implementation in the future.
I'm still working on a way to explain this easily, but I like the idea of carrying over the concept of content-aware fill from images to audio.
Please let me know if you have any comments or questions!

Comments (161) 65 threads

Earlier comments
mmh00002 replies#
This is the coolest thing ever!

I like to have multiple hour continuations of songs which I use to help me fall asleep. In the past I've made my own, but I'm terrible at audio editing. It is a ton of work and, for me, really hard to get right.
After a little bit of experimenting with Mofi, it seems to do a very good job and selecting when to repeat a sections.
[edit]
Here's my first attempt for a 30 minute song:
https://mofi.loud.red/edit/ebbf4b410181aa767152945cbb6a2d679...

jtbayly1 reply#
I wish this worked. I wanted to listen to an example. But all I got was “You haven't imported this file yet. Import it first to use it.”
kkwtflz#
Local storage can be easily bypassed if you don't encrypt the values in that array...
BonoboIO#
This gives me

"Not Imported You haven't imported this file yet. Import it first to use it."

mmh0000#
After spending all afternoon playing with this. I have two inputs.

1] A lot of the heavy lifting is done client side, which is excellent; I have a super fast processor! But, watching the CPU utilization, it seems to spike the CPU for a few milliseconds, then waits for a second or two and, spikes the CPU again, then repeats. I suspect there may be some significant performance improvements to be had on client recomputes.
2] While it is doing recomputes, it would be great to get a progress bar or, at least, a message saying, "This will take a long time, be patient." It took me multiple attempts to determine that the service was indeed working, just that my client was taking its sweet time recomputing.

spaceman_2020#
Can’t wait to use this to stretch my 19 minute prog rock tracks into 190 minutes :)
diggum1 reply#
I was fortunate to help bring similar tech to life as a PM for Adobe Audition and Premiere Pro in a feature dubbed Remix. Since we were designing to help music fit the duration of a scene or video project, our goals resulted in a slightly different experience from those of music fans wanting to recut a song for general purpose listening, but it worked like magic for most tracks. Still one of my favorite projects that I worked on.
diggum1 reply#
And I just realized you acknowledged it at the bottom of the page! ;)
jaflo#
The tech behind the Remix feature looks really impressive! I haven't used it myself, but while working on this project I had some people mention it to me and I looked at some videos showing how it's used. Very cool feature!

Load more comments