added documentation for FbWr and FbRd

This commit is contained in:
Weird Constructor 2021-06-08 05:02:16 +02:00
parent 718f46154f
commit 8eed5a0661
2 changed files with 73 additions and 8 deletions

View file

@ -22,9 +22,6 @@ pub struct Amp {
} }
impl Amp { impl Amp {
pub const DESC : &'static str = r#""#;
pub const HELP : &'static str = r#""#;
pub fn new(_nid: &NodeId) -> Self { pub fn new(_nid: &NodeId) -> Self {
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"; "Amp neg\nIf this is set to 'Clip', only positive inputs to 'att' are used.\nRange: (0..1)\n";
pub const sig : &'static str = pub const sig : &'static str =
"Amp sig\nAmplified signal output\nRange: (-1..1)\n"; "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 { impl DspNode for Amp {

View file

@ -20,8 +20,29 @@ impl FbWr {
pub const inp : &'static str = pub const inp : &'static str =
"FbWr inp\nSignal input\nRange: (-1..1)\n"; "FbWr inp\nSignal input\nRange: (-1..1)\n";
pub const DESC : &'static str = r#""#; pub const DESC : &'static str =
pub const HELP : &'static str = r#""#; "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 { impl DspNode for FbWr {
@ -64,12 +85,36 @@ impl FbRd {
} }
pub const atv : &'static str = pub const atv : &'static str =
"FbRd atv\nAttenuate or invert input.\n\ "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 = pub const sig : &'static str =
"FbRd sig\nFeedback signal output.\nRange: (-1..1)\n"; "FbRd sig\nFeedback signal output.\nRange: (-1..1)\n";
pub const DESC : &'static str = r#""#; pub const DESC : &'static str =
pub const HELP : &'static str = r#""#; "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 { impl DspNode for FbRd {