[−][src]Struct wavetable::wt_oscillator::WtOsc
Fields
sample_rate: Float
Implementations
impl WtOsc
[src]
pub fn new(sample_rate: Float, wave: WavetableRef) -> WtOsc
[src]
Create a new wavetable oscillator.
\param sample_rate The global sample rate of the synth
pub fn set_wavetable(&mut self, wavetable: WavetableRef)
[src]
Set the wavetable to use for sound generation.
pub fn get_sample(
&mut self,
frequency: Float,
sample_clock: i64,
wave_index: Float,
reset: bool
) -> Float
[src]
&mut self,
frequency: Float,
sample_clock: i64,
wave_index: Float,
reset: bool
) -> Float
Get the next sample for the given frequency and sample clock.
Frequency is given in Hz, sample_clock is the number of ticks of the sample_rate that elapsed since initializing the oscillator. Usually this value would be incremented by 1 every time this function is called.
Auto Trait Implementations
impl RefUnwindSafe for WtOsc
impl Send for WtOsc
impl Sync for WtOsc
impl Unpin for WtOsc
impl UnwindSafe for WtOsc
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,