Block - Wavefolder 2.0
Foldover Distortion for West-Coast Synth Sounds
Update 2.0 - After getting complaints about the sound quality on multiple forums, I decided to look around at better algorithms! 4 New Folding algorithms have been added (descriptions below), along with an optional DC-Blocking Filter.
Update 1.2 - Updated fDivMod behavior to include Floor instead of Round. In other words, this is now more "accurate".
Update 1.1 - Fold and Symm Mod Indicators were reversed. Whoops!
The ninth Block in Michael Hetrick's "Euro Reakt" series. This is a classic Wavefolder with strength and symmetry parameters.
Wavefolders are one of the critical building blocks of "West-coast" style synthesizers. In a way, they act like reverse low-pass filters. Instead of taking a complex signal and removing higher frequencies, a wavefolder takes a simple signal (typically a sine wave), and "folds" it to introduce harmonic content. A "Symmetry" control adds a DC offset to the input, leading to even more shapes. An x3/x6 switch changes the strength of the fold.
Modern Eurorack wavefolders include the Intellijel uFold 2, Toppobrillo Triple Wavefolder, WMD/SSF Ultrafold, and more. Many oscillators now include a built-in wavefolder, like the Make Noise DPO.
-Use on simple sounds, like sine or triangle waves. This will not sound good on complex signals, like samples or square waves (in fact, with square waves, you won't hear much at all aside from amplitude changes).
-Animate it! It sounds alright on its own, but hit it with an LFO, another oscillator, or a copy of your amplitude envelope.
-Watch out for DC offset. As long as you're folding, there won't be any. However, if you simply add or subtract symmetry from an unfolded signal, you will be introducing bias. I plan on adding a DC Blocker switch in a future update.
DIST - Wavefolding Distortion. This is the same algorithm from Wavefolder 1.0. Solid digital wavefolding.
SIN - Probably the method I should have originally gone with! Feeds your signal through a Sin function. This method has a linear gain multiplier of your input signal, so it folds evenly across the knob.
SIN2 - Same as SIN, but uses an exponential function to scale your input signal. It increases slowly for part of the Fold knob, and then increases much more rapidly into very aggressive territory.
OD - Idea taken from Madrona Labs' Max Patch prototype of the Aalto Timbre knob (https://www.muffwiggler.com/forum/viewtopic.php?p=2007344#2007344). Same as SIN2 mode, but adds a variable Overdrive post-fold.
OD 2 - Same as above, but also added a second Overdrive post-gain, pre-bias. Good stuff!
Notes for Block Builders:
-This Block contains a macro that I made called fModDiv. This is floating-point Modulus and Division, since the Core Library only has an Integer variation. It's not perfectly accurate (note the transition from float to integer, I couldn't find a "floor" element), but it sounds fine in this context. Feel free to reuse this folder. It's based on a great folding algorithm from http://musicdsp.org/archive.php?classid=4#203