# From blues to rock to jazz: three different web audio tube guitar amplifier simulator plugins

Jerome Lebrun, Michel Buffa, Jordan Sintes

<figure><img src="image_1.png" /></figure>

## ► To cite this version:

Jerome Lebrun, Michel Buffa, Jordan Sintes. From blues to rock to jazz: three different web audio tube guitar amplifier simulator plugins. WAC 2022 - Web Audio Conference 2022, Université Côte d'Azur, France, Jul 2022, Cannes, France. 10.5281/ZENODO.6769408. http-03726153

HAL Id: hal-03726153

https://hal.science/hal-03726153v1

Submitted on 26 Oct 2022

HAL is a multi-disciplinary open access archive for the deposit and dissemination of scientific research documents, whether they are published or not. The documents may come from teaching and research institutions in France or abroad, or from public or private research centers.

L'archive ouverte pluridisciplinaire HAL, est destinée au dépôt et à la diffusion de documents scientifiques de niveau recherche, publiés ou non, émanant des établissements d'enseignement et de recherche français ou étrangers, des laboratoires publics ou privés.

<figure><img src="image_2.png" /></figure>

Distributed under a Creative Commons CC BY 4.0 - Attribution - International License
# From blues to rock to jazz : three different web audio tube guitar amplifier simulator plugins

Jerome Lebrun

Université Côte d'Azur, CNRS,
lebrun@i3s.unice.fr

Michel Buffa, Jordan Sintes

Université Côte d'Azur,
Michel.buffa@univ-cotedazur.fr,
[jordan.sintes@gmail.com](mailto:jordan.sintes@gmail.com)

## ABSTRACT

We propose to present a set of web audio plugins specialized in three kinds of sounds.... The first one targets blues / classic rock sounds and proposes a drop down menu with presets that go from clean warm blues like the tones used by BB King, to more classic rock/blues distorted sounds used by Jimmy Hendrix or AC/DC. The second one is aimed to Hi Gain/Metal sounds similar Mesa Boogie type sounds, and the third one is an acoustic guitar simulator (use an electric guitar and get an acoustic folk guitar sound). These plugins are partially available in open source, but the versions we propose to demo are commercialized by our laboratory (French CNRS/SATT Sud-Est) and included in some commercial DAWs.

<figure><img src="image_3.png" /><figcaption>Figure 1: The AmpSim Utility plugin is useful for adjusting input gain and merging/muting left and right channels. It also includes a multi-channel noise gate.</figcaption></figure>

## 1. Introduction and related works

In 2012, Google Chrome proposed for the first time a low-latency opportunity to get live audio from a microphone or other audio inputs. Soon, Opera, Firefox and Microsoft Edge also implemented this. Chris Wilson's "Input Effects" demo was one of the first to show real-time sound processing effects written with Web Audio, and proposed implementations of famous effects such as delay, distortion, wah, etc. This impressive demo proved that low latency processing was achievable. Getting close to the real sound of an analog guitar amplifier remained nevertheless quite a challenge that Chris Wilson's examples did not fully address.

Many papers have been written about vacuum-tube guitar amplifiers modeling and about the characteristics of linear and non-linear distortion effects suited for guitars [4-7]. Two main approaches are usually considered for the simulation of the different parts of a guitar amplifier: one is called the technique of virtual analog aka physical modeling. It consists in processing the electronic schematics using tools like the industry standard SPICE analog circuit simulator to translate the circuit into equations to be solved hopefully in real-time. These general equations are typically

nonlinear differential algebraic equations and may be solved using integration methods, roots solver algorithms, and sparse matrix techniques. SPICE can even produce C++ code ready to be executed. However, it is often necessary to make huge simplifications and optimizations to achieve real-time processing. This is particularly the case with the modeling of the vacuum tubes used in guitar amplifiers and their interactions with other parts of the circuitry (see [2] and [8] for a review of common techniques, and [9] for the method used by authors of the Guitarix.org project).

Another technique consists in a higher-level emulation, in which "logical" parts are identified (filters, tubes, etc.) and may be emulated manually or by machine learning [10-14] (as with the Kemper profiler/Guitar Rig 6 from Native Instruments, with Neural DSP's gears or Deepmind's WaveNet music generators) using

<figure><img src="image_4.png" /><figcaption>Figure 2: guitar amp sim plugins in AmpedStudio DAW</figcaption></figure>

separate or global, explicit or hidden models to achieve perceptual equivalence.

When we started to tackle this problem five years ago [16], the separate, explicit approach was clearly the simpler and more adapted one to the Web Audio ecosystem esp. its limitations at the time (e.g. custom processing on audio samples was not usable without introducing latency or glitches, AudioWorklet node was not available). Furthermore, the Web Audio API provides high-level nodes (such as the WaveShaper node and the biquad filter node) that can be used for an easy, quite accurate modelisation of tubes and filters. Namely, when properly used, waveshaping techniques associated with oversampling and appropriate filtering give quite good results [1]. The famous pod XT effect processor by Line 6 relies on such techniques [15].

Anyhow, we followed this "perceptual" approach consisting in emulating the different parts of the electronic circuit of this amplifier using Web Audio, implementing the necessary signal processing algorithms using the available API, and finding
adequate solutions to circumvent some limitations specific to the Web browser environment (thread priority, latency, JavaScript API limitations). Finally, we extensively compared (quantitatively and qualitatively) our realization with the state of the art, i.e. native simulations, mostly commercial, written in C++, and not having the constraints of webapps. These results exceeded our expectations. Meanwhile, we went on refining the models used in the simulation, and designed a new framework to reproduce different electronic architectures present in various tube amplifiers found in many musicians' equipment [17]. We can now simulate for example a Fender, a Vox or a Mesa Boogie amplifier, etc. or even create new original designs. These customizable simulations have been tested by professional guitarists, are being used by music schools on an experimental basis and are the subject of a marketing contract by the CNRS in order to be included as plugins [18,19] in an online commercial DAW (AmpedStudio.com, see Fig. 2).

Since 2017, we have been developing Web Audio tube guitar amplifier simulations and tools, including an "amp sim designer" that can generate configurations used by an amp sim plugin engine that facilitates the process of creating end user plugins for musicians. To create each amp sim plugins presented in this demo, we proceeded as followed: we experimented with all the internals of our simulation : preamp, tonestack, power amp, reverb, speaker simulation stages, by adjusting gains, filters, tube types, number of tubes, internal topography of the audio graph, speaker impulse types, etc. Some stages of these plugins might not be based on high level audio nodes, in particular when sample accuracy DSP processing is needed (like in the power amp stage, where a negative feedback loop is present). In that case we used the FAUST DSL to generate WebAssembly code [20]. In a second step we created the GUI of the plugin, and in a third step we adjusted manually the ranges of the different parameters/knobs, by testing and fine tuning the plugin behavior. The plugins have been developed following the Web Audio Modules 2.0 plugin standard [21].

## 2. Sound quality of our simulations

The plugins we developed can be tried with the AmpedStudio.com DAW (Fig 3) by creating a track and by adding in the plugin chain the AmpSim Utility plugin (Fig. 1) that is useful for adjusting gains, selecting the left/right channel (as the guitar signal is generally mono), and for activating a WebAssembly multi-channel noise gate., then one of the amplifier simulators, eventually with other audio effects for guitarists.

It is possible to get a taste of the sound quality provided by these plugins by visiting a web page we prepared with dry guitar sounds and the same sounds recorded with our plugins<fnref n="1" />. Only the plugins from Fig. 2 and Fig. 3 have been used. In addition, several videos are available online, showing these plugins in action :

* The Blues Machine : https://youtu.be/iZLTLNierAY

* The Clean Machine (acoustic guitar simulator, in the video the guitar has regular non-piezo pickups):
https://youtu.be/shorts/VM mrTegeVA and

<figure><img src="image_5.png" /><figcaption>Figure 3 : the three guitar amplifier simulators WAM plugins</figcaption></figure>

These plugins are now commercialized by our laboratory. They can be seen as “premium versions with extra features” of other open source projects we already published [16-19]. For example, the Amp Designer that has been used for designing these plugins, as well as a previous version of the Blues Machine amp simulator (named Distortion Machine) plugin are available as open source projects<fnref n="2" /> and you can see other videos of these versions<fnref n="3" />.

## 3. Settings for the demo

Our simulation can be played real-time with a real guitar. As of today, we recommend for the best experience to use MacOS and a low latency sound card. By using a real guitar, we propose to compare our Web Audio based tube amp simulation with native simulations such as Guitar Rig by Native Instruments (used by many musicians and guitarists), with GarageBand amp simulations and with Guitarix, an open source native amp simulator. The referenced papers contain user evaluations showing that the sound quality, latency and feeling guitar in hands of these simulations are comparable to the state of the art from the native world.

<footnote n="1">¹ http://mainline.i3s.unice.fr/distortionBook/sounds/</footnote>

<footnote n="2">² https://github.com/webaudiomodules/wam-examples, and
https://mainline.i3s.unice.fr/AmpSim5/</footnote>

<footnote n="3">³ https://www.youtube.com/watch?v=PiOD7n3g-Qs (demo of hi-gains distortion in our amp simulations),
https://www.youtube.com/watch?v=DUM99xQt5fg and
https://www.youtube.com/watch?v=lIfm9ZMtG-I (professional guitar players using the amp sim),</footnote>

<footnote>https://www.youtube.com/watch?v=qYzd5WGEbrM</footnote>

<footnote>* The Metal Machine: https://youtu.be/4epx LUAVuMQ and
https://youtu.be/dLDoNquJYbc</footnote>

<footnote>* These plugins in the AmpedStudio DAW:
https://www.youtube.com/watch?v=js_YOthpyuo</footnote>

<footnote>* These plugins in the Wasabi Pedalboard host :
https://www.youtube.com/watch?v=rViUD9VWFFM</footnote>

<footnote>https://www.youtube.com/watch?v=-NdMdJQx2Bw (amp designer, useful to create new amp sim plugins,
https://www.youtube.com/watch?v=zBhn7odezUQ (dynamic transfer curves adjustment for tubes, for simulating tube nonlinear temporal behavior),
https://www.youtube.com/watch?v=CPDgbRpLcBM (low-latency + very fast hi-gain demo with live guitar playing)</footnote>
# 4. REFERENCES

[1] G2 Workshops and tutorials: Waveshaping and distortion. Accessed Dec. 2020 from https://rhordijk.home.xs4all.nl/G2Pages/Distortion.htm

[2] Pakarinen, J. and Yeh, D. T. (2009). A review of digital techniques for modeling vacuum-tube guitar amplifiers. *Computer Music Journal*, **33**(2), 85-100.

[3] Holmes, B. and van Walstijn, M. (2015, Dec.). Improving the robustness of the iterative solver in state-space modeling of guitar distortion circuitry. In *Proc. 18th Int. Conference on Digital Audio Effects (DAFx-15)*, Trondheim, Norway.

[4] Chang, C. H. (2011). DESC9115: Digital Audio Systems-Final Project Overdrive/Distortion. In *Repository of Tech. Reports, University of Sydney, Australia*. http://hdl.handle.net/2123/7608

[5] Macak, J. and Schimmel, J. (2010, Sep.). Real-time guitar tube amplifier simulation using an approximation of differential equations. In *Proc. 13th International Conference on Digital Audio Effects (DAFx-10)*, Graz, Austria.

[6] Yeh, D. T., Abel, J. S., Vladimirescu, A. and Smith, J. O. (2008). Numerical methods for simulation of guitar distortion circuits. *Computer Music Journal*, **32**(2), 23-42.

[7] Difilippo, D. and Greenebaum, K. Audio anecdotes: Tools, tips, and techniques for digital audio, *Vol.1, Routledge, AK Peters, Natick, MA, USA*. (2004). ISBN 9781568811048

[8] Yeh, D. T. and Smith, J. O. (2006, Sep.). Discretization of the '59 Fender Bassman tone stack. In *Proc. 9th Int. Conference on Digital Audio Effects (DAFx-06)*, Montreal, Canada.

[9] Macak, J. Real-time digital simulation of guitar amplifiers as audio effects. *PhD Thesis, TU Brno, Czech Republic*, (2012).

[10] Rollo, C. Black-Box modelling of nonlinear audio circuits. *MSc Thesis, Aalto University, Finland*, (2018).

[11] Eichas, F., Möller, S. and Zölzer, U. Block-oriented modeling of distortion audio effects using iterative minimization. In: *Proc. Int. Conf. on Digital Audio Effects (DAFx-15)*, Trondheim, Norway, (2015).

[12] Eichas, F., Möller, S. and Zölzer, U. Block-oriented gray box modeling of guitar amplifiers. In: *Proc. Int. Conf. on Digital Audio Effects (DAFx-17)*, Edinburgh, UK, (2017).

[13] Schmitz, T. Nonlinear modeling of the guitar signal chain enabling its real-time emulation. *PhD Thesis, University of Liege, Belgium*, (2019).

[14] Wright, A., Damskägg, E.-P., Juvela, L. and Välimäki, V. Real-Time guitar amplifier emulation with deep learning. *Appl. Sci. 10*(766), (2020).

[15] Yeh, D. T., Abel, J. S., Vladimirescu, A., and Smith, J. O. Numerical methods for simulation of guitar distortion circuits. *Computer Music Journal*, **32**(2), (2008).

[16] Buffa, M. and Lebrun, J. Real time tube guitar amplifier simulation using WebAudio. In: *Proc. Web Audio Conference (WAC'2017)*, London, UK, (2017). (hal-01589229)

[17] Buffa, M. and Lebrun, J. WebAudio virtual tube guitar amps and pedal board design. In: *Proc. Web Audio Conference (WAC'2018)*, Berlin, Germany, (2018). (hal-01893781)

[18] Buffa, M., Lebrun, J., Kleimola, J., Larkin, O., Pellerin, G. and Letz, S. WAP: Ideas for a Web Audio plug-in standard. In: *Proc Web Audio Conference (WAC'2018)*, Berlin, Germany, (2018). (hal-01893660)

[19] Buffa, M. and Lebrun, J., 2018, September. Guitarists will be happy: guitar tube amp simulators and FX pedals in a virtual pedal board, and more! In: *Proc Web Audio Conference (WAC'2018)*, Berlin, Germany, (2018). (hal-01893681)

[20] Ren, S., Letz, S., Orlarey, Y., Michon, R., Fober, D., Buffa, M. and Lebrun, J. Using Faust DSL to develop custom, sample accurate DSP code and audio plugins for the Web browser. *J. Audio Eng. Soc.*, **68**(10), (2020) pp.703-716. (hal-03087763)

[21] Buffa, M., Ren, S., Campbell, O. and al. "Web Audio Modules 2.0, an open Web Audio plugin standard", In *Companion Proceedings (Developer's track) of the The Web Conference 2022 (WWW '22, ranked A*)*, April 2022, Lyon, France. Accepted, to be presented.