1 2 3 4 5 6
#include <math.h> #include <mmband/waves/waveform.h> float saw (float phase) { return -1.0 - (2.0 * fmod(phase / M_PI, 1.0)); }