The following U.S. Patent documents relate to the present invention and are provided for reference.
The present invention relates generally to audio signal processing, audio recording software, guitar amplification systems, and modeling of vacuum tubes. More particularly, the present invention concerns a signal processing method designed to distort audio signals and mimic the desired audio characteristics, dynamics, and distortion associated with vacuum tube preamplifier stages and power amplifiers.
Prior attempts to emulate the effects of vacuum tubes with software-based or digital tube-modeling algorithms have either failed to fully capture the characteristics of these distortions and faithfully reproduce the dynamic and “warm” sound associated with tube amplifiers, or suffer from inefficient means of performing the computational tasks required to produce them convincingly. The effects of the cathode-connected R-C network commonly found in tube amplifier stages have been overly simplified in previous art. By use of a chain of linear filters and distortion blocks, the true non-linear dynamical behavior of tube amplifier stages is lost. Many non-linear transfer functions are described by fixed equations and lack means of adjustment of their shape, linear regions, and clipping characteristics. Furthermore, little progress has been made to simplify the non-linear functions used to distort digital signals in these algorithms to improve their computational efficiency and permit greater numbers of them to run on signal processors. While prior examples to capture the characteristics of tube amplifier stages have been successful on many grounds, they either lack the parametric control, versatility, dynamic character, guaranteed numerical stability, or computational efficiency of the present invention.
U.S. Pat. No. 4,995,084 to Pritchard (Feb. 19, 1991) relates analog circuits to vacuum tube amplifiers and discloses one of the earliest digital versions that approximate the distortion of these circuits. Clipping is achieved with a basic hard-clipping algorithm and does not address controlling the curvature of the clipping regions parametrically. No attention is given to the dynamic distortion effects of tube amplification stages or the elimination of fold-over noise.
U.S. Pat No. 6,504,935 to Jackson (Jan. 7, 2003) and U.S. Pat. No. 6,611,854 to Amels (Aug. 26, 2003) disclose transfer curves based on trigonometric functions and high-order polynomials which, although allow great versatility in control of harmonic content, take greater efforts to compute. U.S. Pat. No. 5,570,424 to Araya et al. (Oct. 29, 1996), U.S. Pat. No. 5,578,948 to Toyama (Nov. 26, 1996) and U.S. Pat. No. 6,350,943 to Suruga et al. (Feb. 26, 2002) use cubic polynomial functions that are relatively easier to compute but lack a strictly linear region and adjustment of the clipping edge.
U.S. Pat. No. 5,789,689 to Doidic et al. (Aug. 4, 1998) discloses a digital guitar amplifier utilizing several transfer functions to model vacuum tube preamplifier stages. In addition to a hard-clipping function, a fixed curve closely approximating a vacuum tube transfer characteristic is described. However, despite the accuracy of the shape of this model curve, it lacks the parametric control, dynamics, linear regions and computational simplicity of the present invention.
U.S. Pat. No. 4,868,869 to Kramer (Sep. 19, 1989) and U.S. Pat. No. 5,528,532 to Shibutanti (Jun. 18, 1996) are just two of many examples disclosing digital distortion methods implementing non-linear transfer functions using lookup tables located in digital memory. Whereas table lookup methods are extremely computationally efficient, requiring only a single memory read for each processed sample, they do not address or improve the functions with which the tables are filled, nor do they provide means for dynamic or parametric control of the table values. Also, trends for higher sampling resolutions demand lookup tables of impractically large sizes.
U.S. Patent No. 4,495,640 to Frey (Jan. 22, 1985) recognizes the importance of controlling the gain and offset bias within and between tube amplifier stages for adjustable guitar distortion and implements this in analog circuitry using operational amplifiers between vacuum tube amplifier stages.
U.S. Patent Nos. 4,811,401 and 5,131,044 to Brown et al. (Mar. 7, 1989 and July 14, 1992) demonstrate the need for frequency-dependent control of distortion and highlight, through analog means, the trend for increased forward gain for higher audible frequencies and the high-shelving filter effect. This effect is an inherent property of tube amplifier stages with cathode-connected R-C components. Whereas it is often demonstrated how to simulate this high frequency boost effect with linear filters, the linear filter approach fails to emulate the non-linear dynamical behavior resulting from the feedback effects of the cathode-connected R-C network.
U.S. Patent Application 2008/0218259 by Gallo describes an efficient method of modeling the distortion curves associated with vacuum tubes, further providing sufficient parametric control to extend this technique to various other types of distortion effects. The importance of the cathode-connected R-C network, the non-linear differential equations that describe its interaction amongst a vacuum tube preamplifier circuit, and the need of numerical methods to emulate these dynamical effects are clearly described. However, the importance of the guaranteed numerical stability provided by implicit numerical methods, and efficient techniques for implementing them to solve the non-linear dynamical equations therein described, are overlooked.
It has been demonstrated that there is a need in the art for an improved signal processing method to faithfully reproduce the desired dynamic and distortion effects associated with vacuum tube amplifiers by means of a numerically stable and efficient technique. The interest to achieve these results has been expressed many times in prior works and has been satisfied by the present invention in an efficient, simple, and readily usable form.
It is an object of this invention to provide a means of distortion of audio signals through a signal process.
It is a further object of this invention to recreate the desirable dynamic distortion effects of vacuum tube preamplifier and power amplifier stages by means of a digital signal process.
It is still a further object of this invention to provide a means of emulating vacuum tube preamplifier and power amplifier stages in terms of equations and algorithms that can be readily implemented in software or signal processing hardware.
It is still a further object of this invention to incorporate a plurality of said vacuum tube preamplifier and power amplifier modeling stages in conjunction with linear filters and other effects to provide a means of emulating a tube amplification system, guitar amplification system, or other musical instrument signal processor.
It is still a further object of this invention to emulate the input-output transfer characteristic curve of a vacuum tube amplifier stage by means of a non-linear transfer function.
It is still a further object of this invention to provide a means for parametric control of the shape of said non-linear transfer function to allow emulation of a variety of vacuum tube amplification stages and distortion effects.
It is still a further object of this invention to provide a means of adjusting the gain and offset of the input and output signals of said non-linear transfer function to emulate the high signal gain and bias effects of vacuum tube amplification stages and similar effects.
It is still a further object of this invention to emulate the effects of the cathode-connected R-C network of vacuum tube amplifier stages by means of a non-linear filter model incorporating a non-linear transfer function, a filter, and feedback control.
It is still a further object of this invention to provide a means of describing said non-linear filter by means of a non-linear differential equation.
It is still a further object of this invention to provide a means of solving said non-linear differential equation in real-time using an implicit step-method numerical integration solver.
It is still a further object of this invention to provide a means of an efficient implicit step-method numerical integration solver for said non-linear differential equation by application of the implicit trapezoidal numerical integration method.
For a better understanding of the present invention, reference may be had to the following description of exemplary embodiments thereof, considered in conjunction with the accompanying drawings, in which:
Referring to
The choice of values for the R-C network and feedback control parameters affect the frequency response of the amplifier stage. This is an important feature of tube amplifier stages that permits control over the balance of high-frequency distortion to low-frequency distortion. In most tube amplifiers, reduction of low frequency distortion is an inherent effect often desired to achieve a particular, popular sound. Sometimes this is accomplished through filters between tube amplifier stages, but often originates from the careful selection of component values in the cathode-connected R-C networks of each in a succession of stages. The present invention provides a means to emulate these effects.
The non-linear function block 103, located in the forward path of the system diagram, implements a parametrically-controlled non-linear transfer function. The input 107 to the non-linear function block 103, representing the grid-to-cathode voltage that determines the plate current, results from the difference of the system input signal 100, represented by x, and the feedback signal 106, represented by the product, kv. Here, signal x corresponds to the grid voltage and signal kv corresponds to the voltage across a cathode-connected R-C network, as found in typical tube amplifiers. The R-C network 104 and feedback control 105, located in the feedback loop of the system diagram, recreate the effects of the cathode-connected R-C network by generating signal kv 106 by filtering the output 101, represented by y. This entire system and signal flow diagram represent a non-linear filter that emulates the desired distortion and dynamic effects of vacuum tube amplifier stages.
This function is defined piecewise on three intervals
where the parameters, k1, k2, k3, k4, a, and b are chosen to control its shape and clipping characteristics. This function is divided into three regions by boundaries placed at two points, a and b. For small input signals, x lies between the boundary points, a and b,
a≦x≦b
and the output, y, is simply a linear function of the input,
y=x
This linear region does not distort small signals, which mimics the same effect found in tube amplifier stages. For large negative signal swings, x is less than the lower-boundary, a,
x<a
and the output, y, is a non-linear function of the input,
This function possesses a smooth horizontal asymptote at y=−1.0 as x decreases below a towards negative infinity. This prevents negative values of y from decreasing below a fixed saturation limit, mimicking the same effect in tube amplifier stages. The values of k1 and k2 are chosen to scale and shift the asymptotic non-linear section so that the transfer function and its slope remain continuous across the boundary, a. This continuity of both function and slope insures a smooth transition from the linear region to the lower clipping region, mimicking the same effect found in tube amplifier stages. Similarly, for large positive signal swings, x is greater than the upper-boundary, b,
x>b
and the output, y, is another non-linear function of the input,
This function possesses a smooth horizontal asymptote at y=+1.0 as x increases above b towards positive infinity. This prevents positive values of y from increasing above a fixed saturation limit, mimicking the same effect found in tube amplifier stages. The values of k3 and k4 are similarly chosen to scale and shift the asymptotic non-linear section so that the transfer function and its slope remain continuous across the boundary, b. This continuity of both function and slope insures a smooth transition from the linear region to the upper clipping region, mimicking the same effect found in tube amplifier stages.
The values of a and b may be freely chosen between −1.0 and +1.0 to produce many different types of distortions and transfer functions, both those found in tube amplifier stages, and those found in other distortion devices.
To provide additional control over the input gain and output offset, the above equation may be modified to include a gain parameter, g, and shifting parameters, o and d, as follows:
These improvements provide greater versatility through control over additional parameters significant to real vacuum tube preamplifier stages.
Returning to
y=f(x−kv)
For a given input, computing the output signal follows directly from the solution of the capacitor voltage. The aim, therefore, is to determine how this capacitor voltage reacts to a given input, so that the desired output may be found.
The dynamical behavior of the capacitor is described by a simple R-C network and follows that of a linear, first-order, ordinary differential equation:
Replacing y=f(x−kv) in the above equation and rearranging we obtain the expression that describes the derivative of the capacitor voltage in terms of the input, feedback parameter, and the capacitor voltage, itself:
Now, if the function, ƒ, were simply a linear function of x and v then the solution for v, and consequently y, would be a simple matter of solving a first-order linear differential equation. However, f is not defined as a linear function by the vacuum tube model and thus requires other methods to find the solution for v. Although a general solution to this differential equation is not available, a numerical method may be used to estimate it.
To emulate this system in discrete-time sampled audio systems, a numerical method may be used to estimate the output from the previous inputs and states, sample by sample. The choice of this numerical method is critical to insure stability and accuracy and should not be made without considering complexity and computational cost. Here, the present invention discloses a method that possesses a good balance of stability, accuracy, and simplicity which allows real-time processing of signals with this vacuum tube preamplifier stage model.
The simplest method for estimating the solution to a differential equation is Euler's method, which uses the present value of the function and its derivative to estimate the next value of the function. This is done by assuming the derivative to be constant over the interval and extrapolating the function along this slope:
Euler's method does not preserve stability, however, and can lead to unstable numerical results when modeling stiff systems, i.e. systems that have large changes of scale in their functions for their derivatives. Such is the case for tube models which possess large variation in dynamic gain, being relatively high at the bias point, and nearly zero at the clipping regions in overdrive. For this reason, Euler's method makes for an undesirable candidate for emulating the vacuum tube model and should be avoided.
Stiff systems present stability problems for many other numerical methods as well. Whereas the overall accuracy and immunity to instability greatly improve with higher-order explicit methods, like the Runge-Kutta step methods and others, the complete preservation of system stability is simply not possible unless an implicit numerical method is used.
The simplest implicit numerical method is the Implicit Euler method. This technique is very similar to the Euler method, differing only in the location where the derivative is evaluated:
This subtle change has a great impact in the behavior of the method, introducing stability preservation, albeit at the cost of increased computational expense. Implicit methods are, generally speaking, more difficult to compute than explicit methods because their solutions can not be taken directly and are typically found through an iteratively converging process. The Implicit Euler method still remains relatively simple and easy to compute when compared to other implicit methods, though, and can be used readily. Its only drawback is that its accuracy is relatively weak in comparison to higher order explicit and implicit methods, and not very suitable for the demands of high quality audio.
Improving the accuracy of any numerical method requires reducing error terms that diminish with increasing order. However, this improvement in accuracy comes with increased computational cost, especially with implicit methods that often require multiple evaluations of the derivative function. This places practical limits to the maximum order that may be used. But, even in cases where computational expense is of no concern, there is a limit to the maximum order of a numerical method, whether implicit or explicit, for which stability remains preserved. It has been shown that an implicit method of order 4 or less is a requirement for guaranteed stability. Using implicit methods above fourth-order may result in greater accuracy, but at the expense of added vulnerability to unstable behavior. Therefore, stable candidates for solving vacuum tube models are first, second, third, and fourth-order implicit methods. First-order methods have already been discarded on the grounds of inferior accuracy. And, whereas third- and fourth-order implicit methods do exist and are numerically stable, their additional computational cost does not usually justify their increased accuracy. Second-order implicit numerical methods, however, offer a compromise between these extremes and are very efficient in estimating the response to the non-linear filter model of a vacuum tube.
A valuable second-order method, the Implicit Trapezoidal method, possesses a nice balance of accuracy, stability, and simplicity making it very desirable in simulating the tube models of interest in real-time audio processing systems. The Implicit Trapezoidal numerical integration method estimates the next value of the solution from its current value and the average of the current and next values of its derivative:
This method preserves stability, is more accurate than the implicit Euler method, and does a well-balanced job of rendering audio simulations of the tube model.
In uniformly sampled discrete-time audio systems, functions are evaluated only at integral multiples of the sampling period, TS:
t=nTS
n=1,2,3, . . .
It is also common to let the step size, h, equal the sampling period:
h=TS
These substitutions enable us to simplify our notation and to use sequences to represent the sampled functions and their derivatives as follows:
Using this simplified notation, it is easier to see how the Implicit Trapezoidal numerical method will be implemented to advance through values of the capacitor voltage:
Substituting the derivative for v, as defined in the non-linear differential equation of the simplified vacuum tube model, into the above expression gives us the difference equation that describes the dynamics of the sampled capacitor voltage, vn:
Here we can introduce a new parameter,
to further simplify the equation above and express vn explicitly:
Again, if the function, ƒ, were a linear function of x and v, then the difference equation above would represent a simple IIR filter and its implementation would follow directly. But, since the function, ƒ, is not linear in the case of the tube model being considered, we need to perform some form of root solving during each sampling interval to solve for vn. Fortunately, the simplified vacuum tube model implemented here defines the function, ƒ, in a way that not only makes the computation of f itself simple, but also allows for a root solving method in the Implicit Trapezoidal numerical integration that is easy to compute as well. Some further simplifications will facilitate the description of this process.
Since vn−1 and yn−1 are known at the outset of the calculation of vn, it is helpful to group them within constants, C1 and C2, used in the calculations during the step interval:
C1 is not exactly constant during the course of the entire simulation and changes value from sample to sample. But, it is helpful to treat it as a constant during each step interval to help simplify the expressions in the root-finding process that follows. In particular, the introduction of these constants simplifies the expression for vn:
vn≈C1+C2ƒ(xn−kvn)
During each sample interval, it is necessary to solve the expression above for vn. To visualize this process, it is helpful to plot both sides of this expression on the same graph with vn as the domain. Examples of this are depicted in
Since the right-hand side equation is defined piecewise over three intervals, the first step in finding the solution for vn is to determine in which of these three intervals the intersection takes place. Examining the definition of the non-linear transfer characteristic curve, f, we recall that it is described piecewise on three intervals. Likewise, ƒ(xn−kvn) is also described on three similar intervals by substitution as follows:
It is helpful here to define vA and vB as the domain values for the endpoints of these three intervals, and to define fA and fB to be the respective values of the right-hand side function at these points. The part of the right-hand side curve for vn>vA will be called the “A-section”, the part for vn<vB will be called the “B-section”, and the middle part for which vB<vn<vA will be called the “Linear-section”.
Now, if the endpoint of the “A-section” lies above the line of unity slope, as the example of
ƒA>vA
Likewise, if the endpoint of the “B-section” lies below the line of unity slope, as shown in the example of
ƒB<vB
If neither of these conditions are true, meaning that both the endpoint of the “A-section” is below the intersecting line and the endpoint of the “B-section” is above the intersecting line, then the point of intersection must occur between vB and vA in the “Linear-section” interval, as is detailed by the example of
Computing values for the endpoints is made by rearranging the conditions of the non-linear transfer characteristic curve to express vn explicitly. The intervals of ƒ(xn−kvn) are defined as
which are rearranged to find vA and vB:
The values of the function at these endpoints are found most easily by evaluating the “Linear-section” at vA and vB:
which after substitutions simplify to:
ƒA=C1+C2(a+d−o)
ƒB=C1+C2(b+d−o)
With numerical values for ƒA, ƒB, vA, and vB, the interval in which the intersection takes place can be determined. If
ƒB<vB
then the intersection occurs in the “B-section”. Otherwise, if
ƒA>vA
then the intersection occurs in the “A-section”. If neither of these conditions are true then the intersection occurs in the “Linear-section”. From these inequalities, the region of intersection is found and the corresponding piecewise equation for ƒ is then solved for vn.
For the case where the intersection occurs in the “A-section”, the following equation is solved for vn:
which, after manipulation, becomes a quadratic in vn:
Applying the quadratic formula,
the solution for vn is obtained. In fact, only the positive root marks the desired solution for vn. The negative root represents an intersection outside the interval defined for the “A-section” and should be ignored.
Similarly, for the case of intersection within the “B-section”, we utilize the following equation to solve for vn:
which also becomes a quadratic in vn, after some manipulation. Again, the solution is found using the quadratic formula with the following values for A, B, and C:
A=−gk
B=k4+gxn+C1gk+C2gk(1−o)
C=−C1gxn−C1k4+C2k3+C2k4o−C2gxn(1−o)
In this case, however, only the negative root represents the solution. The positive root now lies outside the defined interval for the “B-section” and is ignored.
Lastly, in the case when the intersection lies in the “Linear-section”, we solve the following for vn:
vn=C1+C2(gxn−gkvn+d−o)
which simplifies to
With vn now computed, yn is found directly by the evaluation of ƒ(xn−kvn) and is used both as the output sample, and for the value of yn−1 in the subsequent sampling interval.
This step-method can be repeated as often as is needed for each sample of the input stream to produce a stream of corresponding outputs. The method is very accurate, much less demanding than other numerical solvers, and is guaranteed to be stable. Overall, this approach is well matched to the demands of digital audio emulation of distortion and vacuum tube devices, producing accurate and stable results at acceptable levels of computational cost and complexity.
In addition to single tube stages and distortion effects, it may be necessary to emulate the effects of tube power amplification stages in push-pull configurations. This is readily accomplished by using a pair of tube models to process the in-phase and inverted-phase components independently, and combining their outputs appropriately. Referring to
Referring to
There has been described and illustrated herein, a digital signal processing method for tube amplifier emulation. The method of the invention provides a means to emulate the distortion and dynamic characteristics of tube preamplifiers and tube power amplifiers in software running on a computer or other signal processing hardware. Transfer functions of tube preamplifier stages and tube power amplifiers have been described, along with means to use them in non-linear filters and differential equations. Methods of emulating these filters and equations have been presented and a plurality of these methods has been shown to provide a parametrically-controlled emulation of distortion effects, tube amplification and guitar amplification systems. It is to be understood that the invention is not limited to the illustrated and described forms and embodiments contained herein. It will be apparent to those skilled in the art that various changes using different configurations and functionally equivalent components and programming may be made without departing from the scope of the invention. Thus, the invention is not considered limited to what is shown in the drawings and described in the specification and all such alternate embodiments are intended to be included in the scope of this invention as set forth in the following claims.
Number | Name | Date | Kind |
---|---|---|---|
3835409 | Laub | Sep 1974 | A |
4243943 | Cherry | Jan 1981 | A |
4405832 | Sondermeyer | Sep 1983 | A |
4495640 | Frey | Jan 1985 | A |
4672671 | Kennedy | Jun 1987 | A |
4710727 | Rutt | Dec 1987 | A |
4811401 | Brown, Sr. et al. | Mar 1989 | A |
4852444 | Hoover et al. | Aug 1989 | A |
4868869 | Kramer | Sep 1989 | A |
4949177 | Bannister et al. | Aug 1990 | A |
4991218 | Kramer | Feb 1991 | A |
4995084 | Pritchard | Feb 1991 | A |
5032796 | Tiers et al. | Jul 1991 | A |
5131044 | Brown, Sr. et al. | Jul 1992 | A |
5248844 | Kunimoto | Sep 1993 | A |
5321325 | Lannes | Jun 1994 | A |
5524055 | Sondermeyer | Jun 1996 | A |
5528532 | Shibutani | Jun 1996 | A |
5570424 | Araya et al. | Oct 1996 | A |
5578948 | Toyama | Nov 1996 | A |
5596646 | Waller, Jr. et al. | Jan 1997 | A |
5619578 | Sondermeyer et al. | Apr 1997 | A |
5647004 | Sondermeyer et al. | Jul 1997 | A |
5748747 | Massie | May 1998 | A |
5789689 | Doidic et al. | Aug 1998 | A |
5802182 | Pritchard | Sep 1998 | A |
5923767 | Frindle et al. | Jul 1999 | A |
6350943 | Suruga et al. | Feb 2002 | B1 |
6504935 | Jackson | Jan 2003 | B1 |
6611854 | Amels | Aug 2003 | B1 |
8065129 | Rahmat et al. | Nov 2011 | B1 |
20060248518 | Kundert | Nov 2006 | A1 |
20080218259 | Gallo | Sep 2008 | A1 |
Number | Date | Country | |
---|---|---|---|
20110033057 A1 | Feb 2011 | US |