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 ultra complex. However, one popular type of project dealt with music synthesis. Fairly simple circuits could combine to make 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] did 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 the Nyquist theorem and how to keep synthesis data flowing in real time with buffers. However, there are some problems trying to do all this in a cross-browser context. The AudioWorklet
class appears to have widespread support, though, and [Tim] managed to get that working.
If you ever wondered if you could use a formula to compute MIDI tones to frequency instead of a table, the answer is yes. Using emscripten allows easy compilation, but integrating into rollup.js — a JavaScript framework — was a bit of work, and you’ll find the process documented in the post.
If you want to know more about WebAssembly, check out our earlier post. We’ve seen emscripten do interesting things on the Web before, too.
And nobody complained that the complicated projects were too hard. They dud want simoke projects, but they didn’t say “let’s not see complicated projects until some device can be invented that does it all”.
So people wrote about complicated subjects like under under the noise reception and building a converter to receive an early satellite. Or build a computer from discrete components. If you didn’t build it, you coukd still learn from the article.
And yes, you could use 555s in music synthesizers, in the VCO and and envelope generator. And opamps for much of the rest.
“he created Abelton in Web Assembly and C++”
Did you mean “he created synth for Ableton”?
I literally read it to see if my memory was wrong and he actually “created Abelton(sic)”, but no, just a synth. Still super cool, but the write-up creates a let-down. Maybe Al hasn’t heard of Ableton Live.
Maybe Tim created a replica of Ableton products with “Abelton” branding? Like “Sonny” and “Luis Viutton”?
(It’s almost a pet peeve of mine on product names like “VCV” for Rack and “Ableton” for Live.)
Without watching the video I read …building AN Ableton Live synth… Some small words have impact. Just one of many builds.
I use ZynAddSubFX, free and just a synth not a workstation world unto itself.
Oof. Web Assembly is one of those things that is cool but still shouldn’t exist.
Whilst I admire the journey he went through and the way he documented it, it might lead the you to imagine that it is necessary. Most synths are made up of a chain of components to create the sound you want. The built in BaseAudioContext contains a great set of tools (oscillators, filters, timing, shaping) which would allow you to build a quite sophisticated synth with a fraction of the effort.
tl;dw
so… Tim’s tl;dr:
“I built a synthesizer using C++ and WebAssembly. Check out the finished product (browser compatibility table), the source, watch the talk or keep on reading the article!”
https://timdaub.github.io/2020/02/19/wasm-synth/
Speaking of web-based synth development… It took me a while to realize that Faust’s web-based IDE could export compiled code for a number of targets, from ESP32 and Puredata to iOS and Csound.
https://faustide.grame.fr