Add popup help to elements
This commit is contained in:
@@ -25,6 +25,16 @@ impl AudioOut {
|
||||
params: &[
|
||||
ParamDescriptor { id: "level", label: "Level", min: 0.0, max: 1.0, default: 0.8, unit: "", labels: &[] },
|
||||
],
|
||||
description: "\
|
||||
## Output — Audio Sink
|
||||
|
||||
The final destination in the signal chain, representing the speakers or DAC.
|
||||
|
||||
Connect the last audio module's output jack to **In**. The green **● LIVE** badge lights up when a cable is connected and audio is flowing.
|
||||
|
||||
**Level** controls the master output volume.
|
||||
|
||||
> The oscilloscope and spectrum analyser always reflect what arrives at this node.",
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
@@ -71,4 +71,6 @@ pub struct ComponentDescriptor {
|
||||
pub jacks: &'static [JackDescriptor],
|
||||
/// Ordered list of tunable parameters.
|
||||
pub params: &'static [ParamDescriptor],
|
||||
/// Markdown-formatted help text shown in the patch-bay tooltip.
|
||||
pub description: &'static str,
|
||||
}
|
||||
|
||||
@@ -39,6 +39,19 @@ impl Adsr {
|
||||
ParamDescriptor { id: "sustain", label: "Sustain", min: 0.0, max: 1.0, default: 0.7, unit: "", labels: &[] },
|
||||
ParamDescriptor { id: "release_s", label: "Release", min: 0.001, max: 8.0, default: 0.3, unit: "s", labels: &[] },
|
||||
],
|
||||
description: "\
|
||||
## ADSR — Envelope Generator
|
||||
|
||||
Produces a CV signal (0–1) that shapes amplitude over time in four stages:
|
||||
|
||||
- **Attack** — time to rise from 0 to peak after gate opens
|
||||
- **Decay** — time to fall from peak to sustain level
|
||||
- **Sustain** — level held while gate remains open
|
||||
- **Release** — time to fall back to 0 after gate closes
|
||||
|
||||
**This module outputs CV, not audio.** Connect **Env** to a VCA `cv_gain` jack to shape volume, or to `cv_cutoff_hz` on the Filter for a filter envelope.
|
||||
|
||||
> **Tip:** VCO Out → VCA In, Keyboard Gate → ADSR Gate, ADSR Env → VCA cv_gain, VCA Out → Output In",
|
||||
};
|
||||
|
||||
pub fn gate_on(&mut self) { self.stage = Stage::Attack; }
|
||||
|
||||
@@ -42,6 +42,16 @@ impl Svf {
|
||||
ParamDescriptor { id: "cutoff_hz", label: "Cutoff", min: 20.0, max: 20_000.0, default: 2_000.0, unit: "Hz", labels: &[] },
|
||||
ParamDescriptor { id: "resonance", label: "Res", min: 0.0, max: 1.0, default: 0.5, unit: "", labels: &[] },
|
||||
],
|
||||
description: "\
|
||||
## Filter (SVF) — State-Variable Filter
|
||||
|
||||
2-pole filter that shapes the tonal colour of an audio signal.
|
||||
|
||||
**In** accepts audio; **Out** emits the filtered result.
|
||||
|
||||
**Cutoff** sets the corner frequency — frequencies above this point are attenuated (in low-pass mode). **Res** (resonance) narrows the peak; at 1.0 the filter self-oscillates.
|
||||
|
||||
Connect an LFO to `cv_cutoff_hz` for a sweeping wah effect, or an ADSR for a filter envelope.",
|
||||
};
|
||||
|
||||
#[inline]
|
||||
|
||||
@@ -31,6 +31,18 @@ impl Lfo {
|
||||
ParamDescriptor { id: "depth", label: "Depth", min: 0.0, max: 1.0, default: 0.5, unit: "", labels: &[] },
|
||||
ParamDescriptor { id: "waveform", label: "Wave", min: 0.0, max: 4.0, default: 0.0, unit: "", labels: &["Sine", "Saw", "Sqr", "Tri", "Pls"] },
|
||||
],
|
||||
description: "\
|
||||
## LFO — Low-Frequency Oscillator
|
||||
|
||||
Like a VCO but running at sub-audio speeds (0.01–20 Hz). Outputs a CV signal (−1 to +1) for modulation.
|
||||
|
||||
**Rate** controls oscillation speed. **Depth** scales the output amplitude (0 = no modulation, 1 = full swing).
|
||||
|
||||
**Typical uses:**
|
||||
|
||||
- LFO Out → VCO `cv_freq_hz` for **vibrato** (pitch wobble)
|
||||
- LFO Out → Filter `cv_cutoff_hz` for a **wah/sweep** effect
|
||||
- LFO Out → VCA `cv_gain` for **tremolo** (volume wobble)",
|
||||
};
|
||||
|
||||
#[inline]
|
||||
|
||||
@@ -37,6 +37,16 @@ impl Vco {
|
||||
ParamDescriptor { id: "freq_hz", label: "Freq", min: 20.0, max: 20_000.0, default: 440.0, unit: "Hz", labels: &[] },
|
||||
ParamDescriptor { id: "waveform", label: "Wave", min: 0.0, max: 4.0, default: 1.0, unit: "", labels: &["Sine", "Saw", "Sqr", "Tri", "Pls"] },
|
||||
],
|
||||
description: "\
|
||||
## VCO — Voltage-Controlled Oscillator
|
||||
|
||||
Generates a periodic audio-rate waveform at the set frequency.
|
||||
|
||||
**Waveforms:** Sine · Saw · Square · Triangle · Pulse
|
||||
|
||||
**Freq** sets the base pitch. Connect an LFO or keyboard CV to `cv_freq_hz` for 1 V/oct pitch modulation (0 V = 440 Hz, +1 V = 880 Hz).
|
||||
|
||||
**Typical chain:** VCO Out → Filter In → VCA In → Output In",
|
||||
};
|
||||
|
||||
#[inline]
|
||||
|
||||
@@ -22,6 +22,16 @@ impl Vca {
|
||||
params: &[
|
||||
ParamDescriptor { id: "gain", label: "Gain", min: 0.0, max: 1.0, default: 1.0, unit: "", labels: &[] },
|
||||
],
|
||||
description: "\
|
||||
## VCA — Voltage-Controlled Amplifier
|
||||
|
||||
Scales the audio level of a signal. Audio enters on **In** and exits at a controlled volume on **Out**.
|
||||
|
||||
**Gain** knob sets the base level (0 = silence, 1 = unity gain).
|
||||
|
||||
Connect an ADSR **Env** output to the `cv_gain` jack to apply an amplitude envelope — the CV value multiplies with the knob gain each sample.
|
||||
|
||||
**Typical chain:** VCO Out → VCA In → Output In, with ADSR Env → VCA cv_gain",
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user