DSP in Rust

DSP in Rust

A list of resources related to (audio) DSP.

Are We Audio Yet?

https://areweaudioyet.com/

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.

Github:

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:

https://github.com/WeirdConstructor/HexoDSP

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:

https://github.com/irh/freeverb-rs

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:

https://github.com/antoinevg/daisy_bsp

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

Synthesizer-io (Ralph Linus)

https://github.com/raphlinus/synthesizer-io

https://raphlinus.github.io/synthesizer/2018/09/19/synth-update.html

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.

DSP-chain

https://github.com/RustAudio/dsp-chain

Rust library for chaining together DSP primitives.

Glicol

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

https://github.com/chaosprint/glicol

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.

https://github.com/RustyDAW/.

https://github.com/MeadowlarkDAW/Meadowlark.

m-hilgendorf

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

https://github.com/m-hilgendorf/audio-graph

https://github.com/m-hilgendorf/rusty-compressor

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.

https://github.com/kofigumbs/typebeat