Expand description
A simple noise generator
Fields
seed: u64
rng: Rng
Implementations
sourceimpl Noise
impl Noise
pub fn new(nid: &NodeId, _node_global: &NodeGlobalRef) -> Self
pub const atv: &'static str = "Attenuverter input, to attenuate or invert \ the noise"
pub const offs: &'static str = "Offset input, that is added to the output \ signal after attenuvertig it."
pub const mode: &'static str = "You can switch between **Bipolar** noise, which \ uses the full range from **-1** to **1**, or **Unipolar** noise that \ only uses the range from **0** to **1**."
pub const sig: &'static str = "The noise output."
pub const DESC: &'static str = r#"Noise Oscillator This is a very simple noise oscillator, which can be used for any kind of audio rate noise. And as a source for sample & hold like nodes to generate low frequency modulation. The white noise is uniformly distributed and not normal distributed (which could be a bit more natural in some contexts). See also the `XNoise` node for more noise alternatives. "#
pub const HELP: &'static str = r#"A Simple Noise Oscillator This is a very simple noise oscillator, which can be used for any kind of audio rate noise. And as a source for sample & hold like nodes to generate low frequency modulation. The noise follows a uniform distribution. That means all amplitudes are equally likely to occur. While it might sound similar, white noise is usually following a normal distribution, which makes some amplitudes more likely to occur than others. See also the `XNoise` node for more noise alternatives. The ~~atv~~ attenuverter and ~~offs~~ parameters control the value range of the noise, and the ~~mode~~ allows to switch the oscillator between unipolar and bipolar output. "#
pub fn graph_fun() -> Option<GraphFun>
Trait Implementations
sourceimpl DspNode for Noise
impl DspNode for Noise
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 Noise
impl Send for Noise
impl Sync for Noise
impl Unpin for Noise
impl UnwindSafe for Noise
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