pub struct Amp {}
Expand description
A simple amplifier
Implementations
sourceimpl Amp
impl Amp
pub fn new(_nid: &NodeId, _node_global: &NodeGlobalRef) -> Self
pub const inp: &'static str = "Signal input"
pub const att: &'static str = "Attenuate input. Does only attenuate the signal, not amplify it.\n\ Use this for envelope input."
pub const gain: &'static str = "Gain input. This control can actually amplify the signal."
pub const neg_att: &'static str = "If this is set to 'Clip', only the **0.0**-**1.0** input range of the \ ~~att~~ input port is used. Negative values are clipped to **0.0**."
pub const sig: &'static str = "Amplified signal output"
pub const DESC: &'static str = r#"Signal Amplifier This is a simple amplifier to amplify or attenuate a signal. "#
pub const HELP: &'static str = r#"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. "#
pub fn graph_fun() -> Option<GraphFun>
Trait Implementations
sourceimpl DspNode for Amp
impl DspNode for Amp
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 Amp
impl Send for Amp
impl Sync for Amp
impl Unpin for Amp
impl UnwindSafe for Amp
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