A periodic waveform generator which calls arbitrary functions for generating waveforms with an arbitrary samplerate which is translated into time-position between (0..1) and provided to the generator.
Some functions are provided by default (eg. sine, cosine, square, null). To implement a one follow this kind of syntax:
; // v you can use your own type.
Using a default function packed (sin):
use ;
Using our own and handcrafted function:
use synth;
; // you can use any type at here.
Motivation
The WebAudio API's OscillatorNode
generates periodic waveforms with different functions. Something
like that doesn't exist so this is created to do just
that or even further to that by allowing end-users to
define custom functions to generate waveforms.