Audio functions
From DarkWiki
Contents
Introduction
This page lists some simple function generators that produce waves (suitable for digital audio). Each element is typically a float (or double) in the range -1 to 1.
- t Time, a positive number
- d delta, a real number in the range of 0 to 1 (inclusive)
Elementary function generators
Saw
((t/pi) % 2-1)
Additive function generators
Sine to Saw (additive)
Bend a SINE wave into a SAW wave. A delta (d) dictates how much SINE and SAW wave to add together.
(1-d)*((t/pi) % 2-1) + (d)*(sin(t))