We're Celebrating Our Anniversary with Savings! Use Code THANKS10 For 10% off Non-Sale Items. Shop Now We're Celebrating Our Anniversary with Savings! Use Code THANKS10 For 10% off Non-Sale Items. Shop Now We're Celebrating Our Anniversary with Savings! Use Code THANKS10 For 10% off Non-Sale Items. Shop Now We're Celebrating Our Anniversary with Savings! Use Code THANKS10 For 10% off Non-Sale Items. Shop Now
Learning Synthesis: Waveshapers

Learning Synthesis: Waveshapers

A Guide to Destructive Sound Processing and Waveform Design

Eldar Tagi · 05/01/19

Waveshaping is a term that is often used to describe particular types of distortion effects, yet the actual scope of this technique in the world of sound synthesis far exceeds this common understanding. This episode of Learning Synthesis aims to clarify the concept, as well as add a perspective on the profusion of possible applications of waveshaping.

Transfer Function

Generally speaking, we understand waveshaping as a large spectrum of sound-altering synthesis techniques in which the source waveform undergoes a subtle or significant transformation of timbral and/or dynamic content, while the sound’s pitch/frequency remains unaffected. It is an approach to molding the original sound (often in the form of a basic periodic waveform) into a harmonically enriched, twisted version of itself. The effects can range from utilitarian, practical solutions to certain synthesis-related problems to extremely severe effects that transform sounds beyond recognition.

If you recall our discussion of the inner workings of the oscillators in the Learning Synthesis: Oscillators article, you might remember how multiple waveforms in an oscillator are derived from a single core waveform (usually a sawtooth or a triangle wave). Waveshaping is exactly the process that makes this possible.

To understand how this works, we need to introduce the concept of transfer function—a mathematical function of mapping the input values to output. This is easier to grasp visually by plotting a two-dimensional graph, where the horizontal axis represents an input signal, and the vertical axis is assigned to an output. Thus, if we draw a straight line that starts at the bottom-left corner and rises up diagonally towards the top-right corner, the output signal will be exactly the same as the input. Alternatively, if we were to reverse this line to start at the top-left, and end at the bottom-right corner of the plot, our output signal would be an inverted version of the original.

Applying this principle, we can experiment with altering the shape of the transfer curve, which ideally allows us to convert any shape into any other shape. Smooth edges will result in subtle addition of harmonics to the waveform, while sharp edges will result in more angled waveforms with rich harmonic content. In the above-mentioned case of an analog oscillator, the core sawtooth or triangle wave is passed through a few waveshapers, each one configured to generate a particular waveform. The analog way of implementing a transfer function relies on utilizing such components as diodes, comparators, resistors, and operational amplifiers. In digital systems, lookup tables are often used but more on this later.

It is important to note here that whenever the plotted line has curves or angled edges, the system becomes nonlinear. Nonlinearity itself refers to to a disproportionate relationship between the changes in the system’s input and its output. The effects of nonlinear systems are distinctly chaotic and unpredictable. In such systems, a slight change of the signal’s amplitude at the input results in drastic changes of the output waveform.

It is safe to say that any transfer curve beyond the straight line will always result in some sort of waveshaping or distortion effect. These two terms are often used interchangeably, yet there are some significant underlying differences.

Waveshaping vs Distortion

Essentially, waveshaping includes all processes in which the resulting waveform is vividly different than the signal at the input. The effect can introduce a lot of new harmonics to the original sound, the scope of which can not be entirely predicted by the harmonic structure of the source sound, meaning that partials present in the source waveform have no direct significance to the process. Different waveshaping methods include wavefolding, wavewrapping, clipping, and soft clipping. We’ll cover each one a little later in the article.

Distortion effects are managed by directly affecting and manipulating the individual partials of the initial sound. The timbre is changed via various kinds of alterations performed on the harmonics that are already present in the waveform. Because the harmonics of the original waveform remain present in one form or another in the output signal, the processing method is also referred to as harmonic distortion.

There are three main types of harmonic distortion—odd harmonic distortion, even harmonic distortion, and total harmonic distortion.

Odd harmonic distortion is naturally found in the saturation produced by magnetic tape, an effect caused by the inability of the tape to record sounds exceeding a certain amplitude threshold. The result of this is a sort of symmetrical finishing of the edges of the waveform.

Even harmonic distortion is an asymmetrical processing of sound waves where the top portion of the wave is amplified more the bottom. This effect is often associated with the sound of tubes.

Total harmonic distortion occurs in analog equipment when the system generates both even and odd harmonics as a result of the overall output approaching the limits of the device’s headroom.

Wavefolding

Wavefolding is a very distinct type of waveshaping. It is achieved by using a comparator in a circuit which constantly checks whether the incoming signal goes over the preset threshold level, and if it does the wave’s peak starts mirroring its own image creating a series of folds which contribute to increasingly brighter sounds, drastically richer in harmonics. Often wavefolders feature an additional offset parameter, sometimes labeled symmetry, which helps to adjust whether the negative or positive portion of the wave gets folded more. Another significant parameter to be mentioned is control over the number of folding stages, which directly corresponds to the number of folds in the output waveform, which often translates to some even digit, like 2, 4, or 6. The more folding stages, the more distorted the output signal.

You may also encounter a particular relative to the above-mentioned processing technique— a crossfolder. Unlike traditional wavefolder circuits, these devices have two inputs, particularly designed to blend and alternate between a pair of sound sources prior to folding the peaks of the waveforms.

These days, along with the expansion of the Eurorack universe, wavefolders have become increasingly popular both as standalone modules, like in cases of Intellijel's Bifold, Bastl’s Timber, Antimatter's Crossfold, and as parts of some Buchla-inspired oscillator circuits, namely Make Noise’s DPO, Instruo’s CsL and Tona, Verbos Electronics’s Complex Oscillator, and more. Noise Engineering also seem to implement their version of a wavefolder into most sound modules they produce. This has contributed to the character of what can arguably be considered as some of the most iconic voices in the Eurorack format, like Basimilus Iteritas Alter and Loquelic Iteritas. Modules capable of crossfolding include Antimatter Audio’s Crossfold and Mutable Instruments’ meta-processing beast Warps.

It is worth noting here that even beyond common and uncommon synthesis practices, adding the unique quality of these soundshapers to traditional instruments like guitars can yield surprising and interesting results, not easily achieved otherwise.

Wavewrapping

Wavewrapping is a type of waveshaping effect that is similar to wavefolding, yet the difference lies primarily in the way multiple folds are generated. In the case of wavewrapping, a similar comparator circuit is implemented continuously scanning the incoming signal. Whenever the signal exceeds the defined amplitude value the wave first wraps back to zero before folding further. The sonic effect of wavewrapping is notorious for generating a lot of high-frequency content, so placing a low-pass filter after it is not a bad idea.

Wavewrapping is not incredibly widespread in the world of synthesizers at the moment, but there are a couple of devices that are worth looking into. The elusive Rozzbox synthesizer offers a variety of waveshaping options, and wavewrapping is certainly one of them—although it is named digital overflow in this instrument.

The forthcoming Eurorack module Portal, developed by the LA-based manufacturer Mystic Circuits, is another take on the exploration of this technique.

Learning Synthesis: Waveshapers

Clipping

Clipping is a waveshaping technique that naturally occurs when an analog circuit is overdriven by excessive amplitude of the signal at the input stage. It often has a negative connotation, which is the result of the uniformly unpleasant sonic response when the same process is applied to a digital system. In the realm of analog equipment and synthesis, it is rather a tool that can be utilized creatively.

Essentially, the process translates to the top and bottom of the waveform being completely chopped off whenever the signal exceeds the headroom limit allowed by the circuit. When applied to synthesis, it can serve as a tool for transforming a sine or triangle wave into a pulse signal. This also should make it quite clear that whenever a pulse wave itself is clipped, the noticeable effect on the sound is zero.

Soft-clipping

Soft-clipping is achieved using a very similar method as the above-mentioned clipping with only a minor change—rather than completely squaring out signal peaks, a transfer function with more rounded edges is applied, which results in significantly lower amplitudes of the newly generated harmonics, and effectively a milder overall effect.

Soft-clipping can be a very desirable effect in many applications, as the moderate brightening of the soundwaves can aid to the perception of warmth and liveliness in sounds.

Learning Synthesis: Waveshapers

Serge

Any discussion about waveshapers in synthesizers wouldn’t be complete without mentioning the work of Serge Tcherepnin. Known for adapting ideas from Moog and Buchla into what was lovingly labeled as the People’s Synthesizer, Serge developed a modular format in which individual elements had seemingly simple designs, yet became infinitely reprogrammable via patching. Two particular modules are relevant to our discussion here: Wave Multipliers (VCM), and Triple Waveshaper (TWS).

VCM is comprised of three individual sections. The topmost can act either as a VCA when the switch is set to Lo, or it can produce sounds similar to overdriving a tube amp in the Hi switch setting. The middle section includes a two-channel mixer and a wavefolder configured to add odd harmonics to sounds. Lastly, the bottom section also features three waveshapers known as full-wave rectifiers with configurable controls. It is set to produce even harmonics, and contains two outputs: one that directly reflects all the settings sonically, and an additional “squared out” version of the same signal, not too dissimilar to the effects of pulse width modulation.

TWS is similarly divided into 3 distinct sections of independent waveshaper circuits, although unlike in VCM here all the shapers are identical to one another. Following Serge’s concept of “patch-programmability,” the way that Triple Waveshaper is patched significantly affects the type of sounds the module can produce. Over the years it was also found that it works exceptionally well not only for oscillators but for acoustic sounds as well, aiding in subtlety and warmth.

Many Serge designs are currently available in the Eurorack format through the products of excellent manufacturer Random*Source. R*S is officially licensed by Serge, so his modules keep the authenticity of the classics with occasional improvements.

Wavetable Synthesis

Earlier in the text, it was mentioned that in digital systems lookup tables are often used as a tool for realizing transfer functions. Wavetable synthesis is primarily associated with the method of using lookup tables to generate new periodic waveforms. A lookup table is an array of data with addressable indices describing a particular waveform. So technically, any imaginable (and unimaginable) waveshape can be created using this method. Scanning the table periodically translates to an oscillation. Usually multiple lookup tables are implemented with an option for smooth interpolation between them. This yields an effect of continuously morphing waveforms that is highly desirable for sonic diversity.

With modern computing power, populating lookup tables can be a dynamic process that is as easily achieved as sending a signal into an input of the device, which in turn samples the signal and turns it into a ready-to-use wavetable.

WMD’s Geiger Counter, Industrial Music Electronic’s Piston Honda, Synthesis Technology’s E370, and E352 are excellent examples of the real world implementation of the technique. The former being designed entirely as a processor, and the latter doubling as both a processor and generator module, these two units are capable of processing any incoming signal through a large selection of specially prepared wavetables.

Too Good To Be True?

Despite all the wonders that the waveshaping can do to a signal, the method is not devout of problems. The nature of digital methods, and the overall unpredictability of non-linear systems introduces potential for aliasing.

Before going further with describing how bad aliasing is, and what can be done to allay it, I’d like to point out that mostly everything that has to do with the aesthetic judgment of sound is really a matter of perspective. There are many examples of the effects of aliasing being treated as a feature among electronic instruments designers. These include Dave Smith’s Evolver, Alesis Bitrman, OTO Biscuit, Mutable Instruments Shruthi. Noise Engineering use variable sample rate in many of their oscillator modules, which produces very distinct aliasing effect is one of the definitive elements of the brand’s sonic signature.

Aliasing is a type of digital distortion that occurs when the highest frequencies produced by a digital system exceed the Nyquist frequency. According to the Nyquist theory, the highest accurately representable frequency is half the sample rate, with the Nyquist frequency itself defining this upper limit. The effect of aliasing is harshly digital.

One of the most utilized workarounds to this issue is a low pass filter. Set after a digital waveshaper, it can effectively chop off the problematic frequency range. Another possible solution to this issue is oversampling—literally multiplying the sampling rate by 2 or more in order to increase the Nyquist frequency. The extent of necessary oversampling depends on the highest frequency that the system is capable of generating, as well as the overall amount of harmonic distortion it produces. This method is not ideal, but it does help to alleviate the problem to some extent.

Waveshaper-like effects

If you’ve been following our article series, it shouldn’t come to you as a surprise that just like in any complex system, the idea of “the one and only correct way to do things” doesn’t fly in modular synthesis. There are often multiple roads that can take you to a similar, if not identical destination. Waveshaping is not an exception to this rule.

Stage-addressable sequencer

A peculiar waveshaping method is realized by using a sequencer as an arbitrary transfer function for waveform processing. This technique also dates back to some of the early Buchla designs, particularly 248 Multiple Arbitrary Function Generator (MaRF), a highly reconfigurable module designed for generating complex voltage trajectories, as well as model 245 Sequential Voltage Source.

Verbos Electronics’ Voltage Multistage is an excellent modern day equivalent of a sequencer capable of dynamic stage addressing. To try this technique out, send an oscillator waveform into the analog input on the Voltage Multistage. Then hold the strobe button for a few seconds to activate the mode. Listen to the output from CV A or CV B, and start adjusting the sliders. You should be hearing the dramatic changes in the waveform. What is happening here is that our original waveform is being used to “scan” the sequencer stages back and forth at the specified rate. The stages themselves are used to draw an arbitrary transfer function that defines how the waveform is going to be altered.

Learning Synthesis: Waveshapers

Extreme FM/AM

If we were to bypass the technical aspect of waveshaping, rather focusing on the sonic quality of the effects it produces, some alternative techniques come to mind. Personally, I’ve had some pretty convincing results by exaggerating the techniques of frequency modulation (FM), and amplitude modulation (AM) with a generously over-amplified signal. Try running one of your oscillators’ outputs into a daisy-chain of several VCAs (hint: some multichannel VCAs, like Intellijel Quad VCA actually have their outputs normalled to accommodate for such use). Take the resulting output of the last VCA in a chain and send it into the frequency modulation input of another oscillator. Experiment with level settings. This will take your sound into a very waveshaper-like territory. Also, try a similar technique applied to amplitude modulation, or if possible, the oscillator’s phase parameter: you’ll get a slightly different flavor of the same dish.