Function audio_visualizer::util::sine::sine_wave [−][src]
pub fn sine_wave(frequency: f64) -> Box<dyn Fn(f64) -> f64>
Expand description
Creates a sine (sinus) wave function for a given frequency.
Don’t forget to scale up the value to the audio resolution.
So far, amplitude is in interval [-1; 1]
. The parameter
of the returned function is the point in time in seconds.
frequency
is in Hertz