Show HN: Mofi – Content-aware fill for audio to change a song to any duration (opens in a new tab)mofi.loud.red
708 pointsI 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 commentsWith Eternal Jukebox I was able to emulate it by setting the jump percent very high manually at the right time (but had to be paying attention + had to get lucky with which branch it took), whereas here I'll see if I can get it going by calculating what the cut I want would set the song length to, and requesting that length and fewest cuts. (Edit: didn't work)
Sometimes the simplest features are the easiest to overlook but most useful
Interesting, as the primary use case for this seems to be something along the lines of editing music to fit into video projects.
Continue this thread — 1 reply
He just butchers an otherwise perfect song!
Will report back with results.
Edit: Results are great! https://voca.ro/13ar1g88LSKK
All comments shown.
Couldn't load more comments. Check your connection and try again.