Web assembly, musical synthesis and the beauty of mathematics

The electronics hobby has changed a lot since the advent of the microprocessor. Before that – and with the lack of large-scale integrated circuits – projects in magazines tended to be either super simple or super complex. However, one popular type of project involved music synthesis. Pretty simple circuits could combine to form a complex synthesizer, so it was sort of the best of both worlds. Nowadays, you are more likely to tackle a music synthesizer in software like [Tim] done when he created Abelton in Web Assembly and C ++. Along the way, he learned a lot about the relationship between math and music.

[Tim] covers what he learned about Nyquist’s theorem and how to circulate summary data in real time with buffers. However, there are a few issues when trying to do all of this in a cross-browser context. the AudioWorklet the class seems to have broad support, however, and [Tim] managed to get this to work.

If you’ve ever wondered if you can use a formula to calculate MIDI tones in frequency instead of a table, the answer is yes. Using emscripten allows for easy compilation, but the integration into rollup.js – a JavaScript framework – was a bit of work, and you’ll find the process documented in the article.

If you want to learn more about WebAssembly, check out our previous article. We’ve also seen emscripten do some great things on the web.

Source link

About Frank Anderson

Check Also

Businesses brace for big crowds ahead of Carolina Country Music Fest

MYRTLE BEACH, SC (WBTW) – Local businesses are gearing up for the big crowds at …

Leave a Reply

Your email address will not be published. Required fields are marked *