[−][src]Function periodicsynth::synth
pub fn synth<'a, U, F: Fn(f64, &mut U) -> f64>(
func: F,
data: &mut U,
n: usize
) -> Vec<f64>
Synthesize a signal using a defined number of samples and a custom function.
Arguments
-
func
— function to use for callback to generate amplitude values. -
data
— function specific mutable data/ data-structure to pass-in. -
n
— number of samples to generate (controls the time-resolution).