Skip to main content

AudioNodeType

Enum AudioNodeType 

Source
pub enum AudioNodeType {
Show 34 variants Oscillator { waveform: Waveform, frequency: f32, detune_cents: f32, }, Noise { color: NoiseColor, }, SamplePlayer { clip_id: u32, loop_start: f32, loop_end: f32, loop_mode: LoopMode, }, Wavetable { table_id: u32, morph: f32, frequency: f32, }, KarplusStrong { frequency: f32, decay: f32, brightness: f32, }, FmOscillator { carrier_freq: f32, mod_freq: f32, mod_index: f32, waveform: Waveform, }, Additive { fundamental: f32, partial_gains: Vec<f32>, }, BiquadFilter { filter_type: FilterType, frequency: f32, q: f32, gain_db: f32, }, LadderFilter { cutoff: f32, resonance: f32, drive: f32, }, FormantFilter { vowel_a: f32, vowel_b: f32, blend: f32, }, CombFilter { delay_time: f32, feedback: f32, feedforward: f32, }, Adsr { attack: f32, decay: f32, sustain: f32, release: f32, }, MultiStageEnvelope { breakpoints: Vec<(f32, f32)>, loop_start: Option<usize>, }, Lfo { waveform: Waveform, frequency: f32, amplitude: f32, phase: f32, }, SampleHold { rate: f32, }, Delay { delay_time: f32, feedback: f32, wet: f32, }, Reverb { room_size: f32, damping: f32, wet: f32, }, Chorus { voices: u32, rate: f32, depth: f32, wet: f32, }, Compressor { threshold_db: f32, ratio: f32, attack_ms: f32, release_ms: f32, }, Distortion { mode: DistortionMode, drive: f32, }, Panner { pan: f32, }, Gain { gain_db: f32, }, Limiter { ceiling_db: f32, release_ms: f32, }, StereoWidener { width: f32, }, BitCrusher { bits: u32, downsample: u32, }, PitchShift { semitones: f32, }, RingModulator { carrier_freq: f32, mix: f32, }, AutoWah { sensitivity: f32, speed: f32, min_freq: f32, max_freq: f32, }, Mixer { gains: Vec<f32>, }, Crossfade { blend: f32, }, Constant { value: f32, }, Meter, MathOp { op: AudioMathOp, }, Output { volume: f32, },
}
Expand description

All supported audio node types in the processing graph.

Variants§

§

Oscillator

Basic oscillator (sine, square, saw, etc.).

Fields

§waveform: Waveform
§frequency: f32
§detune_cents: f32
§

Noise

White/pink/brown noise.

Fields

§

SamplePlayer

Audio file sample player.

Fields

§clip_id: u32
§loop_start: f32
§loop_end: f32
§loop_mode: LoopMode
§

Wavetable

Wavetable oscillator with morphing between wavetables.

Fields

§table_id: u32
§morph: f32
§frequency: f32
§

KarplusStrong

Karplus-Strong plucked string.

Fields

§frequency: f32
§decay: f32
§brightness: f32
§

FmOscillator

FM oscillator: carrier + modulator.

Fields

§carrier_freq: f32
§mod_freq: f32
§mod_index: f32
§waveform: Waveform
§

Additive

Additive synth: sum of partials.

Fields

§fundamental: f32
§partial_gains: Vec<f32>
§

BiquadFilter

Biquad filter (LP, HP, BP, notch, shelf, peaking).

Fields

§filter_type: FilterType
§frequency: f32
§gain_db: f32
§

LadderFilter

Moog-style 24dB/oct ladder filter.

Fields

§cutoff: f32
§resonance: f32
§drive: f32
§

FormantFilter

Formant filter (vowel synthesis).

Fields

§vowel_a: f32
§vowel_b: f32
§blend: f32
§

CombFilter

Comb filter.

Fields

§delay_time: f32
§feedback: f32
§feedforward: f32
§

Adsr

ADSR envelope.

Fields

§attack: f32
§decay: f32
§sustain: f32
§release: f32
§

MultiStageEnvelope

Multi-stage envelope (breakpoint sequence).

Fields

§breakpoints: Vec<(f32, f32)>
§loop_start: Option<usize>
§

Lfo

LFO modulator.

Fields

§waveform: Waveform
§frequency: f32
§amplitude: f32
§phase: f32
§

SampleHold

Sample & Hold: samples input at rate, holds until next trigger.

Fields

§rate: f32
§

Delay

Delay line with feedback.

Fields

§delay_time: f32
§feedback: f32
§wet: f32
§

Reverb

Reverb (Schroeder model).

Fields

§room_size: f32
§damping: f32
§wet: f32
§

Chorus

Chorus / flanger.

Fields

§voices: u32
§rate: f32
§depth: f32
§wet: f32
§

Compressor

Dynamic range compressor.

Fields

§threshold_db: f32
§ratio: f32
§attack_ms: f32
§release_ms: f32
§

Distortion

Distortion / waveshaping.

Fields

§drive: f32
§

Panner

Stereo panning.

Fields

§pan: f32
§

Gain

Gain / volume.

Fields

§gain_db: f32
§

Limiter

Hard / soft limiter.

Fields

§ceiling_db: f32
§release_ms: f32
§

StereoWidener

Stereo widener.

Fields

§width: f32
§

BitCrusher

Bit crusher + sample rate reducer.

Fields

§bits: u32
§downsample: u32
§

PitchShift

Pitch shifter (FFT-based approximation).

Fields

§semitones: f32
§

RingModulator

Ring modulator.

Fields

§carrier_freq: f32
§mix: f32
§

AutoWah

Auto-wah (envelope-following filter).

Fields

§sensitivity: f32
§speed: f32
§min_freq: f32
§max_freq: f32
§

Mixer

Mixer: sum multiple inputs with individual gains.

Fields

§gains: Vec<f32>
§

Crossfade

Crossfade between two signals.

Fields

§blend: f32
§

Constant

Constant value source.

Fields

§value: f32
§

Meter

Pass-through monitor (for metering).

§

MathOp

Math operations on audio signals.

Fields

§

Output

Output node — writes to stereo out.

Fields

§volume: f32

Trait Implementations§

Source§

impl Clone for AudioNodeType

Source§

fn clone(&self) -> AudioNodeType

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for AudioNodeType

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> Downcast for T
where T: Any,

Source§

fn into_any(self: Box<T>) -> Box<dyn Any>

Convert Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.
Source§

fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>

Convert Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be further downcast into Rc<ConcreteType> where ConcreteType implements Trait.
Source§

fn as_any(&self) -> &(dyn Any + 'static)

Convert &Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot generate &Any’s vtable from &Trait’s.
Source§

fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)

Convert &mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot generate &mut Any’s vtable from &mut Trait’s.
Source§

impl<T> DowncastSync for T
where T: Any + Send + Sync,

Source§

fn into_any_arc(self: Arc<T>) -> Arc<dyn Any + Sync + Send>

Convert Arc<Trait> (where Trait: Downcast) to Arc<Any>. Arc<Any> can then be further downcast into Arc<ConcreteType> where ConcreteType implements Trait.
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<S> FromSample<S> for S

Source§

fn from_sample_(s: S) -> S

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> ToSample<U> for T
where U: FromSample<T>,

Source§

fn to_sample_(self) -> U

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

impl<S, T> Duplex<S> for T
where T: FromSample<S> + ToSample<S>,