pub struct Node<F> { /* private fields */ }
Expand description
An audio node: a source, a sink, a filter, an effect, etc.
Implementations§
Source§impl<F> Node<F>
impl<F> Node<F>
Sourcepub fn add_sine(&self, f: Freq, phase: f32) -> Node<Sine>
pub fn add_sine(&self, f: Freq, phase: f32) -> Node<Sine>
Add sine wave oscillator source (∿
).
Examples found in repository?
More examples
Sourcepub fn add_square(&self, f: Freq, phase: f32) -> Node<Square>
pub fn add_square(&self, f: Freq, phase: f32) -> Node<Square>
Add square wave oscillator source (⎍
).
Sourcepub fn add_sawtooth(&self, f: Freq, phase: f32) -> Node<Sawtooth>
pub fn add_sawtooth(&self, f: Freq, phase: f32) -> Node<Sawtooth>
Add sawtooth wave oscillator source (╱│
).
Sourcepub fn add_triangle(&self, f: Freq, phase: f32) -> Node<Triangle>
pub fn add_triangle(&self, f: Freq, phase: f32) -> Node<Triangle>
Add triangle wave oscillator source (╱╲
).
Sourcepub fn add_noise(&self, seed: i32) -> Node<Noise>
pub fn add_noise(&self, seed: i32) -> Node<Noise>
Add white noise source (amplitude on each tick is random).
Sourcepub fn add_all_for_one(&self) -> Node<AllForOne>
pub fn add_all_for_one(&self) -> Node<AllForOne>
Add mixer node that stops if any of the sources stops.
Sourcepub fn add_concat(&self) -> Node<Concat>
pub fn add_concat(&self) -> Node<Concat>
Add a node that plays the inputs one after the other, in the order as they added.
Sourcepub fn add_pan(&self, lvl: f32) -> Node<Pan>
pub fn add_pan(&self, lvl: f32) -> Node<Pan>
Add node panning the audio to the left (0.), right (1.), or something in between.
Sourcepub fn add_track_position(&self) -> Node<TrackPosition>
pub fn add_track_position(&self) -> Node<TrackPosition>
Add node tracking the elapsed playback time.
Sourcepub fn add_take_left(&self) -> Node<TakeLeft>
pub fn add_take_left(&self) -> Node<TakeLeft>
Add node converting stereo to mono by taking the left channel.
Sourcepub fn add_take_right(&self) -> Node<TakeRight>
pub fn add_take_right(&self) -> Node<TakeRight>
Add node converting stereo to mono by taking the right channel.
Sourcepub fn add_swap(&self) -> Node<Swap>
pub fn add_swap(&self) -> Node<Swap>
Add node swapping left and right channels of the stereo input.
Sourcepub fn add_clip(&self, low: f32, high: f32) -> Node<Clip>
pub fn add_clip(&self, low: f32, high: f32) -> Node<Clip>
Add node clamping the input amplitude. Can be used for hard distortion.
Source§impl Node<LowPass>
impl Node<LowPass>
Sourcepub fn modulate_freq<M: Modulator>(&self, m: M)
pub fn modulate_freq<M: Modulator>(&self, m: M)
Modulate the cut-off frequency.
Source§impl Node<HighPass>
impl Node<HighPass>
Sourcepub fn modulate_freq<M: Modulator>(&self, m: M)
pub fn modulate_freq<M: Modulator>(&self, m: M)
Modulate the cut-off frequency.
Source§impl Node<Clip>
impl Node<Clip>
Sourcepub fn modulate_both<M: Modulator>(&self, m: M)
pub fn modulate_both<M: Modulator>(&self, m: M)
Modulate the low cut amplitude and adjust the high amplitude to keep the gap.
In other words, the difference between low and high cut points will stay the same.
Sourcepub fn modulate_low<M: Modulator>(&self, m: M)
pub fn modulate_low<M: Modulator>(&self, m: M)
Modulate the low cut amplitude.
Sourcepub fn modulate_high<M: Modulator>(&self, m: M)
pub fn modulate_high<M: Modulator>(&self, m: M)
Modulate the high cut amplitude.