Expand description
A simple amplifier
Fields
inv_sample_rate: f32
phase: f32
Implementations
sourceimpl FormFM
impl FormFM
pub fn new(_nid: &NodeId, _node_global: &NodeGlobalRef) -> Self
pub const freq: &'static str = "Base frequency to oscillate at\n"
pub const det: &'static str = "Detune the oscillator in semitones and cents.\n"
pub const form: &'static str = "Frequency of the formant\nThis affects how much lower or higher tones the sound has."
pub const side: &'static str = "Which side the peak of the wave is. Values more towards **0.0** or **1.0** make the base frequency more pronounced"
pub const peak: &'static str = "How high the peak amplitude is. Lower values make the effect more pronounced"
pub const sig: &'static str = "Generated formant signal"
pub const DESC: &'static str = r#"Formant oscillator Simple formant oscillator that generates a formant like sound. Loosely based on the ModFM synthesis method. "#
pub const HELP: &'static str = r#"Direct formant synthesizer This is a formant synthesizer that directly generates the audio of a single formant. This can be seen as passing a saw wave with frequency ~~freq~~ into a bandpass filter with the cutoff at ~~form~~ ~~freq~~ controls the base frequency of the formant. ~~form~~ controls the formant frequency. Lower values give more bass to the sound, and higher values give the high frequencies more sound. ~~side~~ controls where the peak of the carrier wave is, and in turn controls the bandwidth of the effect. The more towards **0.0** or **1.0**, the more the formant is audible. ~~peak~~ controls how high the peak of the carrier wave is. This also controls the bandwidth of the effect, where lower means a higher bandwidth, and thus more audible formant. "#
pub fn graph_fun() -> Option<GraphFun>
Trait Implementations
sourceimpl DspNode for FormFM
impl DspNode for FormFM
sourcefn set_sample_rate(&mut self, srate: f32)
fn set_sample_rate(&mut self, srate: f32)
Updates the sample rate for the node.
sourcefn process(
&mut self,
ctx: &mut dyn NodeAudioContext,
_ectx: &mut NodeExecContext,
_nctx: &NodeContext<'_>,
_atoms: &[SAtom],
inputs: &[ProcBuf],
outputs: &mut [ProcBuf],
_ctx_vals: LedPhaseVals<'_>
)
fn process(
&mut self,
ctx: &mut dyn NodeAudioContext,
_ectx: &mut NodeExecContext,
_nctx: &NodeContext<'_>,
_atoms: &[SAtom],
inputs: &[ProcBuf],
outputs: &mut [ProcBuf],
_ctx_vals: LedPhaseVals<'_>
)
The code DSP function. Read more
Auto Trait Implementations
impl RefUnwindSafe for FormFM
impl Send for FormFM
impl Sync for FormFM
impl Unpin for FormFM
impl UnwindSafe for FormFM
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more