Oscillators, as functions from phase (0.0 to 1.0 over one cycle) to amplitude (-1.0 to 1.0).
TuningFork.Wave.sample(:sine, 0.25)
Summary
Types
@type seed() :: integer()
@type shape() :: :sine | :square | :saw | :triangle
Functions
One sample of white noise, from -1.0 to 1.0, and the seed for the next. The same seed always gives the same sequence.
One sample of shape at phase, with no band limiting.
phase is a position in the cycle from 0.0 to 1.0. The result runs -1.0 to 1.0.
One sample of shape at phase, band limited for a phase step of step per sample.
step is freq / rate. A step of 0.0 gives the raw shape. :sine and :triangle
ignore step.
A seed for noise/1, from any term.