Brno University Of Technology - Ccrma

Transcription

BRNO UNIVERSITY OF TECHNOLOGYVYSOKÉ UČENÍ TECHNICKÉ V BRNĚFACULTY OF ELECTRICAL ENGINEERING AND COMMUNICATIONDEPARTMENT OF TELECOMMUNICATIONSFAKULTA ELEKTROTECHNIKY A KOMUNIKAČNÍCH TECHNOLOGIÍÚSTAV TELEKOMUNIKACÍREAL-TIME DIGITAL SIMULATION OF GUITARAMPLIFIERS AS AUDIO EFFECTSDOCTORAL THESISDIZERTAČNI PRÁCEAUTHORAUTOR PRÁCEIng. JAROMÍR MAČÁK

BRNO UNIVERSITY OF TECHNOLOGYVYSOKÉ UČENÍ TECHNICKÉ V BRNĚFACULTY OF ELECTRICAL ENGINEERING ANDCOMMUNICATIONDEPARTMENT OF TELECOMMUNICATIONSFAKULTA ELEKTROTECHNIKY A KOMUNIKAČNÍCHTECHNOLOGIÍÚSTAV TELEKOMUNIKACÍREAL-TIME DIGITAL SIMULATION OF GUITARAMPLIFIERS AS AUDIO EFFECTSČÍSLICOVÁ SIMULACE KYTAROVÝCH ZESILOVAČŮ JAKO ZVUKOVÝCH EFEKTŮV REÁLNÉM ČASEDOCTORAL THESISDIZERTAČNI PRÁCEAUTHORIng. JAROMÍR MAČÁKAUTOR PRÁCESUPERVISORVEDOUCÍ PRÁCEBRNO 2012Ing. JIŘÍ SCHIMMEL, Ph.D.

ABSTRACTThe work deals with the real-time digital simulation of guitar amplifiers considered asnonlinear analog audio effects. The main aim is to design algorithms which are ableto simulate complex systems in real-time. These algorithms are mainly based on theautomated DK-method and the approximation of nonlinear functions. Quality of thedesigned algorithms is evaluated using listening tests.KEYWORDSNonlinear dynamic system, real-time digital signal processing, digital simulation, audioeffect, guitar amplifier.ABSTRAKTPráce se zabývá číslicovou simulací kytarových zesilovačů, jakož to nelineárních analogových hudebních efektů, v reálném čase. Hlavním cílem práce je návrh algoritmů,které by umožnily simulaci složitých systémů v reálném čase. Tyto algoritmy jsou prevážně založeny na automatizované DK-metodě a aproximaci nelineárních funkcí. Kvalitanavržených algoritmů je stanovana pomocí poslechových testů.KLÍČOVÁ SLOVANelineární setrvačné systémy, zpracování číslicových signálů v reálném čase, digitálnísimulace, hudební efekt, kytarový zesilovač.MAČÁK, Jaromír Real-time Digital Simulation of Guitar Amplifiers as Audio Effects:doctoral thesis. Brno: Brno University of Technology, Faculty of Electrical Engineeringand Communication, Department of Telecommunications, 2012. 198 p. Supervised byIng. Jiří Schimmel, Ph.D.

DECLARATIONI declare that I have written my doctoral thesis on the theme of “Real-time DigitalSimulation of Guitar Amplifiers as Audio Effects” independently, under the guidance ofthe doctoral thesis supervisor and using the technical literature and other sources ofinformation which are all quoted in the thesis and detailed in the list of literature at theend of the thesis.As the author of the doctoral thesis I furthermore declare that, as regards the creationof this doctoral thesis, I have not infringed any copyright. In particular, I have notunlawfully encroached on anyone’s personal and/or ownership rights and I am fully awareof the consequences in the case of breaking Regulation S 11 and the following of theCopyright Act No 121/2000 Sb., and of the rights related to intellectual property rightand changes in some Acts (Intellectual Property Act) and formulated in later regulations,inclusive of the possible consequences resulting from the provisions of Criminal Act No40/2009 Sb., Section 2, Head VI, Part 4.Brno.(author’s signature)

ACKNOWLEDGEMENTFirstly I would like to thank to my supervisor Jiří Schimmel for this interestingtopic and for his valuable advices and remarks which I was given during working onthis topic. I also thank to colleagues from my office for inspiring working environment.Further I would like to thank to Audiffex company for the opportunity toimplement algorithms for the simulation of guitar analog effects in their products,thanks to Lubor Přikryl, CEO of Audiffex, and to Vladimír Tichý, software developerof Audiffex.I have to thank to prof. Udo Zölzer and Martin Holters for the opportunity tospend three amazing months at Helmut Schmidt University in Hamburg. This visitinspired me during last stages of my research.I also have to thank to Oliver Kröning for measuring the tubes from the simulatedpreamp and to all who took part in the listening tests.My greatest thanks belong to my family and girlfriend Dana for support andpatience during writing this thesis.4

Faculty of Electrical Engineeringand CommunicationBrno University of TechnologyPurkynova 118, CZ-61200 BrnoCzech TThe research was performed in laboratories supported by the SIX project; the registrationnumber CZ.1.05/2.1.00/03.0072, the operational program Research and Developmentfor Innovation.Brno.(author’s signature)

CONTENTSList of abbreviations14List of symbols and math operations16Introduction191 State of the Art1.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .1.2 Algorithms Overview . . . . . . . . . . . . . . . . . . . . . . . . . . .1.2.1 Nodal Analysis Simulation Techniques . . . . . . . . . . . . .1.2.2 Numerical Integration of Nonlinear Ordinary Differential Equations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .1.2.3 Simulation by Static Waveshaping and Digital Filter Design .1.2.4 State Space Based Approach . . . . . . . . . . . . . . . . . . .1.2.5 Nonlinear Wave Digital Filters . . . . . . . . . . . . . . . . . .1.2.6 Volterra Series . . . . . . . . . . . . . . . . . . . . . . . . . . .1.3 Recent Advances . . . . . . . . . . . . . . . . . . . . . . . . . . . . .1.3.1 Advances in State-Space Modeling . . . . . . . . . . . . . . .1.3.2 State-Space Approach for Parametric Circuits . . . . . . . . .1.4 Basic Circuit Component Models for Real-time Audio Effect Simulation1.4.1 Discretized Models of Capacitor and Inductor . . . . . . . . .1.4.2 Diode Model . . . . . . . . . . . . . . . . . . . . . . . . . . .1.4.3 Transistor Model . . . . . . . . . . . . . . . . . . . . . . . . .1.4.4 Tube Models . . . . . . . . . . . . . . . . . . . . . . . . . . .1.4.5 Transformer Core Models . . . . . . . . . . . . . . . . . . . .202021222 Goals of Thesis483 Circuit Analysis of Audio Effects3.1 Simulation of Circuits with Audio Transformer . . . . . . . . . . . . .3.1.1 Transformer Model . . . . . . . . . . . . . . . . . . . . . . . .3.1.2 Basic Input Stage with Transformer . . . . . . . . . . . . . . .3.1.3 Push-Pull Tube Amplifier . . . . . . . . . . . . . . . . . . . .3.1.4 Automated Incorporation of Transformer Model into DK-method3.2 Simulation of Circuits with Operational Amplifier . . . . . . . . . . .3.2.1 Incorporation of Operational Amplifier Model into AutomatedDK-method . . . . . . . . . . . . . . . . . . . . . . . . . . . .3.3 Further Considerations Regarding DK-Method . . . . . . . . . . . . .5050515562667223262831343738404243444445467481

3.4Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 854 Approximation of Implicit Nonlinear Circuit Equations864.1 Precomputation of Nonlinear Systems . . . . . . . . . . . . . . . . . . 864.1.1 Precomputation for approximation of nonlinear ODEs . . . . . 874.1.2 Precomputation for approximation of the state-space nonlinearity 894.2 Brief Overview of Function Approximation Techniques . . . . . . . . 914.3 Implementation and comparison of approximation of 1-D function . . 914.3.1 Non-uniform Grid Interpolation . . . . . . . . . . . . . . . . . 934.4 Approximation of N-D function . . . . . . . . . . . . . . . . . . . . . 994.4.1 Non-uniform grid interpolation . . . . . . . . . . . . . . . . . 1034.4.2 Parallel evaluation of interpolations . . . . . . . . . . . . . . . 1044.5 Customized approximation of transfer function . . . . . . . . . . . . . 1064.5.1 Reshaping of transfer function . . . . . . . . . . . . . . . . . . 1064.6 Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1105 Complex System Simulation1115.1 Modified Block-Wise Method . . . . . . . . . . . . . . . . . . . . . . 1115.2 Guitar Tube Amplifier Simulation as a Case Study for Modified Blockwise Method . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1175.2.1 Computational Complexity . . . . . . . . . . . . . . . . . . . . 1235.2.2 Simulation Results . . . . . . . . . . . . . . . . . . . . . . . . 1265.3 Decomposition of the DK-method nonlinear core . . . . . . . . . . . . 1295.3.1 Precomputation . . . . . . . . . . . . . . . . . . . . . . . . . . 1305.3.2 Further Look-up Table Size Reduction . . . . . . . . . . . . . 1315.3.3 Simulation Results . . . . . . . . . . . . . . . . . . . . . . . . 1355.4 DK-model Decomposition Using Connection Components . . . . . . . 1385.5 Simulation of Circuit with Global Feedback . . . . . . . . . . . . . . 1455.6 Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1506 Quality of Simulation of Audio Effect Circuits6.1 Simulation of the Guitar Tube Preamp Engl E530 . . .6.2 Subjective evaluation of guitar tube preamp simulation6.2.1 Results . . . . . . . . . . . . . . . . . . . . . . .6.3 Subjective Comparison of Interpolation Techniques . .6.4 Subjective Comparison of Output Transformer Model .6.5 Audible Aliasing Distortion . . . . . . . . . . . . . . .6.6 Summary . . . . . . . . . . . . . . . . . . . . . . . . .7 Conclusion.152. 152. 159. 161. 162. 163. 163. 165166

Author’s Publications169Bibliography171List of appendices179A Interpolation Techniques Comparison180B Implementation of Interpolation Formulas182C Incidence Matrices for Fender Type Preamp184D Incidence Matrices for Marshall Preamp185E Incidence Matrices for Marshall Preamp with the Decomposition 187F K matrix for Marshall Preamp with the Decomposition189G Instructions for Listening Tests190H Answer Form for Listening Tests192I195DVD content

LIST OF Block diagrams of Wiener (top), Hammerstein (middle) and WienerHammerstein nonlinear model. . . . . . . . . . . . . . . . . . . . . . .Block diagram of guitar amplifier . . . . . . . . . . . . . . . . . . . .Model of a transformer with two windings. . . . . . . . . . . . . . . .Magnetic part of gyrator-capacitor transformer model. . . . . . . . .A transformer connected with a symmetrical voltage signal source. . .Output signal of the input stage circuit. . . . . . . . . . . . . . . . .Hyseresis loop of transformer models used in input stage circuit. . . .Solution of input stage nonlinear function with Frohlich model. . . . .Solution of input stage nonlinear function with the GC model. . . . .Circuit schematic for push-pull power tubes part of the tube poweramplifier. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .Ouput signals of the push-pull amplifier for different transformer models.Distortion analysis of the push-pull amplifier with the linear model ofthe output transformer. . . . . . . . . . . . . . . . . . . . . . . . . . .Distortion analysis of the push-pull amplifier with the nonlinear modelof the output transformer. . . . . . . . . . . . . . . . . . . . . . . . .Stamp of linear transformer model for conductance matrix . . . . . .Stamp of nonlinear transformer model for the conductance matrix . .Circuit schematic for the inverting amplifier (left) and comparator(right). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .Transfer function of the inverting amplifier with model of OPA forreal-time processing. . . . . . . . . . . . . . . . . . . . . . . . . . . .Transfer function of the inverting comporator with model of OPA forreal-time processing. . . . . . . . . . . . . . . . . . . . . . . . . . . .Solution of the nonlinear equation for the comparator circuit usingDK-method. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .Solution of the nonlinear equation for the comparator circuit usingequation (3.115). . . . . . . . . . . . . . . . . . . . . . . . . . . . . .Solution of the nonlinear equation for the inverting amplifier. . . . . .Circuit schematic of the simple LFO generator. . . . . . . . . . . . .Transient analysis of the LFO generator simulated with the DK-method.Circuit schematic for triode tube amplifier. . . . . . . . . . . . . . . .Computational cost of interpolation algorithms. Measured for onemillion of interpolations. . . . . . . . . . . . . . . . . . . . . . . . . .Circuit schematic of the nonlinear core of the Distortion effect. . . . .Approximation of the transfer function of the diode clipper circuit. . 49597

85.95.105.115.125.135.145.155.16Error of the approximations of the transfer function of the diodeclipper circuit. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 98Average error of the approximations of the transfer function of thediode clipper circuit. . . . . . . . . . . . . . . . . . . . . . . . . . . . 98Number of operations required by 𝑁 -dimensional interpolation. . . . 101Number of coefficients to be stored for 𝑁 -dimensional interpolation.Spline interpolation 2 and 3 are the same as well as Linear, Hermiteand Newton are the same. . . . . . . . . . . . . . . . . . . . . . . . . 101Computation time of one million 𝑁 -D interpolations. . . . . . . . . . 102The transfer function of the tube preamp . . . . . . . . . . . . . . . . 107Reshaping coefficients dependency on cathode capacitor voltage . . . 109Reshaped transfer function of the tube preamp. . . . . . . . . . . . . 109Example of decomposition into separate blocks using the modifiedblock-wise method. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 112Circuit schematic for typical tube amplifier stage. . . . . . . . . . . . 113Input volt-amper characteristics (top) and resistance (bottom) of tubeamplifier stage. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 114Transfer function of the tube amplifier stage with different load resistor.114Transient analysis of the tube amplifier stages with the nonlinear loadand the constant load. . . . . . . . . . . . . . . . . . . . . . . . . . . 115Comparison of the output signals for different load resistor in the tubestage connected as the nonlinear load. . . . . . . . . . . . . . . . . . . 116Comparison of the output signals of the first tube stage with one andtwo tube stages connected in series as the nonlinear load. . . . . . . . 117Circuit schematic for the guitar preamp with four tube stages and itsdecomposition into three blocks. . . . . . . . . . . . . . . . . . . . . . 118Circuit schematic of the block 1 of the decomposed tube preamp. . . 120Circuit schematic of the block 1 and 2 of the decomposed tube preamp.120Approximating functions for the simulation of the system (5.1) . . . 121Approximating functions for the simulation of the system (5.1). . . . 122Simulation results for a logarithmic sweep signal. The plate voltagesignals of all tubes are displayed. . . . . . . . . . . . . . . . . . . . . 127Comparison between simulation results using the numerical solutionand using approximations for a part of the real guitar riff. Only theerror signals are displayed. . . . . . . . . . . . . . . . . . . . . . . . . 128Circuit schematic of the Fender type guitar preamp. . . . . . . . . . . 130Output signals (top, dashed line for the numerical solution) and thedifference between numerical and approximated solution in the timedomain without the parameter interpolation. . . . . . . . . . . . . . 136

5.17 Difference betweenthe numerical and approximated solution in thetime frequency without the parameter interpolation. The numericalsolution (dashed line) is shifted to the right. . . . . . . . . . . . . . . 1375.18 Output signals (top, dashed line for the numerical solution) and thedifference between the numerical and approximated solution in thetime domain with the parameter interpolation. . . . . . . . . . . . . 1375.19 Difference between the numerical and approximated solution in thetime frequency with the parameter interpolation. The numericalsolution (dashed line) is shifted to the right. . . . . . . . . . . . . . . 1385.20 Circuit schematic of the Marshall JCM 800 guitar preamp. . . . . . . 1395.21 Circuit schematic of the Marshall JCM 800 guitar preamp with thedecomposition into blocks. . . . . . . . . . . . . . . . . . . . . . . . . 1415.22 Output signals (top) and their difference (bottom) for the simulationof Marshall preamp with and without the decomposition . . . . . . . 1455.23 Circuit schematic of the tube power amplifier. . . . . . . . . . . . . . 1475.24 Frequency response magnitude of the first harmonic component fordifferent topologies of the circuit for parameter ”Presence” set to zero. 1495.25 Frequency response magnitude of the first harmonic component fordifferent topologies of the circuit for parameter ”Presence” set to one. 1495.26 Frequency response magnitude of measured loudspeaker cabinets –the Mesa Boogie Rectifier and the Marshall JCM 800. . . . . . . . . . 1506.1 Comparison of measured and simulated voltage signals at plate terminals of the tubes for input sine wave with the amplitude 0.5 V. . . . . 1536.2 Comparison of measured and simulated voltage signals at plate terminals of the tubes for input sine wave with the amplitude 2 V. . . . . . 1546.3 Comparison of measured and simulated frequency responses (for thefirst harmonic content). . . . . . . . . . . . . . . . . . . . . . . . . . . 1546.4 Spectrogram of the output signal - measured clean channel. . . . . . . 1556.5 Spectrogram of the output signal - simulated clean channel. . . . . . 1556.6 Comparison of measured and simulated voltage signals at plate terminals of the tubes for input sine wave with the amplitude 0.5 V. . . . . 1566.7 Comparison of measured and simulated voltage signals at plate terminals of the tubes for input sine wave with the amplitude 2 V. . . . . . 1576.8 Comparison of measured and simulated frequency responses (for thefirst harmonic content). . . . . . . . . . . . . . . . . . . . . . . . . . . 1576.9 Spectrogram of the output signal - measured crunch channel. . . . . . 1586.10 Spectrogram of the output signal - simulated crunch channel. . . . . . 158

LIST OF .3Values of circuit components of input stage circuit. . . . . . . . . . .Parameter of Frohlich and GC-model of transformer core. . . . . . .Parameter of JA-model of transformer core. . . . . . . . . . . . . . .Number of iterations of Newton-Raphson method. . . . . . . . . . .Values for circuit elements for push-pull power tubes part of the tubepower amplifier. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .Parameter of Frohlich and GC-model of the transformer core for thetransformer Fender NSC041318. . . . . . . . . . . . . . . . . . . . . .Values of circuit components for the LFO generator. . . . . . . . . .Computational cost comparison of interpolation algorithms. . . . . .Element values for schematic on Figure 4.3 . . . . . . . . . . . . . . .Comparison of the number of data points required for approximationof diode clipper circuit. . . . . . . . . . . . . . . . . . . . . . . . . . .Maximal number of interpolations per sample for 𝑓s 48 kHz. . . . .Maximal number of interpolations per sample for 𝑓s 192 kHz. . . .Values for circuit components for typical tube amplifier stage. . . . .Values for circuit components for the guitar preamp. . . . . . . . . .Look-up table for simulation of the first block. . . . . . . . . . . . . .Look-up table for simulation of the second and third block. . . . . . .Computational complexity comparison of the simulations based onthe Newton method – the number of operations. . . . . . . . . . . . .Computational complexity comparison of the simulations based onapproximations – the number of operations. . . . . . . . . . . . . . .Errors for the simulation from Figure 5.14. The plate voltage signalerrors are displayed. . . . . . . . . . . . . . . . . . . . . . . . . . . .Component values of the Fender type guitar preamp . . . . . . . . . .Ranges of p parameters. . . . . . . . . . . . . . . . . . . . . . . . . .Ranges of K coefficients. . . . . . . . . . . . . . . . . . . . . . . . . .Covariance between precomputed functions and inputs. . . . . . . . .Description of the look-up tables – number of intervals . . . . . . . .Data size of the look-up tables. . . . . . . . . . . . . . . . . . . . . .Component values of the Marshall JCM 800 guitar preamp . . . . . .Component values of the tube power amplifier. . . . . . . . . . . . . .Results of subjective evaluation of preamp simulation. . . . . . . . . .Results of the comparison of interpolation techniques using the listening test. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .Results of transformer model listening test. . . . . . . . . . . . . . . 9131131132135135139146161163164

6.4Results of audible aliasing distortion listening test. . . . . . . . . . . 164

LIST OF ABBREVIATIONSASIO Audio Stream Input/OutputBCT Binary Connection TreeBEBackward Euler FormulaBJT Bipolar Junction TransistorDCDirect CurrentDSP Digital Signal ProcessingFEForward Euler FormulaFIR Finite Impulse ResponseGCGyrator-CapacitorGUI Graphical User InterfaceIIRInfinite Impulse ResponseJAJiles-AthertonJFET Junction Field Effect TransistorKCL Kirchhoff’s Current LawKVL Kirchhoff’s Voltage LawLMS Least Mean SquareLHS Left Hand SideLFO Low Frequency OscillatorMMF Magneto-Motive ForceMNA Modified Nodal AnalysisODE Ordinary Differential EquationsOPA Operational AmplifierPCA Principal Component AnalysisRFP Reflection Free Port14

RHS Right Hand SideRKRunge-KuttaSIMD Single Instruction Multiple DataSPICE Simulation Program with Integrated Circuit EmphasisSSE Streaming SIMD ExtensionsSVD Singular Value DecompositionTHD Total Harmonic DistortionTRTrapezoidal RuleVST Virtual Studio TechnologyWDF Wave Digital Filter15

LIST OF SYMBOLS AND MATH OPERATIONSA, B, CDK-method matrixAo , Bo , CoK-method matrix𝐵magnetic flux density𝐵SATmagnetic flux density in saturation𝐶capacitanceD, E, FDK-method matrix𝑓ssampling frequencyΦmagnetic fluxΦSATmagnetic flux in saturationG, H, KDK-method matrixGconductance matrixGrresistor conductance matrixGxenergy-storing component conductance matrix𝐺conductance𝐻magnetic forceℎ𝑁𝑁 -dimensional impulse response (Volterra kernel)𝑓 ()nonlinear functionℱmagnetomotive force𝑖, icurrent, vector of currents𝑖indexIidentity matrix𝑖Bbase current𝑖Ccapacitor current, collector current𝑖Eemitor current𝑖ggrid current𝑖Linductor current𝑖pplate current𝑖Ssaturation current16

𝑖sscreen current𝑖connconnection currentJJacobian matrix𝐿inductance𝑙maglength of magnetic path𝑀magnetization𝜇permeability, tube amplification factorMconductance matrixMxconductance matrix for state variablesMuconductance matrix for input variablesMnconductance matrix for nonlinear componentsNnnonlinear component incidence matrixNooutputs incidence matrixNOPAoperational amplifier incidence matrixNrresistor incidence matrixNttransformer incidence matrixNuinputs incidence matrixNvvariable component incidence matrixNxenergy-storing component incidence matrix𝑂()computational complexity𝑝complex Laplace parameterpinput variable for DK-methodR𝑁𝑁 -dimensional Eucleidian space𝑅resistanceℛreluctance𝑆cross-section areaSconductance matrixSOPAconductance matrix with operational amplifier modelStconductance matrix with transformer model17

𝑇sampling period𝑥input variable, state variableuinput vectorxstate vectorẋtime derivation of state vector𝑣, vvoltage, vector of voltages𝑣Tthermal voltage𝑧complex parameter in Z domain18

INTRODUCTIONDigital signal processing influences many fields of human interests these days andtogether with the progress of computer science it addresses many of new applications.One of these applications is digital audio signal processing in computers. Originalanalog records on magnetic tapes have been replaced with digital records on harddisk drives in recording studios. Furthermore, an additional processing of audiosignals by audio effects, such as compressors and equalizers, is replaced by digitalsignal processing using real-time digital audio effects. Basically, the digital audioeffects work similarly as their analog prototypes, but the output audio signal usuallydiffers. Some musicians claim that the digital audio effects sound too accurate andthin, and therefore they prefer the analog audio effects. Because of this, there is a bigeffort to simulate these analog audio effects digitally, including their imperfections,such as nonlinear distortion of audio signals, nowadays. A special category of theseaudio effects is built by simulations of guitar amplifiers and effects where nonlineardistortion is required and the aim is to get the same nonlinear distortion like theanalog prototypes have.These new technologies can be used in recording studios, either home or professional, but they are also part of audio multi-effects for live performance and evenguitar amplifiers with digital signal processors can be found on the market. Thebiggest advantage is universality of these systems – simulations of several analogdevices, which are often large and expensive, can be inside one system. The only onedisadvantage is that the simulation is still insufficiently accurate, but this improveswith the new algorithms and more powerful processors.Simulated devices can be usually split into two categories. The first one containslinear systems and analog devices which have very small amount of nonlinear distortion. To simulate these devices, quite simple and common techniques, such digitalfilters designed according to analog prototypes, can be used.The other category contains strongly nonlinear systems. To analyze and simulatethis type of systems, more complex techniques, which often have enormous computational demands, must be used. Therefore, there is effort to find such algorithms thatwill lead to the same audio perception as the simulated nonlinear system, while thecomputational demands will stay relatively low to be workable in real-time.19

1STATE OF THE ARTAn overview of algorithms for simulation of audio effects will be given in this chapter.Basic circuit components used for these simulations will be described as well. Finally,recent advances in improvement of the algorithms will be mentioned.1.1IntroductionDevelopment of algorithms for simulation of analog electronic circuits has begunwith computer programs for analysis of the electronic circuits. Program SimulationProgram with Integrated Circuit Emphasis (SPICE) [13] is a typical example of suchprograms. This program and its derivations have been developing since 1973. Theyhave undergone many improvements and optimizations since then. However, themain algorithm, which is analysis of circuit nodes and numerical solution of circuitequations, remains the same. The time-domain simulation of nonlinear audio effectshere is related to the transient analysis of given circuits. These programs nowadaysallow simulation of majority of electronic circuits (analog, digital, audio circuits,power circuits, etc.), but this generality of algorithm has enormous computationaldemands and thus, they are not suitable for real-time simulations.In the case of audio effects, the generality of the simulation algorithm is notnecessary. In spite of generality, attention is rather paid to several typical circuitswhich can be simplified, approximated and optimized without loosing the same audioperception. Therefore, it is important to understand how the analog audio effectswork in order to design proper simplifications (e.g. division into several separateblocks according to their function). The simplified blocks can be then simulatedusing different algorithms exploiting benefits which different algorithms provide.A block that implements a nonlinear function is the basic block of all nonlinearalgorithms. This nonlinear block can be implemented as memoryless (static) orwith memory (dynamic). Both cases produce higher harmonics which spread thesignal spectrum [14]. A digital signal which originally complied Nyquist theorem nowcontains higher harmonics which do not comply Nyquist theorem anymore, whichresults in generation of aliasing distortion. Some algorithms are designed in suchway that aliasing distortion can be removed by connecting a low-pass filter beforethe block with the nonlinear function which will filter out all higher frequencieswhich would cause aliasing distortion [14]. Generally, it is possible to reduce aliasingdistortion using the over-sampling technique – the input signal is several times upsampled, then processed by the nonlinear function and finally down-sampled [14, 15].But even this technique will not remove aliasing distortion completely, because whenone simulates extreme nonlinearities, where Fourier series goes to infinitive, the20

over-sampling factor would have to be very high and so would be computationaldemands. In this case, one has to make use of psychoacoustics and design theover-sampling factor in such way that aliasing distortion will be masked with themasking threshold. This approach requires thorough analysis of the algorithm forgiven set of input signals and the over-sampling factor can be designed on the basisof listening test or psychoacoustic models of masking. Attempts to analyze aliasingdistortion using the masking effect can be found in [16, 17].1.2Algorithms OverviewGenerally, the algorithms for simulation of analog audio effects can be classified intoseveral categories – a black box approach or a white box approach, with linear ornonlinear transfer function, etc. Good overview can be found e.g. in literature [18].The black box or white box approach differ in the fact whether the inner structureof simulated systems is known. In case of the black box approach (u

Faculty of Electrical Engineering and Communication Brno University of Technology Purkynova 118, CZ-61200 Brno . 4.7 Numberofoperationsrequiredby -dimensionalinterpolation. . . .101 . In the case of audio effects, the generality of the simulation algorithm is not