2 unstable releases
0.2.0 | Jan 27, 2024 |
---|---|
0.1.0 | Dec 20, 2023 |
#471 in Audio
195KB
4K
SLoC
CulSynth Library
This library contains all of the DSP logic used in the CulSynth plugin. See the main repository README for more information.
Features
The library contains both fixed and floating point implementations of various primitives used inside a synthesizer. These include oscillators, a 2-pole state variable filter, envelopes, and LFOs. Additionally, it includes a basic subtractive synth voice logic tying these primitives together and provides the ability to modulate all of the parameters within the voice.
It is #![no_std]
compatible by default and all memory used in th elibrary can
be entirely statically allocated. This results in some design tradeoffs; see
the documentation for details.
lib.rs
:
This crate contains all of the DSP logic for the synthesizer. It is designed
to be no_std
friendly (though it has not yet been build/tested in this config)
and all of the API and algorithms are designed to be implemented using both
floating-point logic and fixed point logic. The fixed point logic additionally
does not use division and minimizes the use of 32 bit widening multiplies
(that is, with a 64 bit result) to the maximum extent possible for speed on
embedded platforms without native hardware support for these primitives.
Most of the relevant code for users can be found in the [devices] module.
This crate uses the (somewhat regrettably hungarian-style) convention of
having all fixed-point structs and traits be the same as their floating-point
counterparts with the FxP suffix to denote fixed point operation. This is
used instead of implementing it as generics implementations on u16
to
preserve information about the location of the decimal place within the type
system, but does require some duplication of code throughout the crate.
Dependencies
~3MB
~54K SLoC