TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

Show HN: Mofi – Content-aware fill for audio to change a song to any duration

708 pointsby jafloalmost 2 years ago
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: <a href="https:&#x2F;&#x2F;mofi.loud.red&#x2F;edit&#x2F;8bd3fdf780f8c3927e41029f3b957f8a7ed96863" rel="nofollow noreferrer">https:&#x2F;&#x2F;mofi.loud.red&#x2F;edit&#x2F;8bd3fdf780f8c3927e41029f3b957f8a7...</a><p>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.<p>I&#x27;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.<p>Please let me know if you have any comments or questions!

60 comments

Philip-J-Fryalmost 2 years ago
There used to be something called the eternal jukebox I think. But you could give it a song and it would endlessly loop the audio like you have here. But it would also switch it up and change the parts it looped. And it would have a nice visualisation showing how the parts of the song connect and the different paths it takes.<p>I think it was <a href="https:&#x2F;&#x2F;eternalbox.dev&#x2F;" rel="nofollow noreferrer">https:&#x2F;&#x2F;eternalbox.dev&#x2F;</a> since that&#x27;s all I can find on Google. But that site is down.
评论 #36482468 未加载
评论 #36482627 未加载
评论 #36482693 未加载
评论 #36519067 未加载
评论 #36487224 未加载
josuepeqalmost 2 years ago
This is neat, I have wondered if anything of this nature existed, in the past, as a child of the 80s&#x2F;90s attempting to master the art of the perfect mixtape… 30 minutes a side down to the second the tape runs out, would be a win.<p>But for today’s music, shortening the 2010s&#x2F;2020 already shorter lengths would mean a song might not be more than a minute in length. On average, full unedited tracks today end up being a bit shorter than they used to be, solely due to the economics of streaming. Rather than paying for the content second by second, it is done by paying per track play. The result is a lot of 2 minute tracks, which were produced with the “verse” parts getting jammed together into the “chorus” with no break in vocals, which also uses pitch adjustments, “the “bridge” is an afterthought that is terrible, or more recently, nonexistent……… Instrumental solo? Anyone? Bueller?<p>Music is no longer anticipated, budgeted for, and purchased on launch day with great fanfare. We have grown accustomed to the idea that we should have everything available at our fingertips, and as a consequence of this we get exactly what we pay for.
评论 #36483072 未加载
评论 #36483824 未加载
评论 #36482940 未加载
评论 #36483071 未加载
评论 #36482566 未加载
评论 #36495082 未加载
评论 #36482914 未加载
评论 #36484833 未加载
lelanthranalmost 2 years ago
My word is this impressive.<p>I uploaded Wuthering Heights[1], selected just the trailing guitar solo (3:09 to just before the fade-out starts), and got a bunch of seemless sounding 3m tracks of just that guitar shredding away.<p>All the ones it generated were perfectly cut and pasted, with one exception in track 2 where I could tell where it was cut&#x2F;pasted.<p>Can&#x27;t wait to try it with the guitar at the end of Brothers in Arms (Dire Straits), or the flute solo in Locomotive Breath.<p>If anyone is looking for a good use of AI, I wouldn&#x27;t mind a webpage that lets me say &quot;complete this solo that was abruptly cut short&quot; and get something great.<p>[1] This one is especially sad because the sound engineer&#x2F;producer later lamented that he faded the solo out so quickly because the player was still improving like mad and what he had left after the fadeout was apparently better than what he had done while recording.
评论 #36490344 未加载
cheschirealmost 2 years ago
There&#x27;s a specific sect of deadmau5 fans that would love to use this to generate multi-hour continuous mixes of a song called Strobe.
评论 #36482192 未加载
mmh0000almost 2 years ago
This is the coolest thing ever!<p>I like to have multiple hour continuations of songs which I use to help me fall asleep. In the past I&#x27;ve made my own, but I&#x27;m terrible at audio editing. It is a ton of work and, for me, really hard to get right.<p>After a little bit of experimenting with Mofi, it seems to do a very good job and selecting when to repeat a sections.<p>[edit]<p>Here&#x27;s my first attempt for a 30 minute song:<p><a href="https:&#x2F;&#x2F;mofi.loud.red&#x2F;edit&#x2F;ebbf4b410181aa767152945cbb6a2d67910710e1" rel="nofollow noreferrer">https:&#x2F;&#x2F;mofi.loud.red&#x2F;edit&#x2F;ebbf4b410181aa767152945cbb6a2d679...</a>
评论 #36483499 未加载
评论 #36483982 未加载
mmh0000almost 2 years ago
After spending all afternoon playing with this. I have two inputs.<p>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.<p>2] While it is doing recomputes, it would be great to get a progress bar or, at least, a message saying, &quot;This will take a long time, be patient.&quot; It took me multiple attempts to determine that the service was indeed working, just that my client was taking its sweet time recomputing.
spaceman_2020almost 2 years ago
Can’t wait to use this to stretch my 19 minute prog rock tracks into 190 minutes :)
评论 #36482649 未加载
diggumalmost 2 years ago
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.
评论 #36486787 未加载
Solvencyalmost 2 years ago
How did you make the animation in the homepage? It&#x27;s definitely not a screen recording...it feels like something animated in After Effects at 60fps. Is that true? Or did you use something else?
评论 #36481716 未加载
zedadexalmost 2 years ago
As a fan of tools like this and Eternal Jukebox, I cannot wait for the ones that have an option to request a cut specifically, like &quot;from approximately this point, jump back to around this other point&quot;, while using the &#x27;smart&#x27; features to line up the audio cuts (I&#x27;m sure stuff like that is built into the CC suite but I&#x27;m not springing that kind of money to recut a few of my tunes for personal listening ).<p>With 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&#x27;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&#x27;t work)<p>Sometimes the simplest features are the easiest to overlook but most useful
MatthewWilkesalmost 2 years ago
Surprising that the only mention of intellectual property in the FAQ and the legal terms page is about copyright that the service claims in the outputs, not restrictions on the inputs.
评论 #36482724 未加载
评论 #36482775 未加载
sergiotapiaalmost 2 years ago
Thank you, now I can remove Dababy from Dua Lipa - Levitating. <a href="https:&#x2F;&#x2F;www.youtube.com&#x2F;watch?v=TUVcZfQe-Kw&amp;pp=ygUTZHVhIGxpcGEgbGV2aXRhdGluZw%3D%3D">https:&#x2F;&#x2F;www.youtube.com&#x2F;watch?v=TUVcZfQe-Kw&amp;pp=ygUTZHVhIGxpc...</a><p>He just butchers an otherwise perfect song!<p>Will report back with results.<p>Edit: Results are great! <a href="https:&#x2F;&#x2F;voca.ro&#x2F;13ar1g88LSKK" rel="nofollow noreferrer">https:&#x2F;&#x2F;voca.ro&#x2F;13ar1g88LSKK</a>
评论 #36483270 未加载
lcnPylGDnU4H9OFalmost 2 years ago
Seeing the domain has me curious, is it a reference to a Pokemon[0] or is it something else? (Sorry for off-topic!)<p>&gt; On repeat: Make an extended version of your song&#x27;s favorite part by choosing the catchy part and seamlessly repeating part of it!<p>John Mulaney&#x27;s &quot;Best Meal I Ever Had&quot; story[1] had me wanting to do this for Tom Jones&#x27; <i>What&#x27;s New Pussycat</i> so I could play that as an inside joke with some friends. This would definitely have made that easier. (Ultimately, I had a version of the song which started in the middle and &quot;ended&quot; right before it &quot;started&quot; so the effect could be mimicked if the file was played on loop. This had a short silence manifest as the media player &quot;loaded a new song&quot; from its perspective; didn&#x27;t have that issue in Audacity.)<p>[0] <a href="https:&#x2F;&#x2F;www.pokemon.com&#x2F;us&#x2F;pokedex&#x2F;loudred" rel="nofollow noreferrer">https:&#x2F;&#x2F;www.pokemon.com&#x2F;us&#x2F;pokedex&#x2F;loudred</a><p>[1] <a href="https:&#x2F;&#x2F;www.youtube.com&#x2F;watch?v=Tv1l1eUhN-E">https:&#x2F;&#x2F;www.youtube.com&#x2F;watch?v=Tv1l1eUhN-E</a> (Usually called &quot;The Salt and Pepper Diner&quot;)
评论 #36487039 未加载
sd9almost 2 years ago
Infinite roll: <a href="https:&#x2F;&#x2F;mofi.loud.red&#x2F;edit&#x2F;517b150b00ca475016cd64c2ed0730266735aa5c" rel="nofollow noreferrer">https:&#x2F;&#x2F;mofi.loud.red&#x2F;edit&#x2F;517b150b00ca475016cd64c2ed0730266...</a>
codetrotteralmost 2 years ago
&gt; This is helpful for making any song match a video or performance with a set duration.<p>This is perfect for TikTok videos!<p>Will definitely be using your tool. Very cool!<p>&gt; I am thinking of writing up some more details about the implementation in the future.<p>Please do :D
personjerryalmost 2 years ago
I&#x27;m enjoying the results, I can make my favourite tunes 10 minutes long and often it&#x27;s pretty seamless! I can&#x27;t wait to get sick of all my songs :)<p>Is the project open-source?
评论 #36483764 未加载
stu2010almost 2 years ago
What&#x27;s the maximum length? I can&#x27;t find it documented anywhere and keep running into it when trying to try this with Tool tracks.
评论 #36482374 未加载
jedbergalmost 2 years ago
The way this works is interesting. I asked it to cut 30 seconds from the middle of a song (a spoken word portion without music) and then shorten the track by 30 seconds. I figured it would just cut that out and do some fancy blending of the music before and after the cut to make it sound good. Instead I got:<p><pre><code> at 00:00 a 00:16 segment (00:00–00:16) at 00:16 a 00:51 segment (02:05–02:57) at 01:07 a 02:31 segment (01:34–04:05) at 03:39 a 00:11 segment (04:03–04:14) </code></pre> It&#x27;s adding and repeating chunks of the song and cutting other parts and I&#x27;m not sure why.
quickthrower2almost 2 years ago
I can finally see and hear what Bohemian Rapsody would have sounded like had they caved in to make a radio-friendly cut.
redox99almost 2 years ago
Does this create &quot;new&quot; music for the filled parts, like some AIs (MusicLM, MusicGen, etc) do? Or just repeat in a more seamless way?
评论 #36481877 未加载
ConnorMooneyhanalmost 2 years ago
I&#x27;m a tad disappointed. Cool idea, but I haven&#x27;t gotten anything to really sound seamless when shortening or lengthening yet.
评论 #36482392 未加载
superasnalmost 2 years ago
This will be great for my programming music.<p>Though it&#x27;s just anecdotal but I have seen that the quickest way to enter into the zone is to play repeating loops at 140 bpm.<p>Unfortunately I haven&#x27;t really found many of these as most of the tracks I love are non looping. I think this can take care of it. Kudos on making this!
kunalguptaalmost 2 years ago
Perfect! You automated my hobby of extending music videos to last up to the max video length available on YouTube in 2008<p><a href="https:&#x2F;&#x2F;youtu.be&#x2F;XCJs_eAkNS8" rel="nofollow noreferrer">https:&#x2F;&#x2F;youtu.be&#x2F;XCJs_eAkNS8</a>
LorenDBalmost 2 years ago
This is pretty good! However, there are some unusual splices. One I found was with a recording of Cumberland Gap[0]. If you run a 10 minute loop, you&#x27;ll find that the first splice in multiple tracks (happens at about the 2:30 mark), the song suddenly cuts to the middle of a mandolin solo that clearly doesn&#x27;t belong there. With that being said, I&#x27;m still overall impressed by this.<p>[0]: <a href="https:&#x2F;&#x2F;youtu.be&#x2F;VAk4_CMn7To" rel="nofollow noreferrer">https:&#x2F;&#x2F;youtu.be&#x2F;VAk4_CMn7To</a>
nicexealmost 2 years ago
I tried lengthening Another Day by Dream Theater from 4:26 to 8:00.<p>I set it to avoid the segment that the key changes and to favor the 2 solo segments.<p>It doesn&#x27;t seem like its doing a good job. Only the first 5 seconds of the intro made it and then is just repeating over and over the big solo. In the end, a very small part of the short solo makes it in as an outro.<p>Maybe it works better at shortening songs or maybe changing duration closer to the original duration.
pradnalmost 2 years ago
This is exciting. It adds to the tools creators have to remix songs. A middle ground between full AI and full human-made songs is a mix, like what Bronze AI has done with one of my favorite songs. (<a href="https:&#x2F;&#x2F;bronze.ai&#x2F;listen&#x2F;jai-paul&#x2F;" rel="nofollow noreferrer">https:&#x2F;&#x2F;bronze.ai&#x2F;listen&#x2F;jai-paul&#x2F;</a>)<p>A less rosy scenario is like Spotify generating music to get around having to pay artists.
edonhametsualmost 2 years ago
If you&#x27;re stuck on Loading (0 of 19), make sure you have a new enough Firefox version to support dynamic import for workers (<a href="https:&#x2F;&#x2F;bugzilla.mozilla.org&#x2F;show_bug.cgi?id=1540913" rel="nofollow noreferrer">https:&#x2F;&#x2F;bugzilla.mozilla.org&#x2F;show_bug.cgi?id=1540913</a>, i.e. 113 or newer).<p>For example, ESR 102 does not have the feature and it breaks the site.
personjerryalmost 2 years ago
I created a 10 minute version of The Less I know The Better (<a href="https:&#x2F;&#x2F;mofi.loud.red&#x2F;edit&#x2F;dde278b8c131c1a6e47117ceb29d1ceb6ee7a80d" rel="nofollow noreferrer">https:&#x2F;&#x2F;mofi.loud.red&#x2F;edit&#x2F;dde278b8c131c1a6e47117ceb29d1ceb6...</a>) but the export doesn&#x27;t seem to work, it just errors out with &quot;Invalid Crossfade&quot; multiple times
评论 #36482712 未加载
empyrrhicistalmost 2 years ago
Are you worried about trademark infringement?<p><a href="https:&#x2F;&#x2F;mofi.com&#x2F;" rel="nofollow noreferrer">https:&#x2F;&#x2F;mofi.com&#x2F;</a>
评论 #36494215 未加载
cyberaxalmost 2 years ago
Can we use something like this to remove the laugh track, please? PLEASE?<p>It needs to be generalized to video content, but the task is a bit easier.
danhaualmost 2 years ago
Very cool! It seems to struggle with mixed meter music, though (understandably). I&#x27;ve uploaded a song of mine that&#x27;s mostly in 6&#x2F;8, but has some bars of 7&#x2F;8. It still makes smooth transitions, but on the wrong beat, which is very noticeable. I will try it again with a song in only one odd measure, maybe that works.
benkaiseralmost 2 years ago
Interesting how the youtube videos are pulled down in a cloud function and stored on a file host for caching. I know there is a disclaimer about making sure you have the applicable rights, and IANAL, but this is for sure violating some terms and potentially copyright when users are using videos they don&#x27;t have rights to.
emmanueloga_almost 2 years ago
Really nice! Do you use a library or service to find the self similar points, or is it your work?<p>Found a bunch of cool related links here [1].<p>1: <a href="https:&#x2F;&#x2F;en.wikipedia.org&#x2F;wiki&#x2F;Music_information_retrieval" rel="nofollow noreferrer">https:&#x2F;&#x2F;en.wikipedia.org&#x2F;wiki&#x2F;Music_information_retrieval</a>
personjerryalmost 2 years ago
It would be cool if you could link to a particular cut (i.e. a five star 10 minute version I really like)
Workaccount2almost 2 years ago
Perhaps tangential to this project, but I have always wanted something that can detect different instruments&#x2F;sounds and allow me to adjust the volume on them&#x2F;remix them.<p>There are a few songs I love, but some of the best parts seem to be &quot;buried&quot; under other instruments.
评论 #36483487 未加载
EwanGalmost 2 years ago
First thought was that we finally have an answer for Symphony No. 8 (<a href="https:&#x2F;&#x2F;en.wikipedia.org&#x2F;wiki&#x2F;Symphony_No._8_(Schubert)" rel="nofollow noreferrer">https:&#x2F;&#x2F;en.wikipedia.org&#x2F;wiki&#x2F;Symphony_No._8_(Schubert)</a>)
JonathanFlyalmost 2 years ago
What&#x27;s the difference between &quot;Search&quot; and &quot;Edit song&quot;? It seems like Search is just about length, and Edit also considers sections you marked? Or does Edit do the same thing but with many edits, rather than a few?
jonathantf2almost 2 years ago
Seems kinda cool but I&#x27;m stuck on &quot;Loading results... (0%, 0 of 19 done)&quot;
评论 #36486914 未加载
boffinAudioalmost 2 years ago
I like this but there are a lot of studios in the world where I will never be able to access it, so I&#x27;d really like to have a standalone&#x2F;non-web version if its at all possible. I&#x27;d pay for that.
wpietrialmost 2 years ago
My big question: what have you learned while working on this (very cool) project?
评论 #36483556 未加载
SillyUsernamealmost 2 years ago
Please add the option for a longer fade out, plenty of songs finish too early and it would be great if they could just fade out rather than stop abruptly.
smokeydoealmost 2 years ago
This works great with the clips made from MusicGen. The loops are seamless. Thank you for making it free. I would love to know more about how you are analyzing the audio.
KolmogorovCompalmost 2 years ago
Seems really nice, though for some reason after pasting a YouTube link it&#x27;s stuck when reaching 100%, would have liked to give it a try.
评论 #36481990 未加载
评论 #36482177 未加载
EGregalmost 2 years ago
Pretty soon I can see how people will make a content-aware fill for relationships, heartfelt messages etc
netvarunalmost 2 years ago
[offtopic] Could you share what tool you used to generate the demo gif&#x2F;video? Very nicely done!
JohnFenalmost 2 years ago
Interesting. Is there any chance you would release this to run natively rather than as a web service?
评论 #36483302 未加载
yumikaialmost 2 years ago
Super cool, not what you would typically think of when it comes to gen music!
omegaworksalmost 2 years ago
Getting an SSL error - invalid HTTPS certificate. Site is being tagged as malware.
hkabalmost 2 years ago
Cool! It seems to work well with slow songs, the transition is very smooth
yanuzayalmost 2 years ago
It&#x27;s possible to add multiple files and added them at once?
peterdigitalalmost 2 years ago
Would love to sort by most cuts just to see what happens
Pr0ject217almost 2 years ago
This is pretty cool! Will you consider open-sourcing it?
sundaeofshockalmost 2 years ago
I know I’m in the minority here, but I hate it. The artist created created a song of a particular length for a very specific reason. I prefer to listen to a song the way it was meant to be listened too.
评论 #36481702 未加载
评论 #36481934 未加载
评论 #36483158 未加载
评论 #36483587 未加载
评论 #36482535 未加载
评论 #36483678 未加载
评论 #36488437 未加载
71a54xdalmost 2 years ago
Do these get tagged by contentID on Youtube?
xadocalmost 2 years ago
How do you get the audio from Youtube?
评论 #36489881 未加载
IndigoIncognitoalmost 2 years ago
I wish google ranked services like these right at the top when users search for these tools, currently they are filled with ad filled, paywalled, slow &amp; tedious media editing services<p>I wouldn&#x27;t mind giving money to services like this
frankfrank13almost 2 years ago
super fun to use. very useful right away
okinawamistalmost 2 years ago
very cool. is this purely DSP based?
objectspacealmost 2 years ago
Cool!
ljlolelalmost 2 years ago
Cool!