DEV Community

Andrew Luchuk
Andrew Luchuk

Posted on

Designing a Full-Featured Web Synthesizer

Recap

I ended my last post with a working prototype of a Rust and WebAssembly based synthesizer using wasm-pack to build the JavaScript wrappers. Now that the prototype is complete, it's time to start designing and building a more feature-complete synthesizer.

This update will be short compared with previous entries.

Architecture

Here is an overview of the architecture I plan to use for the synthesizer.

Design Diagram

The entry point for the synthesizer will be a wrapper struct that starts the process of fully synthesizing the sound:

The wrapper starts by sending information about the note that should be playing to the oscillator bank which will use that information to generate the initial audio buffers. From there, the audio buffer will be passed along the chain of modifiers to apply filters and other transformations to the audio. Finally, the audio buffer will be returned to the wrapper to be passed back to the best available audio device.

Why this design?

I chose this design to keep the code base as flexible as possible. I eventually want to turn the synthesizer into a plugin for digital audio workstations. To achieve that goal, I want to make the design as generic as possible so that it will be easily compatible with many different plugin formats.

Top comments (0)