DSP in Rust

DSP in Rust

A list of resources related to (audio) DSP.

Are We Audio Yet?


Rust commonly has these "Are We Something Yet?" websites. This is the one for audio. https://wiki.mozilla.org/Areweyet

Contains links of projects related to rust and audio.


https://github.com/rustaudio/areweaudioyet/* HexoDSP (WeirdConstructor) WeirdConstructor has been building a modular synthesizer in Rust centered around a hexagonal grid. This I believe is the underlying DSP library used, called HexoDSP

At this point there seems to be several nodes implemented:


On initial glance, this codebase looks very "rusty" to me, so it's hard to for me to grok currently. It seems that the graph interface and the DSP algorithms are melted together, which obfuscates things.

freeverb-rs (Ian Hobson)

Ian Hobson ported a version of freeverb to Rust:


I mainly spent time looking at the core freeverb implementation, which was just the DSP code with a tick function. Similar to soundpipe/sndkit.

This bit of code was reasonably straight-forward to read, and looked similar to what would happen in equivalent C++ code.

A few noteworthy things here: the code makes use of vectors instead of arrays. There may be some performance issues here. It may also be possible that this is allocated onto the stack rather than the heap, which can eventually be problematic.

Daisy BSP

This shows examples of Rust being run on the Daisy Board, with some DSP code as well:


It seems the only thing implemented at the moment is a table lookup oscillator.

Synthesizer-io (Ralph Linus)



Seems to be an abandoned project for the most part?

Heap allocation via Box

By default, Rust allocates things onto the stack, rather than the Heap. This is a problem for DSP algorithms, especially ones that require large buffers.

Heap allocation can be done usine Box:

https://doc.rust-lang.org/rust-by-example/std/box.html* DASP https://github.com/RustAudio/dasp

AKA Digital Audio Signal Processing in rust. Provides some primitives.



Rust library for chaining together DSP primitives.


Graph-oriented live coding language and audio DSP library written in Rust.


Mostly seems to be oriented towards DSP routing syntax. Seems to have a synthesizer with oscillators, filters, envelopes, etc.

RustyDAW, MeadowLark

An attempt to build a DAW in Rust. So far, there seems to be a lot of planning, very little execution.




Don't have a lot of time to explore this further atm, but this person seems to have a few things including a generica audio DSP library, a compressor, and a VST host:




https://github.com/m-hilgendorf/simple-eq* typebeat A little synthesizer designed to work in a browser.

The effects used are FAUST generated rust code.