From 8eed5a0661695dc0ab1f5bb84a69460161b88414 Mon Sep 17 00:00:00 2001 From: Weird Constructor Date: Tue, 8 Jun 2021 05:02:16 +0200 Subject: [PATCH] added documentation for FbWr and FbRd --- src/dsp/node_amp.rs | 26 +++++++++++++++--- src/dsp/node_fbwr_fbrd.rs | 55 +++++++++++++++++++++++++++++++++++---- 2 files changed, 73 insertions(+), 8 deletions(-) diff --git a/src/dsp/node_amp.rs b/src/dsp/node_amp.rs index 517bbcd..d0131a7 100644 --- a/src/dsp/node_amp.rs +++ b/src/dsp/node_amp.rs @@ -22,9 +22,6 @@ pub struct Amp { } impl Amp { - pub const DESC : &'static str = r#""#; - pub const HELP : &'static str = r#""#; - pub fn new(_nid: &NodeId) -> Self { Self { } @@ -40,6 +37,29 @@ impl Amp { "Amp neg\nIf this is set to 'Clip', only positive inputs to 'att' are used.\nRange: (0..1)\n"; pub const sig : &'static str = "Amp sig\nAmplified signal output\nRange: (-1..1)\n"; + pub const DESC : &'static str = +r#"Signal Amplifier + +This is a simple amplifier to amplify or attenuate a signal. +See also nodes like 'atv' for an Attenuverter or 'mix' for mixing signals. +"#; + pub const HELP : &'static str = +r#"Amp - Signal Amplifier + +It serves the simple purpose of taking an input signal and attenuate (either +with the 'att' or the 'gain' parameter) or just amplifying it with +the 'gain' parameter. + +You can even use it as simple fixed control signal source if you leave the +'inp' port unconnected and just dial in the desired output value with the +parameter. + +The main idea with the 'gain' and 'att' parameters is, that you can set +the desired amplification with the 'gain' parameter and automate it using +the 'att' parameter. The 'neg' setting then defines what happens with +negative inputs on the 'att' port. +"#; + } impl DspNode for Amp { diff --git a/src/dsp/node_fbwr_fbrd.rs b/src/dsp/node_fbwr_fbrd.rs index d104c69..d666b2d 100644 --- a/src/dsp/node_fbwr_fbrd.rs +++ b/src/dsp/node_fbwr_fbrd.rs @@ -20,8 +20,29 @@ impl FbWr { pub const inp : &'static str = "FbWr inp\nSignal input\nRange: (-1..1)\n"; - pub const DESC : &'static str = r#""#; - pub const HELP : &'static str = r#""#; + pub const DESC : &'static str = +"Feedback Delay Writer\n\n\ +HexoSynth does not allow direct feedback cycles in it's graph.\n\ +To make feedback possible anyways the 'FbWr' and 'FbRd' nodes are provided.\n\ +This node allows you to write a signal into the corresponsing signal delay buffer.\n\ +Use 'FbRd' for using the signal.\n\ +The delay is 3.14ms."; + pub const HELP : &'static str = +r#"Feedback Delay Writer + +HexoSynth does not allow direct feedback cycles in it's graph. +To make feedback possible anyways the 'FbWr' and 'FbRd' nodes are provided. +This node allows you to send a signal into the corresponsing 'FbWr' signal +delay. + +The instance id of the node defines which FbWr and FbRd are connected. +That means 'FbRd 0' is connected to the corresponding 'FbWr 0'. You can use +the signal multiple times by connecting the 'FbRd 0' 'sig' port to multiple +inputs. + +The delay is always 3.14ms, regardless of the sampling rate the synthesizer +is running at. +"#; } impl DspNode for FbWr { @@ -64,12 +85,36 @@ impl FbRd { } pub const atv : &'static str = "FbRd atv\nAttenuate or invert input.\n\ - Use this to adjust the feedback amount.\nRange: (0..1)\n"; + Use this to adjust the feedback amount.\nRange: (-1..1)\n"; pub const sig : &'static str = "FbRd sig\nFeedback signal output.\nRange: (-1..1)\n"; - pub const DESC : &'static str = r#""#; - pub const HELP : &'static str = r#""#; + pub const DESC : &'static str = + "Feedback Delay Reader\n\n\ + HexoSynth does not allow direct feedback cycles in it's graph.\n\ + To make feedback possible anyways the 'FbWr' and 'FbRd' nodes are provided.\n\ + This node allows you to tap into the corresponsing 'FbWr' signal delay \ + for feedback.\n\ + The delay is 3.14ms."; + pub const HELP : &'static str = +r#"Feedback Delay Reader + +HexoSynth does not allow direct feedback cycles in it's graph. +To make feedback possible anyways the 'FbWr' and 'FbRd' nodes are provided. +This node allows you to tap into the corresponsing 'FbWr' signal delay for +feedback. + +The instance id of the node defines which FbWr and FbRd are connected. +That means 'FbRd 0' is connected to the corresponding 'FbWr 0'. You can use +the signal multiple times by connecting the 'FbRd 0' 'sig' port to multiple +inputs. + +The delay is always 3.14ms, regardless of the sampling rate the synthesizer +is running at. + +The 'atv' parameter is a convenience parameter to allow attenuating or +even inverting the signal. +"#; } impl DspNode for FbRd {