Wavefolding is a way to get very rich waves from simple ones like triangles or sine wave.
Different kinds of wave folding
For sine waves and triangle waves, the algorithm is pretty simple : if a value is superior to 1, then set it to 1 - value, inverse to it if it's inferior to -1, set it to - 1 - value. It will mainly keep values between -1 and 1, and inverse the curves if above or below these values.
For sawtooth several possibilities are possible, some given here
Notes
Add controls for the quantity of wavefolding used in the generation of the signal. Maybe this could be the clamping values, see more algorithms to have leads.
Purpose
Wavefolding is a way to get very rich waves from simple ones like triangles or sine wave.
Different kinds of wave folding
1 - value
, inverse to it if it's inferior to -1, set it to- 1 - value
. It will mainly keep values between -1 and 1, and inverse the curves if above or below these values.Notes
Sources