Struct synth::oscillator::Oscillator [] [src]

pub struct Oscillator<W, A, F, FW> {
    pub waveform: W,
    pub amplitude: A,
    pub frequency: F,
    pub freq_warp: FW,
    pub is_muted: bool,
}

The fundamental component of a synthesizer.

Fields

Waveform used for phase movement.

Envelope for amplitude interpolation.

Envelope for frequency interpolation.

A type used for warping the Oscillator's frequency.

Whether or not the Oscillator is currently muted.

Methods

impl<W, A, F, FW> Oscillator<W, A, F, FW>
[src]

Oscillator constructor.

Waveform builder method.

Amplitude envelope builder method.

Amplitude envelope builder method.

Calculate and return the amplitude at the given ratio.

Calculate and return the phase that should follow some given phase.

Steps forward the given phase and freq_warp_phase and yields the amplitude for the next frame.

Trait Implementations

impl<W: Debug, A: Debug, F: Debug, FW: Debug> Debug for Oscillator<W, A, F, FW>
[src]

Formats the value using the given formatter.

impl<W: Clone, A: Clone, F: Clone, FW: Clone> Clone for Oscillator<W, A, F, FW>
[src]

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

impl<W: PartialEq, A: PartialEq, F: PartialEq, FW: PartialEq> PartialEq for Oscillator<W, A, F, FW>
[src]

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.