Function sample::signal::noise_simplex
[−]
[src]
pub fn noise_simplex<S>(phase: Phase<S>) -> NoiseSimplex<S>
Produces a 1-dimensional simplex noise Signal
.
This is sometimes known as the "drunken walk" or "noise walk".
Example
extern crate sample; use sample::signal; fn main() { // Creates a simplex noise signal oscillating at 440hz sampled 44_100 times per second. let mut signal = signal::rate(44_100.0).const_hz(440.0).noise_simplex(); for n in signal.take(1_000_000) { assert!(-1.0 <= n[0] && n[0] < 1.0); } }