Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

It's not the high level aspects, but the low level ones.

Audio DSP is doing a lot of math. CPUs are good at it, sure, but modern synths and effects are legitimately pushing up against how much math a CPU core can evaluate in the few milliseconds you have to render (in the worst case, low latency realtime rendering time is actually dominated not by how much DSP you can do, but how long it takes to move audio from userland to kernel and out to the hardware and back).

Some of the DSP algorithms are really hard to optimize with SIMD, in fact most of the common audio DSP operations can't be trivially converted to SIMD forms (and when they are, they aren't N times faster for N more lanes). Filters are especially tricky because converting the math from one form to another changes the topology of the signal flow, which is only equivalent in the steady-state of non-linear and time-invariant filters. DAWs are using non-linear time variant filters that are being modulated in realtime, so your super fast SIMD optimized biquads might not sound as good as the converted SVF that can't be trivially optimized (there are tricks, but it's a game of tradeoffs).

And there's the other aspect of the scene that there's just a lot of bad or naive code out there. There is a lot of know-how floating around, but a lot of tools are designed by folks without it to begin with. That's a good thing because it makes a lot of interesting and cool tools, but it also means that institutional knowledge is kind of locked away. It doesn't help that some of the largest examples for newcomers (JUCE's DSP module, RAFX/Aspik with the accompanying text), as well as classic (and new!) textbooks teach people to do things in the least performant way possible, and those algorithms make it into production.



Thanks for the informative comment. Are there resources you would recommend for learning more about performant algorithms? At the moment I'm just messing around with JUCE




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: