Last active
May 10, 2019 19:43
-
-
Save devin-dominguez/dca05cbf8b1afb516ce190be83b0a43c to your computer and use it in GitHub Desktop.
easy phase distortion oscillator
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
phasor -> variable angle unipolar triangle function -> * 0.5 -> cosine lookup | |
adjust the angle on the triangle to morph between sine and pseudo-saw | |
can offset saw phase and subtract to get a psuedo-square (as per ususal) | |
triangle function: | |
angle range 0 to 1 with 0.5 being symetrical | |
if (phase <= angle) phase / angle | |
if (phase > angle) phase - 1 / angle -1 | |
by scaling by 0.5 we get the first half of the cosine, and then that same first half but in reverse (which is == to the 2nd half) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment