You are on page 1of 20

David T. Yeh,* Jonathan S.

Abel,* Andrei
Vladimirescu, and Julius O. Smith*
Numerical Methods for
*Center for Computer Research in Music and
Acoustics (CCRMA)
Simulation of Guitar
Stanford University
Stanford, California 94305-4088 USA
Distortion Circuits
ccrma.stanford.edu
{dtyeh, abel, jos}@ccrma.stanford.edu

Berkeley Wireless Research Center (BWRC)


University of California, Berkeley
Berkeley, California 94704-1302 USA
andrei@bwrc.eecs.berkeley.edu

Electric guitarists prefer analog distortion effects are accurately described in the audio frequency
over many digital implementations. This article band by nonlinear ODEs. A circuit simulator such
suggests reasons for this and proposes that detailed as SPICE (Simulation Program with Integrated
study of the electrical physics of guitar distortion Circuit Emphasis; see, e.g., Vladimirescu 1994)
circuits provides insight to design more accurate solves these systems of nonlinear ODEs to accu-
emulations. This work introduces real-time emula- rately predict their behaviors. However, SPICE
tion applied to guitar audio amplifiers in the form of simulation is computationally involved, so real-
a tutorial about relevant numerical methods and a time effects processing requires a simplified ap-
case study. The results here make a compelling case proach. Often, the circuits can be approximately
for simulating musical electronics using numerical partitioned into stages, neglecting loading effects
methods in real time. where possible (Yeh, Abel, and Smith 2007a), or
Analog guitar distortion effect devices known as even incorporating the loading effects as an equiva-
solid-state distortion boxes commonly include a lent circuit. Linear stages can be efficiently imple-
diode clipper circuit with an embedded low-pass mented by infinite impulse response (IIR) digital
filter. These distortion-effect devices can be mod- filters, although the remaining nonlinear ODEs
eled and accurately simulated as Ordinary Differen- may need to be solved by a numerical method or
tial Equations (ODEs). A survey and a comparison other approximation, usually employing a static
of the basic numerical integration methods are nonlinearity.
presented as they apply to simulating circuits for The diode-clipper circuit with an embedded
audio processing, with the widely used diode clipper low-pass filter forms the basis of both diode clipping
presented as an example. distortion and overdrive or tube screamer
A dedicated simulator for the diode clipper has effects pedals (Yeh, Abel, and Smith 2007a), and it is
been developed to compare several numerical found in many other products that implement
integration methods and their real-time feasibility. guitar distortion using solid-state circuitry. This
We found that implicit or semi-implicit solvers are popular circuit block is taken as a case example to
preferred, although the prefilter / static nonlinearity evaluate the performance and feasibility of using
approximation comes surprisingly close to the numerical integration methods to solve nonlinear
actual solution. ODEs in real time for an audio system and how it
compares to a static nonlinearity approximation.
(The terms diode clipper and diode limiter refer
Background to the same circuit and are used interchangeably in
this article.)
Analog guitar effects, whether based upon vacuum The Boss DS-1 circuit (Roland Corporation 1980)
tubes or solid-state devices, consist of circuits that is a distortion pedal, and its schematic can be
approximately divided into blocks as shown in
Computer Music Journal, 32:2, pp. 2342, Summer 2008 Figure 1. In this article, we focus on the saturating
2008 Massachusetts Institute of Technology. nonlinearity block, which is the diode clipper. We

Yeh et al. 23
Figure 1. Partitioning Figure 2. RC low-pass filter Figure 3. Linearized
scheme and block diagram with diode limiter. diode-clipper circuit.
for the Boss DS-1 circuit.

also developed a real-time audio plug-in based upon Figure 2


this model of the DS-1, which includes a custom
solver for the ODE of the diode clipper. More
detailed models should also include the nonlineari-
ties of the buffer stages and the gain / filter block.
The rest of the article is organized as follows.
First, we introduce the diode clipper, which will
motivate the second section, a review of methods to
emulate analog distortion digitally. Next, the basic
numerical-integration methods will be surveyed,
followed by a section presenting the methods in
detail. Then, the results of the various methods
applied to the diode clipper are compared. Finally,
the last sections interpret the results and present
Figure 3
conclusions.

tive, which simplifies convergence when solving


Diode Clipper Equation the circuit equations using Newtons method.
The nonlinear ODE of the diode can be derived
The diode clipper in guitar circuits is typically a from Kirchhoffs laws (Yeh, Abel, and Smith 2007a):
first-order resistor-capacitor (RC) low-pass filter with
dVo Vi(t) Vo I
a diode limiter across the capacitor (see Figure 2). = 2 s sinh(Vo Vt) (2)
The diode clipper limits the voltage excursion dt RC C
across the capacitor to about a diode drop (the diode where Vi and Vo are the input and output signals,
turn-on voltage, approximately 0.7 V) in either respectively. For this work, the parameters are R =
direction about signal ground. 2.2 k, C = 10 nF, Is = 2.52 nA, and Vt = 45.3 mV.
A common first-order approximation of the diode The linearized model (see Figure 3) of this circuit
is a piecewise linear function, which is equiva- suggests that this nonlinearity has memory, because
lently a switch model. A higher-order model is it yields a low-pass filter whose pole location
chosen here: depends on the state of the circuit. The results in
Mller, Gromowski, and Zlzer (2002) also suggest
Id = I s ( exp(V / Vt 1)) (1)
that circuit nonlinearities have memory. Even with
where Id and V are the diode current and voltage, simulated data, which should have negligible mea-
respectively. The reverse saturation current Is, and surement noise, the technique for extracting the
thermal voltage Vt of the device are model param- nonlinear transfer curves of a tube amplifier pro-
eters that can be extracted from measurement. Real duces a noisy result owing to hysteresis.
diodes are more complicated (Muller and Kamins In general, although the basic nonlinearities of
2002), but this model is accurate enough for the these devices are quasi-static for audio frequencies,
range of values used in the clipper circuit. This placing the statically nonlinear device into a circuit
model also possesses continuity in its first deriva- with reactive devices will produce a nonlinear ordi-

24 Computer Music Journal


nary differential equation. This is especially true for assumed to be static (i.e., memoryless) for imple-
voltage-mode circuits, where voltage is the signal mentation efficiency. Although this assumption is
variable, as in many amplifier circuits. The non- false for most circuits, the approach often yields a
linearity must be solved against the constraints perceptually satisfactory approximation as indi-
imposed by the circuit, always yielding an implicit cated by the market size for commercially available
expression for the transfer curve mapping input amplifier-modeling products.
voltage to output voltage, as demonstrated previ- An intuitive method to approximate the behavior
ously. Reactive components apply complex con- of a prototype distortion circuit involves using sev-
straints, yielding a nonlinearity with embedded eral nonlinearities and filters to imitate the signal
memory, or equivalently, a filter with an embedded flow of the prototype (Kuroki et al. 1998; Mller,
nonlinearity, as noted by Huovilainen (2004). Gromowski, and Zlzer 2002; Zlzer 2002; Yeh and
Smith 2006; Goetze 2007; Yeh, Abel, and Smith
2007a). Static nonlinearities are often approximated
Digital Implementations of Guitar Distortion from the dynamic nonlinearities in the circuit by
measuring input-output DC transfer characteristics
The simplest digital implementations of guitar of the nonlinear stages (Mller, Gromowski, and
distortion use a static nonlinearity, borrowing from Zlzer 2002), or even the entire circuit.
classical waveshaping synthesis techniques (Arfib Various approaches have also been attempted to
1979; Le Brun 1979). The static nonlinearity is usu- incorporate memory into the nonlinearity. A
ally a lookup table, or a polynomial (e.g., spline fit) sophisticated nonlinear system identification
of an arbitrary function that saturates and clips. In approach using a dynamic nonlinearityone that
the waveshaping technique, Chebyshev polynomi- depends on system statehas been patented
als are used as a basis function for this nonlinearity, (Gustafsson et al. 2004). Another possibility is to
because they allow the control of individual har- use dynamic convolution, patented by Kemp (2006),
monics when the input signal is a full-amplitude approximating the nonlinear dynamic system by
sinusoid (Le Brun 1979). However, Chebyshev treating each sample level with a different transfer
polynomials do not model intermodulation of function or impulse response. This approach can
multiple sinusoidal components. only model a class of nonlinear system with a static
Some methods have been proposed to use digital (memoryless) nonlinearity followed by linear
processing for greater control over distortion pro- filtering (Berners and Abel 2004).
cessing, including a perceptual map of distortion In many amplifier circuits, the bias point changes
(Martens and Marui 2003), processing different fre- according to past input. Simplified approaches to
quency bands with different distortions (Fernndez- imitate this effect include changing the offset into
Cid, Quirs, and Aguilar 1999), and an analysis of the static nonlinearity depending on a filtered signal
the spectral effect of piecewise-linear waveshaping of the input (Kuroki et al. 1998) or the output, which
curves (Schimmel and Misurec 2007). is fed back (Schimmel 2003; Karjalainen et al. 2006).
Digital implementations of electric guitar distor-
tion effects provide various ways to approximate
the dynamic behavior of nonlinear ordinary differ- Volterra Series Expansion Representation
ential equations. A typical implementation employs
a special case of the Volterra series expansion that A nonlinear system with memory can be represented
uses a pre-filter, memoryless nonlinearity and a analytically as a Volterra series. There has been work
post-filter structure in various combinations (Zlzer on forming finite-order Volterra series for simulat-
2002; Doidic et al. 1998; Abel and Berners 2006). ing electronics (Schattschneider and Zlzer 1999;
Designers then tune the parameters to simulate Abel and Berners 2006; Hlie 2006). However, these
various kinds of distortion. The nonlinearity is are interesting only for low-order circuits, whereas

Yeh et al. 25
for highly nonlinear systems, direct simulation by circuit nodes in digital circuits to speed up the
numerical methods is more computationally effi- simulation (Newton and Sangiovanni-Vincentelli
cient (Bilbao 2006). Even with many terms, Volterra 1984). Nonlinear analog circuits for audio pro-
series, which use polynomial models, do not con- cessing, however, are typically highly coupled,
verge sufficiently for efficient implementation of a possibly with global feedback, and still require the
clipping nonlinearity with large signal excursions. use of traditional, or direct, ODE methods (White
and Sangiovanni-Vincentelli 1987).
ODE solvers use numerical integration methods
Simulation Methods to approximate a solution to the differential equa-
tion. SPICE typically offers the choice of Backward
The use of circuit simulation for real-time distor- Euler, trapezoidal rule, and BDF (often referred to as
tion processing was possibly first mentioned by Gear), which are implicit but stable. The popular
Sapp, Becker, and Brour (1999). Serafini and Zam- explicit Runge-Kutta method of order four has great
boni (2002) simulated a high-pass variant of the accuracy and is easy to use, but it is computation-
diode clipper using trapezoidal integration and ally expensive (Press et al. 1992). The extrapolation
compared it to a prefilter / static nonlinearity imple- technique (Stoer and Bulirsch 2002) is an efficient
mentation. Santagata, Sarti, and Tubaro (2007) also way to dramatically boost the accuracy of the
applied a numerical technique on a memoryless solution, but requires more work than the simple
circuit, which amounts to an implementation of methods.
Newtons method with only one iteration per time
step. Huovilainen (2004, 2005) and Vlimki and
Huovilainen (2006) effectively simulated the Moog Wave Digital Filter
filter and other effects circuits (e.g., phaser, flanger,
and chorus effects) using the explicit Forward Euler An alternative formulation to the ODE problem is to
method to generate a computable filter algorithm express the signals and states in terms of wave vari-
from the ODE of the circuit. This article extends ables and apply component-wise, or local, discretiza-
the investigation of implicit ODE methods previ- tion (Fettweis 1986) at a uniform sample rate. This
ously presented in Yeh, Abel, and Smith (2007b). formulation is known as the Wave Digital Principle,
and the resulting ODE solvers are Wave Digital
Filters (WDF). WDFs typically apply trapezoidal-rule
Prior Work in Ordinary Differential Equation integration in the form of the Bilinear Transform
Solvers 2 z 1
s= (3)
Numerical solution of ODEs is a mature topic in T z +1
applied mathematics, and many sophisticated because it preserves stability across continuous- and
algorithms exist for efficiently attaining accurate discrete-time domains, but other passive ODE
solutions (Gear 1971; Press et al. 1992; Shampine methods with greater orders of accuracy have been
1994; Stoer and Bulirsch 2002). The MATLAB developed for WDFs as well (Frnken and Ochs
scientific computing environment features a rich 2001, 2002). A procedure to automatically generate
suite of ODE solvers (Shampine and Reichelt 1997) the minimal WDF from an arbitrary circuit topology
that can be used for experimentation and gaining has been developed (Meerktter and Frnken 1996;
experience with the solution of ODEs. The circuit Frnken, Ochs, and Ochs 2005). The nonlinear WDF
simulator SPICE (McCalla 1987; Vladimirescu has been investigated by Meerktter and Scholz
1994) is essentially a nonlinear ODE solver. (1989) and Sarti and De Poli (1999) among others,
More advanced simulation techniques were and it was used by Karjalainen and Pakarinen (2006)
subsequently developed based upon relaxation to simulate the ODE of a simplified vacuum tube
methods, which take advantage of loosely coupled preamplifier circuit for guitar distortion.

26 Computer Music Journal


When using the bilinear transform (Equation 3) equations, bisection or bracketing provides predict-
for discretization, the WDF formulation is equiva- able convergence under general conditions (Press et
lent to trapezoidal-rule integration and results in an al. 1992).
identical state trajectory as the iterations are being In the numerical methods literature, ODE meth-
solved. This occurs because, in the WDF, the non- ods are notated with subscripts denoting the time
linearity is still expressed and solved in terms of index, superscripts for the current iterate, prime for
Kirchhoff variables (currents and voltages), requir- the derivative, and h for step size (i.e., sampling
ing a conversion from the wave variables. period), for example, y'n + 1 = (yn + 1 yn) /h. In this
article, methods are presented using square brackets
to denote the time index, a dot to represent the time
Numerical Methods derivative, and T for step size, as is typically done
for digital filters.
The basic ODE solvers use numerical integration to
solve equations of the form
Integration Formulas
dx !
= x(t) = f (t, x,u ) (4)
dt An ODE solver finds x[n] given Equation 4. For each
where x is the system state, f(t,x,u) is a nonlinear discrete time n, the derivative operator in the ODE
function that computes the time derivative of x(t), is evaluated by the application of a numerical-
and depends on the current state x(t) and encom- integration formula. The most basic one is the
passes the input u(t) to the system. Time t is the Forward Euler (FE) method:
independent variable of integration for ordinary dif- ! 1]
x[n] = x[n 1] + Tx[n (6)
ferential equations that describe circuits. For systems
of equations in state-space notation, the state is where x[n] is the system state at discrete time n, T
described by a vector whose elements are nonlinear is the sampling interval, and x[n 1] = f(t[n 1], x[n
functions, and f(t,x,u) is the derivative with respect 1], u[n 1]) is given in Equation 4. Forward Euler is
to time of that vector. (Note that representing state an explicit, first-order-accurate method, also known
by the variable x is chosen to be consistent with as forward difference.
state-space notation; traditional numerical-analysis Another such formula is the Backward Euler (BE)
literature tends to use y to represent system state.) method:
The ODE for the diode clipper is given by Equation !
x[n] = x[n 1] + Tx[n] (7)
2, where Vo is the state x, and Vi is the input u.
In the case of a linear constant-coefficient differ- Backward Euler, also known as backward difference,
ential equation, Equation 4 becomes is similar to Forward Euler, except that the time
derivative is evaluated at the current time point,
d
x(t) = Ax(t) + Bu(t) (5) resulting in an implicit, first-order-accurate method.
dt Related to the above Euler methods is the Trap-
where the eigenvalues of A are the poles of the ezoidal Rule (TR) method, given by
system. Digital filters are efficient solvers of this
T ! ! 1])
special case of ODEs. x[n] = x[n 1] +
2
( x[n] + x[n (8)
Like digital filters, explicit methods depend on
states only from previous time steps. In contrast, which uses instead the average of the derivatives at
implicit formulas depend on current state, forming times n and n 1, resulting in an implicit, second-
a delay-free loop, and require iteration if the ODE is order-accurate method.
nonlinear. Newtons method, including its variants, It is also equivalent to the discretization of a
is the most popular solver, in part because it is continuous-time transfer function by the bilinear
scalable to higher dimensions. For single-dimensional transform (Equation 3). The bilinear transform is

Yeh et al. 27
the only practical order-preserving discretization described in depth in numerical methods textbooks
method that does not introduce artificial damping, (e.g., Press et al. 1992). At time n, the implicit
that is, turning unstable continuous-time poles into method must be solved for current state X = x[n] and
stable discrete-time ones (Smith 2007). The WDF can be rewritten in the general form
implementation of the trapezoidal rule was also
0 = F(X) (11)
tried, but it was found to produce exactly the same
results while requiring more operations; therefore, which represents a nonlinear root-finding problem.
it is not presented here. Newtons method requires the Jacobian, denoted
Another numerical integration method, the second- JF(X), of Equation 11 with respect to X and evaluated
order Backward Difference Formula (BDF2), is com- at X. In the case of the diode clipper (Equation 2),
monly used in circuit simulation, and it deserves which has only one state variable, JF(X) is simply the
mention here. It is a multi-step implicit method derivative of Equation 11 with respect to X. For
that only requires a single function evaluation of most implicit ODE methods, this can be easily
the time derivative of Equation 4 per iteration: computed from the Jacobian of f(t,x,u) (Equation 4),
4 1 2T ! denoted as Jf(X).
x[n] = x[n 1] x[n 2] + x[n] (9) Newtons method is in general given by
3 3 3
Finally, a popular higher-accuracy-order one-step !X = J F1(X)F(X)
(12)
method is the explicit fourth-order Runge-Kutta X := X + !X
Formula (RK4):
and iterating until X is below some acceptable
k1 = Tg(n 1, x[n 1]), value. It converges rapidly if the iteration is started
k2 = Tg(n 1 2 , x[n 1] + k1 2), with an initial guess for X that is close to the final
solution. Typically, this guess is the previous state
k3 = Tg(n 1 2 , x[n 1] + k2 2), (10) x[n 1], which works well when the system is
k4 = Tg(n, x[n 1] + k3), oversampled and successive samples are close in
value to each other.
k1 k2 k3 k4
x[n] = x[n 1] + + + +
6 3 3 6
Semi-Implicit Methods
where g(m,x) = f(t[m],x,u[m]) and f(t,x,u) is as defined
in Equation 4. Note that RK4 requires function eval- Given the observation that guitar-distortion sys-
uations every half sample, and therefore it requires tems are highly oversampled to suppress aliasing,
input at twice the sampling rate of the output, also the implicit methods can be modified to evaluate
noted by Huovilainen (2004). On the contrary, the only one step of the Newton method iteration. This
expanded bandwidth of the distorted output signal is known as the semi-implicit method (Press et al.
requires a sampling rate higher at the output than at 1992), which has constant cost. Effectively, this
the input to reduce aliasing. Implicit Runge-Kutta converts implicit integration methods into explicit
constructions also have been developed extensively form by removing constraints on the final X,
(Gear 1971; Butcher 1987; Frnken and Ochs 2001). which also relinquishes control over the error. The
expressions to evaluate X for the two most well-
known implicit methods are given below; semi-
Newtons Method for Solving Nonlinear Equations implicit BDF2 can be similarly derived. In the
following analysis, it is observed that X = x[n 1],
The nonlinear equation produced by the application and f(n,X) is understood to be shorthand for
of implicit numerical integration formulas can be f(t[n],X,u[n]). Extension to systems with multiple
solved by Newton-Raphson iteration, which is states is straightforward.

28 Computer Music Journal


Figure 4. Tabulated static
nonlinearity of the diode
clipper solved from implicit
nonlinear relationship.

over a wide range of frequencies. The result, a


first-order low-pass filter with a cutoff frequency at
approximately c = 2.8 / (RC) placed before the non-
linearity, also reduces aliasing compared to using no
pre-filter.

Accuracy of Numerical Integration Methods

Local Truncation Error

The Semi-Implicit Backward Euler (BE s-i) is The traditional measure of accuracy is Local Trun-
given by cation Error (LTE), which is the lowest-order differ-
x[n 1] X + Tf(n, X) Tf(n, X) ence between the full Taylor Series expansion of the
!X = = (13) solution and the result of the method. For example,
1 TJ f (X) 1 TJ f (X)
x(t) x(t) x(t T) is first-order-accurate because the
and the Semi-Implicit Trapezoidal Rule (TR s-i) is error is proportional to T as T0. The trapezoidal
given by rule, on the other hand, exhibits an error propor-
tional to T 2 as T0, so it is second-order-accurate.
x[n 1] X + 0.5T ( f(n, X) + f(n 1, x[n 1]))
!X = Manifestations of this error are aliasing and fre-
1 0.5TJ f (X) quency warping. Oversampling reduces error by the
0.5T ( f(n, X) + f(n 1, x[n 1])) accuracy order of the method. For example, it is
= (14)
1 0.5TJ f (X) known that the trapezoidal rule has the smallest
truncation error of any method of order two (Mc-
Calla 1987). Specifically, its truncation error de-
Approximation of an ODE by Static Nonlinearity creases as one-twelfth the square of the sampling
and Digital Filters interval (second-order convergence).

To evaluate the significance of the memory in the


nonlinearity and to demonstrate what is lacking Stability
when static nonlinearities are used, an approxima-
tion to the ODE solver using a static nonlinearity The standard stability analysis for numerical-
with a pre-filter was derived. integration methods is as follows. Consider a linear-
The nonlinearity used (see Figure 4) is the DC ized system described by Equation 5 with B = 0.
approximation of the actual nonlinearity, generated Substituting this into the Forward Euler method
from the ODE by setting the time derivative of the (Equation 6), for example, yields
output voltage in Equation 2 to zero (i.e., dVo / dt =
y n = (I + TA)y n1 (15)
(Vi(t) Vo) / RC 2(Is / C)sinh(Vo / Vt) = 0) and solving
via Newtons method. This is implemented using a This recurrence relation is stable if |1 + T| < 1 for
lookup table as in Yeh, Abel, and Smith (2007a) and each eigenvalue of matrix A. The stability of an
is a type of waveshaping distortion. ODE method depends on the ratio between the
The pre-filter was heuristically derived by com- sampling frequency and the largest eigenvalue of
paring simulation runs of a highly oversampled the system A. For a nonlinear system, the eigenval-
trapezoidal method with this static nonlinearity ues may depend on the operating point.
approximation and choosing a low-pass cutoff Essentially, the various integration methods are
frequency that best approximates the phase shift different ways of mapping the continuous-system

Yeh et al. 29
Figure 5. (a) Regions of (b) regions of stability for
stability for explicit implicit methods Back-
methods Forward Euler ward Euler (BE), BDF2,
(FE) and Runge Kutta 4 and trapezoidal rule (TR)
(RK4) are inside boundary; are outside boundary.

(a) (b)

poles to discrete-time poles. If all resulting discrete- frequency poles, possibly causing some unstable
system poles lie within the unit circle, the discreti- poles to be mapped to stable poles in the digital
zation yields a stable numerical solution. domain. The trapezoidal rule is the bilinear trans-
form, mapping the complex frequency axis onto the
unit circle and introducing no additional damping.
Explicit Methods
An A-stable method will always converge to a stable
The plot of the region of stability on the complex result as long as the nonlinear solver converges.
T-s plane (the s plane normalized times T) forms a
bounded region where the method is stable. Explicit
Stiff Stability
methods, such as Forward Euler and explicit RK4,
result in polynomial stability conditions (Stoer and For the ODEs found in analog circuits, it has been
Burlisch 2002), which trace out an external boundary found in practice that implicit methods drastically
of the stability region in the s-plane (see Figure 5a). reduce the sampling-rate requirement relative to
Consequently, this places a limit on the largest explicit methods and are ultimately more efficient
magnitude negative eigenvalue the system may (McCalla 1987). Circuit simulation problems often
have to assure bounded behavior. have eigenvalues that are highly separated in value, a
property known as stiffness in the ODE literature,
requiring a long time scale to compute the solution,
Implicit Methods
and a small time step for stability when using ex-
For implicit methods, the stability region extends to plicit methods. Stiffly stable solvers place no re-
infinity in the negative half-plane (see Figure 5b), quirement on the minimum sampling rate needed to
thereby placing no limit on the maximum magnitude ensure a bounded solution. Instead, considerations
of an eigenvalue of a system (if it is not complex) for accuracy such as aliasing govern the choice of
and allowing a low sampling rate. For trapezoidal, step size. None of the explicit methods can be stiffly
Backward Euler, and BDF2, the regions encompass stable (Stoer and Bulirsch 2002), because they require
the entire left half-plane, so all stable continuous- a minimum sampling rate to operate properly.
time systems will map to stable discrete-time The left-half plane eigenvalue, or pole, of the
systems (A-stability). Backward Euler and BDF2 diode clipper can be found from the small-signal lin-
will introduce artificial damping to higher- earization of the circuit shown in Figure 3. When Vo

30 Computer Music Journal


is large, the linearized diode resistance will domi- chosen (Doidic et al. 1998; Barbati and Serafini
nate R, making this eigenvalue approximately 2002; Goetze 2007), which makes the aliasing
2I s almost inaudible. With this amount of oversam-
"clip cosh(Vo Vt) (16) pling, all implicit ODE methods are very accurate
CVt
between DC and 20 kHz, and frequency warping
Although this system has only one eigenvalue, it is effects are far out of the audio band. Aliasing
intended to process audio input and needs to run for concerns dominate the choice of oversampling rate;
a time scale that is very large compared to the time it is therefore advisable to focus on simple methods
constant of the eigenvalue. This system can thus be with low computational complexity.
considered stiff in the general sense of the term.

Comparative Results
Considerations for Application to Audio Distortion
Circuits The basic methods presented in the previous sec-
tion were applied to the ODE of the diode clipper
and compared for various input signals. In all cases
Error
the methods were run with 8 oversampling. The
The typical implementation of an ODE solver tar- iterations terminate when the correction given by
gets applications with different error requirements Newtons method for the previous iterate is less
than real-time audio. Error for audio is best defined than 5 mV. This is acceptable, because, in an actual
spectrally and perceptually in the short-time circuit, noise from the components is greater than
frequency domain using masking information as in this. In some cases, a 32 oversampled trapezoidal-
perceptual audio coding (Bosi and Goldberg 2003). rule result also serves as a highly accurate reference
In this article, the audio band is defined to be for comparison. In the Boss DS-1 (Yeh, Abel, and
020 kHz, where a match to the accurate solution Smith 2007a), the signal is hard-clipped to 4.5 V by
of the ODE is desired. Subsonic frequencies are an operational amplifier gain-stage before being
included here, because they can mix through the smoothed by the diode clipper. Therefore, the test
nonlinearity and cause perceptible amplitude inputs are normalized to 4.5 V.
modulation of the output. High frequencies are
assumed to be sufficiently low due to the spectral
roll-off typical of guitar signals such that mixing Two-Tone Sine
products are negligible.
The error criterion for general solvers adaptively A dual-tone excitation (110 and 155 Hz, 4.5-V peak)
adjusts the variable step size to an excessively small was applied at the input of the diode-clipper using
value. When a stiffly stable method is used, an each of the stable integration methods. The implicit
audio-band error criterion greatly improves effi- and semi-implicit methods generate almost identi-
ciency by allowing a larger step size, as explained in cal time-domain responses. Figure 6a shows only
the following. the TR and static approximation. Figure 6b and 6c
plot the error of the 8-oversampled methods
relative to the 32-oversampled reference. All of the
Oversampling
numerical methods exhibit similar profiles with
It is well known that a nonlinearity expands the low error. The second-order-accurate methods TR
bandwidth of a signal. In the digital domain, this and BDF2 have almost identical error. Semi-implicit
extra bandwidth folds over at the Nyquist fre- and implicit versions of the same method have
quency, resulting in aliasing. To achieve high- almost identical error for these low frequencies.
quality distortion effects with a base sampling rate The static approximation shows noticeably larger
of 48 kHz, eight-times (8) oversampling is typically error than the numerical solvers, but it is typically

Yeh et al. 31
Figure 6. Time-domain and BDF2 are almost iden- Figure 7. Peaks in spectra
results for 110 Hz + 155 Hz tical, both being second- of responses to 110 Hz +
input. (a) Waveforms for order. (c) Error for BE, TR, 155 Hz input, connected
trapezoidal (TR) and static and semi-implicit versions by solid lines, for (a) semi-
approximation, 8 over- BE s-i, TR s-i. Only BE and implicit trapezoidal (TR
sampling. They are indis- TR can be distinguished s-i) and (b) static nonlin-
tinguishable in the figure. here, because semi- earity approximation. The
(b) Error for Backward implicit is practically other methods are practi-
Euler (BE), TR, BDF2, and identical to fully implicit cally identical to TR s-i.
static approximation. TR for low-frequency input.

(a) (a)

(b)

(b)

spectrum. The ODE smoothes the response at


higher frequencies, whereas the static approxima-
tion exhibits sharp nulls in the peaks heights.
(c)

Explicit Methods: Stability Problems

A test sinusoid of 4.5 V and 110 Hz was applied to


the clipper ODE discretized by the Forward Euler
and fourth-order explicit RK4 methods with 20
oversampling to demonstrate the high oversampling
needed for a stable simulation of the high frequency
pole. Figure 8 shows the results, compared with
using the trapezoidal rule, with 10 oversampling.
The time waveform follows the curve of the solu-
less than 20 dB, or 10%, a good engineering tion but becomes unstable at high signal values,
approximation. when the diode has high conductance and is con-
A spectral comparison better represents the au- tributing to a high-frequency pole outside of the
dible differences. The numerical solvers all produce methods stability region. The spectra resemble
similar output spectra and are represented in that of the TR solution in the low frequencies, but
Figure 7 by the semi-implicit trapezoidal rule. Only the instability manifests as a broadband noise floor
the peaks are plotted and connected by straight lines that sounds particularly grating and cannot be
for better visual discrimination. This is compared to removed by simple filtering. It was found experi-
the static approximation, which is a close approxi- mentally that, to achieve stable results, very high
mation that is extremely accurate in the first few oversampling factors (38 for Forward Euler and 30
harmonics and reproduces the overall contour of the for RK4) were needed.

32 Computer Music Journal


Figure 8. Waveforms (left) ward Euler (FE) and fourth- Figure 9. Time-domain (+1V), Semi-implicit Back-
and frequency spectra order explicit Runge-Kutta waveforms for 15,001 Hz ward Euler (+0.5V), SPICE
(right) demonstrating time (RK4), both oversampled input. (a) Five curves are (+0V), semi-implicit trap-
domain instability and at 20, compared to plotted with offsets to ezoidal (0.5V) and the
broadband spectral noise Trapezoidal rule (TR) facilitate visual discrimi- static approximation (1V),
of explicit methods For- oversampled at 10. nation. Top to bottom all with 8 oversampling.
plotted with offsets in (b) The methods are also
parentheses: trapezoidal overlaid for comparison.

Figure 8

(a) (b)

Figure 9

Single High-Frequency Sine and Verification The same input was provided to the SPICE
with SPICE simulator LTspice (Linear Technology 2007), which
has WAV-file import capability, using trapezoidal-
A high-level, high-frequency sine-wave excitation rule integration. This comparison verifies the
(4.5 V, 15,001 Hz) reveals inadequacies in the semi- methods and approximations used in this work.
implicit methods, which exhibit overshoot in the An exact time-domain match to SPICE cannot be
time-domain plots (see Figure 9) and spurious tones expected because of differences in convergence
in the frequency domain. criteria and numerical handling. SPICE uses an

Yeh et al. 33
Figure 10. Magnitude each at 8 oversampling,
response of (a) 15,001 Hz, and (e) using LTspice,
4.5 V input, 32 oversam- which linearly interpolates
pled reference using (b) TR, output to the 8 over-
(c) TR s-i, and (d) static, sampling grid.

adaptive step size to control error, and it applies (a)


linear interpolation when interfacing with the WAV
sound-file format.
The spectra of trapezoidal method, semi-implicit
trapezoidal method, and static approximation at 8
oversampling are plotted in Figure 10 against the
result generated by trapezoidal-rule integration
with 32 oversampling, which represents the
accurate solution. The static nonlinearity correctly
(b)
reproduces the magnitude of the fundamental.

Sine Sweep

A high-amplitude, sinusoidal, exponential-


frequency sweep from 20 Hz to 20 kHz was pro-
cessed by the methods. The output was downsampled
to 96 kHz and displayed as a log spectrogram (Brown (c)
1991). All of the ODE methods produce almost
identical output if stable, so only the spectrograms
for trapezoidal rule, its semi-implicit version, and
the static nonlinearity are shown in Figure 11. The
ODE methods exhibit a blurring of the higher
frequencies absent in the static case and also reduce
aliasing. The static nonlinearity produces very little
aliasing at 8 oversampling. The semi-implicit
(d)
methods overshoot for strong high-frequency
components, which manifests as a strong aliasing
like characteristic.

Comparison with Measurement

Finally, the entire block diagram of Figure 1 was


simulated, using an 8-oversampled trapezoidal (e)
method on the diode clipper, and compared to output
from an actual DS-1 (see Figures 12 and 13). The
input to each system was a 220-Hz sine wave with
100-mV amplitude. Arbitrary knob settings were
chosen in simulation, and the knobs on the actual
device were adjusted to match the spectral enve-
lope. The differences in output are most likely
caused by the asymmetric nonlinearity of the
bipolar transistor-gain stage, which provides even-
order harmonics and which was neglected in this
model. The additional harmonics cause a subtle

34 Computer Music Journal


Figure 11. Log spectrogram Figure 12. Time response to normalized to 1V. They are Figure 13. Spectra of Figure
of diode-clipper response 220 Hz, 100 mV input almost exactly overlaid in 12: (a) Boss DS-1; (b)
to sine sweep using (a) TR, signal of measured Boss this view. The DS1 exhib- simulation with TR.
(b) TR s-i, and (c) static DS-1 (solid) and simula- its a sharper corner at the
approximation methods, tion with TR (dashed), right edge of the waveform.
for 8 oversampling,
fs = 48 kHz.

(a)

Figure 12

(a)
(b)

(b)

(c)

Figure 13

Likewise, log spectrograms of the two devices in


response to an exponential-frequency sweep from
20 Hz to 20 kHz are compared in Figure 14. The use
of the diode clipper with ODE solver also appears to
audible difference (an increased level of additional reduce aliasing relative to the static approximation
tones), which should be included in more accurate used for the spectrograms of Yeh, Abel, and Smith
models. Note that the use of the ODE solver on the (2007a). The measured device exhibits device noise
diode clipper significantly improves upon the static seen above 1 kHz and features an impulse-like,
approximation used in Yeh, Abel, and Smith (2007a). subharmonic output at 5.3 sec when the circuit no

Yeh et al. 35
Figure 14. Log spectro-
grams of sine sweep from
20 Hz20 kHz: (a) DS-1
and (b) simulated model.

(a) Table 1. Cost Comparison of Methods in Terms of


Function Calls (f-calls) to Either the Time-
Derivative (Equation 2) or Its Jacobian
Method X f-calls Avg f-calls / sample
FE 38 1 38
RK4 30 4 120
BE 8 2n 28.8
BE s-i 8 2 16
TR 8 1+2n 36.8
TR s-i 8 3 24
BDF2 8 2n 28.8
BDF2 s-i 8 2 16
Static 8 Lookup
(b) Oversampling X required is also shown. For implicit methods,
n = 1.8, the average number of iterations per sample over a frame.
Base sampling rate is 48 kHz.

guitar with Humbucking pickups. The first signal


was an open E power chord with a peak input of
1 V, amplified by 60 dB, and hard-clipped to 4.5 V
before processing by the ODE, and a single-note
riff with a bend, normalized to a peak of 4.5 V.
Sound files of the results are available on the forth-
coming DVD accompanying Computer Music
Journal 32(4).
Although extremely high-level, high-frequency
input causes problems with convergence as indi-
longer can track the high-level, high-frequency cated by the sine sweep, the number of iterations
input. This behavior is not sonically pleasing and per sample never exceeds eight. When guitar signals
perhaps need not be modeled. are extremely amplified (60 dB for example), more
iterations are needed at the clipping threshold,
because the signal changes very abruptly. However,
Computational Cost when used in a frame-based audio processing
system, assuming a conservative frame size of 32
Because the number of iterations in an ODE solver samples at 48 kHz (256 at 85), the average number
that employs Newtons method is related to the of iterations per sample never exceeds 1.8.
input in a complicated way, an empirical measure- The cost per sample in terms of function calls to
ment of cost is made. For the 8-oversampled rate, compute either the time-derivative (Equation 2) or
the number of iterations per sample required for a its Jacobian in the iterative methods is shown in
tolerance of 5 mV is plotted in Figures 1517, Table 1. The cost of computing the derivative is
along with the moving average over a frame size of assumed to be similar to the cost of computing the
256 samples (32 samples at 48 kHz). The inputs Jacobian; therefore, the cumulative number of
used are an exponential sine sweep from 20 to 20 function calls represents the cost of the method.
kHz and 4.5 V amplitude, and two signals represen- The cost is normalized per audio sample at the base
tative of typical input, recorded from an electric sampling rate of 48kHz. For iterative methods, the

36 Computer Music Journal


Figure 15. Exponential sine
sweep from 2020kHz.
Left: number of iterations
per sample; right: moving-
average of iterations using
a frame size of 256 samples.
Top to bottom: BE, TR,
BDF2.

number of iterations n averaged over the 32-sample cal model. Huovilainen (2004) successfully applied
frame is assumed to be 1.8, as suggested herein. an explicit method, because the Moog filter is
typically weakly nonlinear. When systems become
strongly nonlinear, they may operate in device
Discussion regions that result in high-frequency poles, which
cause stability problems with explicit methods as
shown here. Convergence by Newtons method for
Choice of Method circuits with strongly nonlinear regions is also
difficult in general.
The evaluation of cost confirms prior findings in For audio-frequency input, the differences be-
the circuit-simulation literature that implicit tween the methods are negligible in the audio band
methods are preferred over explicit ones for simula- because the process is well oversampled to reduce
tion of general circuits. The explicit methods, aliasing, especially when dealing with clipping-type
although simple, do not produce reliably accurate distortions. The oversampling causes the errors of
results for the diode clipper ODE, as measured in the various accuracy-order methods to be very low
the frequency domain, unless they are impractically in the audio band and makes the effect of frequency
highly oversampled. This need for excessive over- warping insignificant. Thus, complicated higher-
sampling (38 for FE and 30 for explicit RK4) was accuracy-order methods such as extrapolation tech-
found to be necessary to avoid numerical instability niques or implicit Runge-Kutta are unnecessary. It
associated with a high-frequency pole in the physi- would seem then that a stable method of low order

Yeh et al. 37
Figure 16. Power chord.
Left: number of iterations
per sample; right: moving-
average of iterations using
a frame size of 256 samples.
Top to bottom: BE, TR,
BDF2.

would be sufficient while guaranteeing bounded place within the iterative loop to evaluate the de-
output if a convergent nonlinear solver is used. The tailed nonlinear models of circuit devices (McCalla
time-domain outputs of the semi-implicit methods 1987). This was also demonstrated by Karjalainen
show significant ringing for high-frequency inputs, and Pakarinen (2006), who showed that tabulation
but this is an extreme case because high amplitudes of the device models significantly speeds up the
at these frequencies are rarely encountered in iterative solution in modeling a tube preamplifier
practical guitar signals as demonstrated by the with WDF. The computational complexity in the
sound examples. WDF approach is similar to that here, which sug-
gests that full implicit solution of circuits should
be feasible.
Real-Time Considerations Scaling to circuits with more nodes should be
possible as long as device models remain simple to
A prototype implementation, with no particular compute or if they are tabulated. This is true
efforts to write efficient code, demonstrates that the especially because the goal of guitar distortion is to
iterated implicit methods run in real time up to 8 model amplifiers with vacuum tubes whose charac-
oversampling on a contemporary CPU (Intel Core 2 teristics should be measured and tabulated for
Duo, 1.6 GHz). greatest realism. Even simplified models, though,
Experience in circuit-simulator development has may prove sufficient to capture the dynamics or
shown that most of the computational effort takes character of the circuit.

38 Computer Music Journal


Figure 17. Single-note riff
with a bend. Left: number
of iterations per sample;
right: moving average of
iterations using a frame
size of 256. Top to bottom:
BE, TR, BDF2.

Conclusions different methods, if stable, to be negligibly differ-


ent in the audio frequency band.
In general, while many electronic devices (e.g., It was found that for realistic input signals, the
diodes, vacuum tubes) might be characterized by a number of iterations required for implicit methods
static nonlinearity, placing one into a circuit creates to converge at 8 oversampling is not overwhelm-
a nonlinear ODE. Often this can be approximated ingly costly (typically no more than eight itera-
by a static nonlinearity, which can be derived from tions), because the signal changes smoothly
the nonlinear ODE as demonstrated; however, between samples. This suggests the use of semi-
solving the ODE provides more accurate results. implicit methods. Both implicit and semi-implicit
Although explicit ODE methods can be used in ODE solvers were successfully implemented in a
cases where the poles of the system are known real-time audio plug-in emulating a simplified block
never to cross the stability boundary, the pathologi- diagram of the Boss DS-1.
cal case of the diode clipper and the findings of the Simulating the circuit is the most accurate way to
circuit simulation literature indicate that in gen- reproduce the nuances of the distortion and to
eral, implicit methods are required. ensure that it behaves with appropriate complexity.
Because the nonlinearities in typical guitar Like physical modeling of musical instruments,
distortion are strong, bandwidth is expanded by a modeling the circuit component-wise allows para-
large factor, necessitating large oversampling rates. metric behavior to be modeled correctly. Because
This constraint on the sampling rate causes the audio circuits are typically small, it is conceivable

Yeh et al. 39
that in the near future, full simulations can be done Audio Coding and Standards. Norwell, Massachusetts:
in real time. If successful, this could harness the Kluwer.
existing skill of circuit designers and hobbyists, Brown, J. C. 1991. Calculation of a Constant-Q Spec-
who can then experiment with their ideas and tral Transform. Journal of the Acoustical Society of
implement them on a real-time digital platform. America 89(1):425434.
Butcher, J.C. 1987. The Numerical Analysis of Ordinary
Because component models are not limited by
Differential Equations. Hoboken, New Jersey: Wiley.
physical reality and availability, they can experi- Doidic, M., et al. 1998. Tube Modeling Programmable
ment with various parameters of the device elec- Digital Guitar Amplification System. U.S. Patent
tronics (tubes, transistors, etc.) and even invent 5,789,689.
fictional ones to discover if their conjectures about Fernndez-Cid, P., J. Quirs, and P. Aguilar. 1999. MWD:
the nature of various phenomena in musical elec- Multiband Waveshaping Distortion. Proceedings of
tronics are true. Continued development in real- the 2nd COST-G6 Workshop on Digital Audio Effects
time circuit simulation (e.g., real-time SPICE) of (DAFx99). Trondeim, Norway: NoTAM. Available
musical electronics has the potential to spark a online at citeseer.ist.psu.edu / 393243.html.
paradigm shift in digital audio effects. Fettweis, A. 1986. Wave Digital Filters: Theory and Prac-
tice. Proceedings of the IEEE 74(2):270327.
Frnken, D., and K. Ochs. 2001. Synthesis and Design
of Passive Runge-Kutta Methods. AE Interna-
Acknowledgments tional Journal of Electronics and Communications
55(6):417425.
Thanks to Dr. Stefan Bilbao for eye-opening discus- Frnken, D., and K. Ochs. 2002. Improving Wave Digital
sions regarding numerical methods. Many thanks to Simulation by Extrapolation Techniques. AE Inter-
Dr. Bill Gear for providing example code to plot stabil- national Journal of Electronics and Communications
ity regions. Thanks to the Acoustics Laboratory at the 56(5):327336.
Helsinki University of Technology for being terrific Frnken, D., J. Ochs, and K. Ochs. 2005. Generation
hosts during the completion of this article. David of Wave Digital Structures for Networks Containing
Yeh was supported by the Stanford, NDSEG, and Multiport Elements. IEEE Transactions on Circuits
National Science Foundation Graduate Fellowships. and SystemsI 52(3):586596.
Gear, W. C. 1971. Numerical Initial Value Problems in
Ordinary Differential Equations. Englewood Cliffs,
New Jersey: Prentice-Hall.
References Goetze, T. 2007. CAPS, the C Audio Plugin Suite.
Available online at quitte.de / dsp / caps.html, accessed
Abel, J. S., and D. P. Berners. 2006. A Technique for 2 November 2007.
Nonlinear System Measurement. Proceedings of the Gustafsson, F., et al. 2004. System and Method for Simu-
Audio Engineering Society 121st Convention, Paper no. lation of Non-Linear Audio Equipment. U.S. Patent
6951. New York: Audio Engineering Society. Application Publication US2004 / 0258250 A1.
Arfib, D. 1979. Digital Synthesis of Complex Spectra Hlie, T. 2006. On the Use of Volterra Series for Real-
by Means of Multiplication of Nonlinear Distorted Time Simulations of Weakly Nonlinear Analog Audio
Sine Waves. Journal of the Audio Engineering Society Devices: Application to the Moog Ladder Filter.
27(10):757768. Proceedings of the 2006 International Conference on
Barbati, S., and T. Serafini. 2002. A Perceptual Approach Digital Audio Effects (DAFx-06). Montreal, Canada:
on Equalization. Available online at www.simulanalog McGill University, pp. 712.
.org / eq.pdf, accessed 2 November 2007. Huovilainen, A. 2004. Nonlinear Digital Implementa-
Berners, D. P., and J. S. Abel. 2004. Ask the Doctors! tion of the Moog Ladder Filter. Proceedings of the
Universal Audio Webzine 2(6). Available online at 2004 International Conference on Digital Audio Ef-
www.uaudio.com / webzine / 2004 / july / text / content2 fects (DAFx-04), Naples, Italy: Federico II University of
.html, accessed 2 November 2007. Naples, pp. 6164.
Bilbao, S. 2006. Personal communication. Huovilainen, A. 2005. Enhanced Digital Models for
Bosi, M., and R. Goldberg. 2003. Introduction to Digital Analog Modulation Effects. Proceedings of the 2005

40 Computer Music Journal


International Conference on Digital Audio Effects Santagata, F., A. Sarti, and S. Tubaro. 2007. Non-Linear
(DAFx-05). Madrid, Spain: Universidad Politcnica de Digital Implementation of a Parametric Analog Tube
Madrid, pp. 155160. Ground Cathode Amplifier. Proceedings of the 2007
Karjalainen, M., and J. Pakarinen. 2006. Wave Digital International Conference on Digital Audio Effects
Simulation of a Vacuum-Tube Amplifier. Proceedings (DAFx-07). Bordeaux, France: University of Bordeaux,
of the 2006 IEEE International Conference on Acous- pp. 169172.
tics, Speech and Signal Processing. New York: Institute Sapp, M., J. Becker, and C. Brour. 1999. Simulation of
of Electrical and Electronics Engineers, pp. 153156. Vacuum-Tube Amplifiers. Journal of the Acoustical
Karjalainen, M., et al. 2006. Virtual Air Guitar. Journal Society of America 105(2):1331.
of the Audio Engineering Society 54(10):964980. Sarti, A., and G. De Poli. 1999. Toward Nonlinear Wave
Kemp, M. J. 2006. Audio Effects Synthesizer with or Digital Filters. IEEE Transactions on Signal Pro-
without Analyzer. U.S. Patent 7,039,194. cessing 47(6):16541668.
Kuroki, R., et al. 1998. Digital Audio Signal Processor Schattschneider, J., and U. Zlzer. 1999. Discrete-Time
with Harmonics Modification. U.S. Patent 5,841,875. Models for Nonlinear Audio Systems. Proceedings of
Le Brun, M. 1979. Digital Waveshaping Synthesis. Jour- the 2nd COST G-6 Workshop on Digital Audio Effects
nal of the Audio Engineering Society 27(4):250266. (DAFx99). Trondheim, Norway: Norwegian Univer-
Linear Technology. 2007. SwitcherCAD III / LTspice Users sity of Science and Technology. Available online at
Guide. Available online at ltspice.linear.com / software / citeseer.ist.psu.edu / 284494.html.
scad3.pdf, accessed 3 November 2007. Schimmel, J. 2003. Using Nonlinear Amplifier Simula-
Martens, W. L., and A. Marui. 2003. Psychophysical tion in Dynamic Range Controllers. Proceedings of
Calibration of Sharpness of Multiparameter Distortion the 2003 International Conference on Digital Audio
Effects Processing. Proceedings of the Audio Engineer- Effects (DAFx-03). London: Queen Mary, University of
ing Society 114th Convention, paper no. 5739. New London, pp. 14.
York: Audio Engineering Society. Schimmel, J., and J. Misurec. 2007. Characteristics
McCalla, W. J. 1987. Fundamentals of Computer-Aided of Broken Line Approximation and its Use in Dis-
Circuit Simulation. Boston, Massachusetts: Kluwer. tortion Audio Effects. Proceedings of the 2007
Meerktter, K., and R. Scholz. 1989. Digital Simulation International Conference on Digital Audio Effects
of Nonlinear Circuits by Wave Digital Filter Prin- (DAFx-07). Bordeaux, France: University of Bordeaux,
ciples. Proceedings IEEE International Symposium on pp. 161164.
Circuits and Systems, Volume 1. New York: Institute Serafini, T., and P. Zamboni. 2002. State-Variable
of Electrical and Electronics Engineers, pp. 720723. Changes to Avoid Non Computation Issues. Available
Meerktter, K., and D. Frnken. 1996. Digital Real- online at www.simulanalog.org / statevariable.pdf, ac-
ization of Connection Networks by Voltage-Wave cessed 2 November 2007.
Two-Port Adaptors. AE International Journal of Shampine, L. F. 1994. Numerical Solution of Ordinary
Electronics and Communications 50(6):362367. Differential Equations. New York: Chapman and Hall.
Mller, S., M. Gromowski, and U. Zlzer. 2002. A Mea- Shampine, L. F., and M. W. Reichelt. 1997. The MAT-
surement Technique for Highly Nonlinear Transfer LAB ODE Suite. SIAM Journal on Scientific Comput-
Functions. Proceedings of the 2002 International ing 18(1):122.
Conference on Digital Audio Effects (DAFx-02). Smith, J.O. 2007. Physical Audio Signal Processing.
Hamburg, Germany: University of the Federal Armed Available online at ccrma.stanford.edu / ~jos / pasp,
Forces, pp. 203206. accessed 6 November 2007.
Muller, R. S., and T. L. Kamins. 2002. Device Electronics Stoer, J., and R. Bulirsch. 2002. Introduction to Numeri-
for Integrated Circuits. Hoboken, New Jersey: Wiley. cal Analysis, 3rd ed. New York: Springer.
Newton, A. R., and A. L. Sangiovanni-Vincentelli. 1984. Vlimki, V., and A. Huovilainen. 2006. Oscillator and
Relaxation-Based Electrical Simulation. IEEE Trans- Filter Algorithms for Virtual Analog Synthesis. Com-
actions on Computer-Aided Design 3(4):308331. puter Music Journal 30(2):1931.
Press, W. H., et al. 1992. Numerical Recipes in C: The Vladimirescu, A. 1994. The SPICE Book. Hoboken, New
Art of Scientific Computing, 2nd edition. Cambridge: Jersey: Wiley.
Cambridge University Press. White, J. K., and A. Sangiovanni-Vincentelli. 1987. Relax-
Roland Corporation. 1980. Boss DS-1 Service Notes. tion Techniques for the Simulation of VLSI Circuits.
Hamamatsu, Japan: Roland Corporation. Boston, Massachusetts: Kluwer.

Yeh et al. 41
Yeh , D. T., J. Abel, and J. O. Smith. 2007a. Simplified, Proceedings of the 2007 International Conference on
Physically-Informed Models of Distortion and Over- Digital Audio Effects (DAFx-07). Bordeaux, France:
drive Guitar Effects Pedals. Proceedings of the 2007 University of Bordeaux, pp. 197204.
International Conference on Digital Audio Effects Yeh, D. T., and J. O. Smith. 2006. Discretization of the
(DAFx-07). Bordeaux, France: University of Bordeaux, 59 Fender Bassman Tone Stack. Proceedings of the
pp. 189196. 2006 International Conference on Digital Audio Ef-
Yeh , D. T., J. Abel, and J. O. Smith. 2007b. Simulation of fects (DAFx-06). Montreal, Quebec, Canada, pp. 16.
the Diode Limiter in Guitar Distortion Circuits by Nu- Zlzer, U., ed. 2002. DAFX: Digital Audio Effects. Hobo-
merical Solution of Ordinary Differential Equations. ken, New Jersey: Wiley.

42 Computer Music Journal

You might also like