Live data from Hacker News

Show HN: Web Audio Spring-Mass Synthesis

blog.cochlea.xyz

1–10 of 20 posts

Show HN: Web Audio Spring-Mass Synthesis

#1
Hi, I'm the author of this little Web Audio toy which does physical modeling synthesis using a simple spring-mass system.

My current area of research is in sparse, event-based encodings of musical audio (https://blog.cochlea.xyz/sparse-interpretable-audio-codec-pa...). I'm very interested in decomposing audio signals into a description of the "system" (e.g., room, instrument, vocal tract, etc.) and a sparse "control signal" which describes how and when energy is injected into that system. This toy was a great way to start learning about physical modeling synthesis, which seems to be the next stop in my research journey. I was also pleasantly surprised at what's possible these days writing custom Audio Worklets!

Show HN: Web Audio Spring-Mass Synthesis
blog.cochlea.xyz

Re: Show HN: Web Audio Spring-Mass Synthesis

#5

Very cool! I've often wondered whether one could procedurally generate sounds of objects interacting in a physics engine? This approach seems like a good place to start.

You (or anyone interested in sound/physics/code) may find this video / series interesting

https://youtu.be/RKT-sKtR970?si=qvTXK6YSMsPaE-GE

Re: Show HN: Web Audio Spring-Mass Synthesis

#6
Interesting, I'm into physical modeling and learning DSP.

I did notice glitching in latest Firefox on a Mac, like I'd get running a DAW with too small a buffer...While the tab was open I got similar crackles and slightly delayed audio stream playing YouTube vids in other tabs.

Re: Show HN: Web Audio Spring-Mass Synthesis

#7
This is cool - there’s some similar work here https://arxiv.org/pdf/2402.01571 which uses spiking neural networks (essentially Dirac pulses). I think the next step for this would be to learn a tonal embedding of the source alongside the event embedding so that you don’t have to rely on physically modelled priors. There’s some interesting work on guitar amp tone modelling that’s doing this already https://zenodo.org/records/14877373

Re: Show HN: Web Audio Spring-Mass Synthesis

#9
post #4

This is fun, but if you reduce the tension and click a lot on it, it gets stuck with almost all the points at the top of the screen except one. Also weirdly in Firefox android it clicks a lot, not on chrome.

Thanks for the bug report, I definitely do see now that things fall apart at certain extreme values. I'll look into it and see if I can fix. My assumption is that it's some sort of numeric overflow or underflow resulting in NaN values, and that I'll probably just need to set the slider boundaries more carefully. Thanks again!

Re: Show HN: Web Audio Spring-Mass Synthesis

#10

Very cool! I've often wondered whether one could procedurally generate sounds of objects interacting in a physics engine? This approach seems like a good place to start.

Same here! Not a physics engine per se, but I've been eyeing Taichi Lang (https://github.com/taichi-dev/taichi) as a potential next stop for running this on a much larger scale.

My assumption has been that any physics engine that does soft-body physics would work in this regard, just at a much higher sampling rate than one would normally use in a gaming scenario. This simulation is actually only running at 22050hz, rather than today's standard 44100hz sampling rate.

Post reply on HN