Difference between revisions of "Audio functions"
From DarkWiki
(→Sin to Saw) |
|||
| Line 1: | Line 1: | ||
| − | ==Sine to Saw== | + | ==Introduction== |
| + | |||
| + | This page lists some simple function generators that produce waves (suitable for digital audio). | ||
| + | |||
| + | ==Saw (elementary)== | ||
| + | |||
| + | <pre> | ||
| + | ((t/pi) % 2-1) | ||
| + | </pre> | ||
| + | |||
| + | ==Sine to Saw (additive)== | ||
Bend a SINE wave into a SAW wave. | Bend a SINE wave into a SAW wave. | ||
Revision as of 15:46, 23 December 2016
Introduction
This page lists some simple function generators that produce waves (suitable for digital audio).
Saw (elementary)
((t/pi) % 2-1)
Sine to Saw (additive)
Bend a SINE wave into a SAW wave.
t = time (positive) d = Proportion of each wave (0-1, where 0 is all SAW and 1 is all SINE).
(1-d)*((t/pi) % 2-1) + (d)*(sin(t))