pub struct SMap {}
Expand description
A simple amplifier
Implementations
sourceimpl SMap
impl SMap
pub fn new(_nid: &NodeId, _node_global: &NodeGlobalRef) -> Self
pub const inp: &'static str = "Signal input"
pub const min: &'static str = "Minimum of the output signal range."
pub const max: &'static str = "Maximum of the output signal range."
pub const clip: &'static str = "The **Clip** mode allows you to limit the output \ exactly to the ~~min~~/~~max~~ range. If this is **Off**, the output \ may be outside the output signal range."
pub const mode: &'static str = "This mode defines what kind of input signal is expected \ and how it will be mapped to the output ~~min~~/~~max~~ range. \ These modes are available:\n\n\ - **Unipolar** (**0**..**1**)\n\ - **Bipolar** (**-1**..**1**)\n\ - **UniInv** (**1**..**0**)\n\ - **BiInv** (**1**..**-1**)\n"
pub const sig: &'static str = "Mapped signal output"
pub const DESC: &'static str = r#"Simple Range Mapper This node allows to map an unipolar (**0**..**1**) or bipolar signal (**-1**..**1**) to a defined ~~min~~/~~max~~ signal range. See also the 'Map' node for a more sophisticated version of this. "#
pub const HELP: &'static str = r#"Simple Range Mapper This node allows to map an unipolar (**0**..**1**) or bipolar signal (**-1**..**1**) to a defined ~~min~~/~~max~~ signal range. The **Clip** mode allows you to limit the output exactly to the ~~min~~/~~max~~ range. If this is **Off**, the output may be outside the output signal range if the input signal is outside the input signal range. The ~~input~~ mode allows you to choose between 4 options: - **Unipolar** (**0**..**1**) - **Bipolar** (**-1**..**1**) - **UniInv** (**1**..**0**) - **BiInv** (**1**..**-1**) The inverse settings will map **1** to ~~min~~ and **0** to ~~max~~ for **UniInv**. And **1** to ~~min~~ and **-1** to ~~max~~ for **BiInv**. For a more sophisticated version of this node see also `Map`. "#
pub fn graph_fun() -> Option<GraphFun>
Trait Implementations
sourceimpl DspNode for SMap
impl DspNode for SMap
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 SMap
impl Send for SMap
impl Sync for SMap
impl Unpin for SMap
impl UnwindSafe for SMap
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