From 239b9b574a20f99b1a62de8ae362c33ad8e21db0 Mon Sep 17 00:00:00 2001 From: Weird Constructor Date: Tue, 19 Jul 2022 06:07:14 +0200 Subject: [PATCH] More documentation --- CHANGELOG.md | 7 +++++++ README.md | 29 ++++++++++++++++++++++++++++- src/dsp/mod.rs | 21 ++++++++++++++++++++- src/lib.rs | 32 +++++++++++++++++++++++++++++--- 4 files changed, 84 insertions(+), 5 deletions(-) create mode 100644 CHANGELOG.md diff --git a/CHANGELOG.md b/CHANGELOG.md new file mode 100644 index 0000000..8d29614 --- /dev/null +++ b/CHANGELOG.md @@ -0,0 +1,7 @@ +0.2.0 (unreleased) +================== + +* Documentation: Added a guide in the hexodsp::dsp module documentation +about implementing new DSP nodes. +* Bugfix: TriSawLFO (TsLFO) node did output too high values if the `rev` +parameter was changed or modulated at runtime. diff --git a/README.md b/README.md index ee182e9..1e91765 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,5 @@ # hexodsp - ## HexoDSP - Comprehensive DSP graph and synthesis library for developing a modular synthesizer in Rust, such as HexoSynth. This project contains the complete DSP backend of the modular @@ -25,6 +24,34 @@ Here a short list of features: * Extensible framework for quickly developing new nodes at compile time * A comprehensive automated test suite +And following DSP nodes: + +| Category | Name | Function | +|-|-|-| +| IO Util | Out | Audio output (to DAW or Jack) | +| Osc | Sampl | Sample player | +| Osc | Sin | Sine oscillator | +| Osc | BOsc | Basic bandlimited waveform oscillator (waveforms: Sin, Tri, Saw, Pulse/Square) | +| Osc | VOsc | Vector phase shaping oscillator | +| Osc | Noise | Noise oscillator | +| Signal | Amp | Amplifier/Attenuator | +| Signal | SFilter | Simple collection of filters, useable for synthesis | +| Signal | Delay | Single tap signal delay | +| Signal | PVerb | Reverb node, based on Dattorros plate reverb algorithm | +| Signal | AllP | All-Pass filter based on internal delay line feedback | +| Signal | Comb | Comb filter | +| N-\>M | Mix3 | 3 channel mixer | +| N-\>M | Mux9 | 9 channel to 1 output multiplexer/switch | +| Ctrl | SMap | Simple control signal mapper | +| Ctrl | Map | Control signal mapper | +| Ctrl | CQnt | Control signal pitch quantizer | +| Ctrl | Quant | Pitch signal quantizer | +| Mod | TSeq | Tracker/pattern sequencer | +| Mod | Ad | Attack-Decay envelope | +| Mod | TsLFO | Tri/Saw waveform low frequency oscillator (LFO) | +| Mod | RndWk | Random walker, a Sample & Hold noise generator | +| IO Util | FbWr / FbRd | Utility modules for feedback in patches | + ### API Examples #### Documentation diff --git a/src/dsp/mod.rs b/src/dsp/mod.rs index a84d7ed..005f3c7 100644 --- a/src/dsp/mod.rs +++ b/src/dsp/mod.rs @@ -28,7 +28,26 @@ you a GUI for your DSP code for free at the end. Generally I recommend starting out small. Define your new node with minimal parameters until you get the hang of all the things involved to make it compile in the first place. -Here are some hints to get you started: +**Be aware that new DSP nodes need to meet these quality guidelines to be included:** + +- Clean Rust code that I can understand and maintain. +- Does not drag in huge dependency trees. One rationale here is, +that I don't want the sound of a HexoSynth patch to change (significantly) because +some upstream crate decided to change their DSP code. To have optimal +control over this, I would love to have all the DSP code +contained in HexoDSP. Make sure to link the repository the code comes +from though. +- Come with automated smoke tests like all the other nodes, most test +signal min/max/rms over time, as well as the frequency spectrum +where applicable. +- It's parameters have proper denormalized mappings, like `0.5 => 4000 Hz` or `0.3 => 200ms`. +- Provide short descriptions for the node and it's parameters. +- Provide a comprehensive longer help text with (more details further down in this guide): + - What this node is about + - How to use it + - How the parameters work in combination + - Suggestions which combinations with other nodes might be interesting +- If applicable: provide a graph function for visualizing what it does. ### Boilerplate diff --git a/src/lib.rs b/src/lib.rs index 5ea9202..aed0d45 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -2,9 +2,7 @@ // This file is a part of HexoDSP. Released under GPL-3.0-or-later. // See README.md and COPYING for details. -/*! - -# HexoDSP - Comprehensive DSP graph and synthesis library for developing a modular synthesizer in Rust, such as HexoSynth. +/*!# HexoDSP - Comprehensive DSP graph and synthesis library for developing a modular synthesizer in Rust, such as HexoSynth. This project contains the complete DSP backend of the modular synthesizer [HexoSynth](https://github.com/WeirdConstructor/HexoSynth). @@ -28,6 +26,34 @@ Here a short list of features: * Extensible framework for quickly developing new nodes at compile time * A comprehensive automated test suite +And following DSP nodes: + +| Category | Name | Function | +|-|-|-| +| IO Util | Out | Audio output (to DAW or Jack) | +| Osc | Sampl | Sample player | +| Osc | Sin | Sine oscillator | +| Osc | BOsc | Basic bandlimited waveform oscillator (waveforms: Sin, Tri, Saw, Pulse/Square) | +| Osc | VOsc | Vector phase shaping oscillator | +| Osc | Noise | Noise oscillator | +| Signal | Amp | Amplifier/Attenuator | +| Signal | SFilter | Simple collection of filters, useable for synthesis | +| Signal | Delay | Single tap signal delay | +| Signal | PVerb | Reverb node, based on Dattorros plate reverb algorithm | +| Signal | AllP | All-Pass filter based on internal delay line feedback | +| Signal | Comb | Comb filter | +| N-\>M | Mix3 | 3 channel mixer | +| N-\>M | Mux9 | 9 channel to 1 output multiplexer/switch | +| Ctrl | SMap | Simple control signal mapper | +| Ctrl | Map | Control signal mapper | +| Ctrl | CQnt | Control signal pitch quantizer | +| Ctrl | Quant | Pitch signal quantizer | +| Mod | TSeq | Tracker/pattern sequencer | +| Mod | Ad | Attack-Decay envelope | +| Mod | TsLFO | Tri/Saw waveform low frequency oscillator (LFO) | +| Mod | RndWk | Random walker, a Sample & Hold noise generator | +| IO Util | FbWr / FbRd | Utility modules for feedback in patches | + ## API Examples ### Documentation