pub struct Map {}
Expand description
A simple amplifier
Implementations
sourceimpl Map
impl Map
pub fn new(_nid: &NodeId, _node_global: &NodeGlobalRef) -> Self
pub const inp: &'static str = "Signal input"
pub const atv: &'static str = "Input signal attenuverter, to attenuate or invert the input signal."
pub const offs: &'static str = "Input signal offset after ~~atv~~ has been applied."
pub const imin: &'static str = "Minimum of the input signal range, \ it's mapped to the ~~min~~ output signal range."
pub const imax: &'static str = "Maximum of the input signal range, \ it's mapped to the ~~max~~ output signal range."
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 if the input signal is \ outside the input signal range."
pub const sig: &'static str = "Mapped signal output"
pub const DESC: &'static str = r#"Range Mapper This node allows to map an input signal range to a precise output signal range. It's mostly useful to map control signals to modulate inputs. See also the `SMap` node, which is a simplified version of this node. "#
pub const HELP: &'static str = r#"Range Mapper This node allows to map an input signal range to a precise output signal range. It's main use is for precise control of an input of another node. It processes the input signal as follows. First the input is attenuverted using the ~~atv~~ parameter and then the ~~offs~~ offset parameter is added: ```text inp * atv + offs ``` The resulting signal is then processed by the mapping, that maps the input signal range ~~imin~~/~~imax~~ to the ouput signal range ~~min~~/~~max~~. 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. This can also be used to invert the signal. For a more simplified version of this node see also `SMap`. "#
pub fn graph_fun() -> Option<GraphFun>
Trait Implementations
sourceimpl DspNode for Map
impl DspNode for Map
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 Map
impl Send for Map
impl Sync for Map
impl Unpin for Map
impl UnwindSafe for Map
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