1. Introduction
Nonlinear waveshaping is a technique used in sound synthesis to generate complex harmonic spectra. It consists of processing a signal with low harmonic content (typically a sinusoid) using a nonlinear mapping function designed to introduce harmonic overtones to the output signal [
1]. The first documented use of waveshaping in the digital domain can be traced back to 1969, when Jean-Claude Risset emulated the sound of a clarinet by distorting a sinusoid with a clipping function [
2]. Waveshaping techniques were extensively researched within the context of computer music in the 1970s, with several authors exploring the use of Chebyshev polynomials in particular, as an accurate and computationally cheap alternative to additive synthesis [
1,
3,
4,
5]. The underlying principles behind waveshaping synthesis are closely related to other well-known synthesis techniques, such as frequency modulation (FM) and phase distortion (PD) synthesis [
6,
7]. These two techniques rely on distorting the frequency and phase, respectively, of sinusoidal oscillators. Recent research on the topic of distortion-based synthesis has explored the use of logic operators in lieu of traditional polynomial waveshapers [
8], and proposed extensions to both FM and PD synthesis [
9,
10].
The use of waveshaping in the analog domain began in the 1950s, when guitar players started deliberately overdriving their tube amplifiers to alter the timbre of their instrument [
11]. In 1961, Gibson released the “Maestro FZ-1 Fuzz Tone”, the first commercially available fuzz distortion pedal, which exploited the saturating behavior of transistors to introduce harmonic distortion [
12]. Most guitar distortion pedals, including popular designs such as the Ibanez Tube Screamer and Electro-Harmonix Big Muff Pi, operate under this same basic principle [
13,
14].
In analog synthesizers, the use of distortion-based methods is one of the cornerstones of “West Coast” synthesis, a paradigm pioneered by California-native Don Buchla during the 1960s. Buchla’s instruments focused on timbre manipulation at oscillator level by employing a variety of techniques such as nonlinear waveshaping, oscillator synchronization and pitch modulation [
15,
16,
17]. This approach to sound synthesis contrasts that of traditional subtractive synthesis, where timbre is typically controlled by filtering harmonically-rich oscillator waveforms, like sawtooth and square waves, using resonant filters [
18]. In recent years, West Coast synthesis has become increasingly popular, with contemporary manufacturers such as Make Noise and Verbos Electronics releasing their own takes on classic Buchla circuits.
This study presents virtual analog (VA) models for two analog synthesizer circuits: the Lockhart wavefolder and the wavefolder used in the middle section of the Serge Wave Multipliers. Wavefolding is a type of nonlinear waveshaping common in West Coast synthesis where portions of the input signal that exceed certain threshold are inverted or “folded back”, hence the name of the effect. The two circuits considered in this study were chosen because of the strong similarities between their general behavior. In a similar way to guitar distortion pedals, both wavefolders exploit the saturating behavior of semiconductor p–n junctions (i.e., transistors/diodes) to implement a folding function.
Wavefolders are amongst the most emblematic building blocks of West Coast synthesis. In spite of that, they have been mostly overlooked by both VA and digital waveshaping research. We have recently begun to fill this research gap in [
17], which presents a VA model of the wavefolder circuit in the seminal Buchla 259 module. Previous work on circuit-based VA modeling has researched the filters found in vintage synthesizers such as those produced by Moog [
19,
20,
21,
22], Electronic Music Studios (EMS) [
23,
24], Korg [
25,
26] and Buchla [
16]. Extensive work has also been done on modeling guitar distortion pedals [
13,
27], tube amplifiers [
11,
28,
29], modulation effects [
30,
31,
32,
33] and the Roland TR-808 drum machine [
34,
35]. Measurement-based VA modeling, commonly known as “black-box modeling”, has also been thoroughly studied within the context of guitar amplifiers and pedals [
36,
37,
38]. This approach is particularly useful when the original circuit schematics are not available.
A major challenge in VA modeling of nonlinear circuits, and digital waveshaping in general, is aliasing suppression. Early research on waveshaping synthesis addressed this issue by using low-order polynomial transfer functions, which not only allowed full parametric control of the produced spectrum but also ensured that the output waveform was bandlimited [
4]. In VA modeling, high oversampling factors are usually necessary to prevent harmonics introduced by nonlinearities from reflecting into the baseband as aliases [
13]. Oversampling increases the computational requirements of the model, by introducing additional filtering stages and scaling the number operations required to compute each output sample. For VA models that require evaluating transcendental functions, as is the case with the proposed Lockhart and Serge models, these added costs could compromise the integration of the system within a larger, real-time computer music system.
A sizable portion of VA research has concentrated on designing efficient algorithms to generate alias-free geometric waveforms like those used in analog subtractive synthesizers, the so-called classic analog waveforms. Well-known techniques include the bandlimited impulse train (BLIT) family of methods, which involves the use of bandlimited basis functions and their integrated forms [
39,
40,
41], and the use of differentiated polynomial waveforms (DPW) [
42,
43,
44]. Moreover, Välimäki and Franck have applied the antialiasing principle behind the DPW algorithm to tackle aliasing in wavetable oscillators [
45]. Recent work on antialiasing techniques has extended the use of the bandlimited ramp (BLAMP) method, originally proposed to antialias triangular oscillators in [
25,
41], to special cases of linear piecewise nonlinearities such as signal rectification, and inverse/hard clipping [
17,
46,
47].
In this work, we propose the use of the antiderivative antialiasing method introduced in [
48,
49]. This approach can be used to reduce the aliasing caused by arbitrary nonlinear waveshaping functions and is applicable to the proposed wavefolder models. In its first-order form, the method can be derived by analytically convolving a linear continuous-time representation of the input signal with a rectangular lowpass kernel [
48]. As shown in this work, the use of the antiderivative method reduces the oversampling requirements of the proposed wavefolder models.
A VA model of the Lockhart wavefolder was originally presented in [
50]. This paper extends that work by introducing a second wavefolding circuit and studying the similarities between both systems. Additionally, we present a different treatment of the required Lambert-W function and an extended evaluation of the proposed antialiasing method in terms of computational costs.
This paper is organized as follows.
Section 2 and
Section 3 describe the model derivation of the Lockhart and Serge wavefolders, respectively. Time-domain simulations of the circuits are also presented in these two sections.
Section 4 deals with two implications of VA wavefolding in the digital domain, namely aliasing suppression and evaluation of the Lambert-W function.
Section 5 presents frequency-domain results of the Lockhart and Serge wavefolders, as well as an evaluation of the proposed antialiasing method in terms of perceived sound quality and computational costs.
Section 6 discusses the practical synthesis usage of both circuits and compares the behavior of the middle Serge Wave Multiplier with a recommended four-stage topology built around the Lockhart wavefolder. Concluding remarks and perspectives appear in
Section 7.
3. The Serge Middle Wave Multiplier
The second circuit considered in this study is the middle section of the Serge Wave Multipliers (often abbreviated as the Serge VCM). The Serge VCM is a synthesizer module designed in 1977 by West Coast designer Serge Tcherepnin, founder of Serge Modular Music Systems. It offered three separate and independent analog sound processors, namely the “top”, “middle” and “bottom” sections. As described in an original 1980 Serge product catalog, “The middle section generates a sweep of the odd harmonics (1, 3, 5, 7, 9, 11 and 13th) when a triangle wave is applied to its input... This module can be used to explore timbral areas beyond the range of ring modulation because there are more varied harmonics than the sum and difference tones” [
62].
The middle Serge VCM is essentially a waveshaping circuit consisting of six identical wavefolding stages arranged in series. An amplifier at the input of the circuit is used to modulate the gain of the input waveform and control the amount of folds introduced [
63]. In this section we focus on the analysis of a single folding stage. The transfer function and frequency-domain behavior of the complete system are presented in
Section 6.
Figure 5 shows the schematic of a single wavefolding stage in the circuit. Component information is given in
Table 3.
To derive the transfer function for the Serge wavefolding circuit, we first assume ideal op-amp behavior and derive an expression for
in terms of
and
, the voltage at the non-inverting input of the amplifier. This gives us:
Since in this case
, we can further simplify this result as:
Next, we derive an expression for
by considering the subcircuit shown in
Figure 6, which is essentially a diode pair similar to those found in guitar distortion circuits [
13,
57,
58].
Applying KVL around the outer loop of the circuit yields the relation
where
I is the current through resistor
. Then, we apply KCL at the output node of the circuit, which gives us
Combining Equation (
32) with Equation (
33) and applying Shockley’s diode equation gives us
As before, we assume the diodes will not conduct simultaneously and arrive at the piecewise relationship
where once again
. To further simplify this expression we neglect the constant factor
that results from its expansion. This gives us:
Next, we rearrange this equation in the Lambert-W form described by Equation (
22) by dividing both sides by
. This yields
which can be solved for
as:
As a final step, we insert Equation (
38) into Equation (
31) to derive a complete expression for the transfer function of a single wavefolding stage in the Serge middle VCM:
Figure 7 shows the transfer function of the circuit, evaluated in MATLAB for values of
between −1.5 and 1.5 V. As before, the model was discretized trivially and is presented against its corresponding SPICE simulation. Parameter values used in this simulation are compiled in
Table 4. The value of parameters
and
for the 1N4148 diode were matched to those of its corresponding SPICE model [
61].
Figure 7b shows the absolute difference between both simulations. These results indicate a good match between the models, as the maximum difference was once again found to be below 1 mV.
Finally,
Figure 8 shows the output of the Serge wavefolder for a 500-Hz sinusoidal input. As expected, the circuit behaves as a wavefolder, folding portions of the input waveform whose absolute value exceeds approximately 0.3 V. This behavior is similar to that of the Lockhart wavefolder (cf.
Figure 4a).
3.1. Model Equivalence
Equation (
39) shares a close resemblance with Equation (
28), the proposed Lockhart wavefolder model. In fact, both expressions have the same form, which consists of the difference between a portion of the input signal and an input-dependent nonlinear element. In the case of the Lockhart wavefolder, when the
Equation (
28) simplifies to
which is remarkably close to Equation (
39), with the only difference being the missing factor of two outside the Lambert-W function. This factor accounts for the difference between physical parameters
and
in each circuit.
Figure 9 shows a comparison of the transfer functions for the Lockhart (
k
) and Serge wavefolders implemented using the parameter values in
Table 2 and
Table 4, respectively. From this figure, we can observe that the only significant difference between both transfer functions is in their sharpness at the folding points. This means the Lockhart wavefolder will introduce sharper folds which will translate into brighter sounds at the output. From this analysis, it is clear that both circuits result in a similar audio effect, even though they are produced using different architectures.
6. Practical Synthesis Usage
In practical sound synthesis applications, a single folding stage is rarely used, as the timbral variety it can produce is quite limited. Most analog designs, for example the Intellijel
Fold and the aforementioned Yusynth Metalizer, employ several wavefolding stages arranged in series. The number of stages varies according to the design, but typically cascades of two to six stages are used. As mentioned in
Section 3, the Serge middle VCM utilizes six identical folding stages.
Figure 16 shows a simplified block diagram representation of the Serge middle VCM based on the original design [
63]. Blocks labeled “SWF” correspond to the proposed Serge wavefolder model. An ad hoc gain factor of four, not present in the original circuit, has been added to compensate for the scaling of the signal introduced by the cascade of wavefolders.
In cascaded wavefolder structures like the one shown in
Figure 16, timbral control can be achieved in two manners. The first is by adjusting the gain of the input waveform (using
in this case). This parameter controls the amount of folds introduced, allowing the overall brightness of the sound to be varied. It can be modulated in real-time to provide articulation to a sound similar to filtering in subtractive synthesis or modulation index in FM synthesis. The second way to control timbre is by adding a dc offset to the input of the wavefolder. This breaks the aforementioned symmetry of the folding function and introduces even harmonics. When modulated by using, for example, a low-frequency oscillator, this parameter provides an effect reminiscent of pulse-width modulation.
Figure 17a shows the transfer function of the Serge middle VCM model for the case of zero dc offset. This plot was generated by defining
to have a constant value of 1 V and sweeping through values of
between
and 8.
Figure 17b shows the output of the Serge middle VCM when driven by a 100-Hz sinusoid with
. For simplicity, in this section, we assume the range of
to be fixed at
V; therefore, all gain modulation is done using
only.
The spectrogram in
Figure 18a shows the effect of increasing
from 0 to 6 for a 150-Hz sinusoidal input. This plot effectively depicts the rich harmonic patterns introduced by the system, which are far more complex than those introduce by traditional waveshaping methods and offer a wide timbral palette for sound synthesis. The fluctuations in energy at the fundamental and first few harmonics indicate the gain values at which each new fold is introduced.
Figure 17b shows the effect of introducing a dc offset at the input of the system for a constant 200-Hz sinusoidal input. This result shows how the use of a dc offset can extend the timbral possibilities of the system even further, by introducing complex patterns consisting of both even and odd harmonics.
Now, although the Lockhart wavefolder was originally designed to operate as a standalone unit, it can be adapted into a series topology with relative ease. Here, we propose using the wavefolding structure shown in
Figure 19 to expand the synthesis capabilities of the Lockhart wavefolder. This design, while not based on any existing circuit, is comparable to that of the Yusynth Metalizer which also utilizes four Lockhart circuits in series [
55]. The following paragraphs describe the sections of this proposed topology. Its frequency-domain behavior is then examined and compared with that of the Serge middle VCM.
The blocks labeled “LWF” in
Figure 19 correspond to the proposed Lockhart wavefolder model. In order for this cascade of Lockhart wavefolders to behave as expected, we need to make sure that the individual folding stages satisfy two criteria. Firstly, the individual folders must provide approximately unity gain for small input values, i.e., below the folding point, and approximately negative unity gain beyond the folding point. Secondly, each stage should start folding at the same point with respect to its individual input.
We can meet these criteria with the proposed Lockhart model by selecting an appropriate value for
and adding static gain stages before and after the folding stages. These gain blocks will also help compensate for the attenuation introduced by the folding operation. First, we choose a value of
for which the Lockhart wavefolder exhibits unity gain for small input values. Having found this resistance value, the pre- and post-gain stages can be determined by measuring the value of
at exactly the folding point. The pre-gain is taken to be approximately this value, and the post-gain is taken to be its inverse. In
Section 3.1, it was shown that for
the Lockhart wavefolder exhibits approximately unity gain below the folding point. This value leads to pre- and post-gains of approximately 1/3 and 3, respectively.
Figure 20a shows the transfer function of the proposed structure measured at the output of the post-gain block. We can observe how the folds introduced by this structure are evenly distributed, unlike those in
Figure 17a. As with the Serge middle VCM, timbral control is achieved by modulating the value of
and by adding a dc offset. The static gain blocks ensure the amplitude of the folded output is bounded between approximately
V for values of
between
and 10 (assuming once more that
has a peak amplitude of 1 V).
Figure 20b shows the time-domain result of processing a 100-Hz sinusoidal input with the proposed structure for
and zero dc offset. In this particular design, additional timbral control can be achieved by modulating the value of
.
Lastly, we add two optional blocks. The first is a
function after the post-gain block to model the behavior of an output buffering stage and to limit the range of the output waveform. This
block can also be antialiased using the antiderivative method described by Equation (
45). The antiderivative of the
function is given by
[
48]. The second optional block is a static one-pole lowpass filter with a cutoff at
kHz whose purpose is to act as a simple tone control. A similar static filtering stage can be found at the output of the Buchla 259 wavefolder [
17]. The s-domain transfer function of this filtering stage is defined as
where
.
Finally, we examine the time-varying behavior of the proposed structure by considering the case of a 150-Hz input sinewave with variable gain
and dc offset.
Figure 21 shows the spectrogram that results from varying
from 0 to 15. As expected, the system introduces complex harmonic patterns similar to those shown in
Figure 18a. Likewise,
Figure 18b demonstrates the effect of varying
from 0 to 10 while simultaneously increasing the level of dc offset from 0 to 5 V. This response is comparable to that of the Serge middle VCM (see
Figure 18b).
7. Conclusions
In this work, we have explored the behavior of two West Coast synthesizer circuits: the Lockhart and Serge wavefolders. By means of circuit analysis, we have derived closed-form expressions for the characteristic transfer functions of both systems. These transfer functions were validated against SPICE simulations implemented using LTspice. The results obtained indicate a good match between the proposed models and their corresponding SPICE simulations. In addition to this, we observed that the behavior of both circuits is very similar, despite the fact that their designs are fundamentally different.
The issue of aliasing caused by wavefolding in the digital domain was treated by incorporating the first-order antiderivative method. Within the context of the Lockhart wavefolder, it was shown that the proposed antialiased model is perceptually free from the effects of aliasing distortion when implemented at a sampling rate of kHz. A thorough evaluation of the proposed Lockhart model indicates that this configuration yields a signal quality equivalent to that of oversampling by a factor of eight (i.e., kHz) at nearly a fourth of the computational expenses. For the case of the Serge wavefolder, the use of the antiderivative method produces an increase in signal quality equivalent to that of oversampling by a factor of two (i.e., kHz).
Furthermore, a recommended synthesis topology built around the Lockhart model consisting of four cascaded wavefolding stages, a saturator and a lowpass filter was presented. This topology was compared against a model of the Serge middle VCM built using six wavefolding stages. These structures illustrate the capabilities of wavefolding in a synthesis environment. However, it should be noted that the discussed topologies are not unique, as they can be modified according to the needs of the particular application. This effectively showcases the flexibility of VA models.