# Wave Digital Filters applied to the Dunlop "Fuzz Face" Distortion Circuit

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

## Project Overview

Due to recent theoretical developments in "Virtual Analog" and nonlinear physical modeling, many vintage analog effects are now able to be digitized and modeled efficiently within a Wave Digital Filter (WDF) framework. In my project, I plan to brush up on the math behind the new WDF modeling schemes by analyzing the iconic Dunlop "Fuzz Face" distortion pedal through a WDF lens. My goals for the quarter are as follows:

1) Catch up on all of the recent literary developments regarding WDFs.

2) Analyze the particular stages and components of the original analog "Kirchoff" domain circuit in SPICE.

3) Extract the key parameters from the analog components that contribute to the signature tone of the effect.

4) Convert the circuit into a real-time, computable Binary Connection Tree (BCT) WDF model using the new nonlinear modeling techniques.

5) Simulate the WDF version of the circuit using MATLAB and compare to the original version.

6) (if possible) Use the alpha release of the C++ WDF Framework being developed in CCRMA to make a VST plugin of the filter.

## Week 1

I was first introduced to WDF's last year in JOS's physical modeling course: MUSIC 420. I took this week to look over the WDF section in Physical Audio Signal Processing by Julius Orion Smith III ([1])

Below are some of the main takeaways:

1) Every delay element in a WDF can be interpreted physically as holding the current state of a mass or spring (or capacitor or inductor).

2) WDFs are finite-difference schemes that have unusually good numerical properties

3) Voltages and currents (forces and velocities) are viewed in the traveling wave domain instead of the Kirchoff domain.

4) Each circuit component (voltage sources, capacitors, resistors, inductors) has a simple discrete time model in the wave domain. These components are connected using "adaptors" (series or parallel) based on Wave Scattering Theory.

I look forward to reviewing the examples in link provided above to refresh on the properties of WDFs.

## Week 2

After working through some basic examples found in MUSIC 420, I reached out to CCRMA's own Ross Dunkel, who is currently researching WDF applications towards a digital model of the Fender Bassman amplifier. I knew that Ross was working on a standardized C++ library for making WDF-based VST plugins with visiting scholar Maximilian Rest. According to Ross, the framework is almost ready for a local "Alpha" release. I discussed my interest in building a WDF-based VST plugin/audio effect with the framework. Ross suggested the Dunlop Fuzz Face as a prime example to work on.

After selecting my circuit, I asked Ross for some advice on how to incorporate nonlinear elements into a WDF. All of the examples I've covered have only dealt with linear circuit elements in either series or parallel connections.

Ross directed me towards Kurt Werner's (CCRMA) research and other pivotal references below:

-Werner DAFx 2015 RESOLVING WAVE DIGITAL FILTERS WITH MULTIPLE/MULTIPORT NONLINEARITIES[2]

-Werner DAFx 2015 WAVE DIGITAL FILTER ADAPTORS FOR ARBITRARY TOPOLOGIES AND MULTIPORT LINEAR ELEMENTS [3]

-Werner WASPAA 2015 [4]

-de Sanctis and Sarti Virtual Analog 2010 [5]

## Week 3

In order to digitize the Fuzz Face, I reviewed all of the stages of the analog circuit. Due to its characteristic tone and historical significance, there are many web pages devoted to the analysis of the circuit. These are the two most informative.

1) Electrosmash Fuzz Face Analysis [6]

2) Geofex [7]

The circuit is a two stage amplifier with a feedback stage. The feedback network holds all of the important characteristics.

According to various sources (including the ones linked above), the FuzzFace's signature tone comes from its use of the matched pair of AC128 NPN Germanium Transistors. Commonly accepted to produce a smoother and less harsh tone than the more reliable silicon counterparts, the AC128's have a shorter lifespan and their parameters can vary drastically from component to component. These transistors, however, are key to achieving the asymmetric clipping at medium gains, which is the most iconic tone of the FuzzFace (featured in many Jimi Hendrix guitar solos)

Ideally, I need to search for 2 AC128 transistors with particular current gains (Beta parameter) to achieve the sought-after old school tone. Referred to as a "matched pair," it is good to have Q1 with Beta = 70-80 and a Q2 with Beta = 110-130.

## Week 4

To get a feel for the FuzzFace circuit characteristics, it's DC bias points, frequency response, etc, I decided to put together an early stage simulation in LTSPICE. The following link contains a screenshot of the SPICE schematic of this early stage simulation

Below is an input-output graph (in the time domain and frequency domain) for sine tone at 440 Hz.

Here are some of my takeaways from the first round of simulation

1) My simulation, while it did correctly simulate the overdrive effect, the output waveform did not contain the asymmetrical clipping that we are looking for with the FuzzFace.

2) The transistor model used is a generic PNP transistor models built into SPICE. In order to get an accurate simulation, I need to get my hands on a matched pair of AC128s and make my own custom SPICE model.

3) Instead of a potentiometer(s), I used 2 resistors dividing the total resistance equally. LTSPICE does not contain potentiometers in its standard library. Since I have no experience building or installing third-party SPICE models, this might be a good starting point to find my way around the SPICE code base before I build a custom transistor model.

## Week 5

After searching through countless electronic vendors and various websites, I finally stumbled upon an independent vendor in the Czech Republic selling a matched pair of AC128's with the correct current gain values. I placed my order. Hopefully they arrive in one piece sooner rather than later. I hope to now learn about how to derive the necessary parameters for a transistor model in SPICE and get into the Max Lab to do my tests.

I've also done a lot of paper reading this week. It has been unexpectedly daunting to get completely caught up with all of the nonlinear modeling techniques using WDFs. I am hopefully meeting with Kurt next week to sort out some lingering questions, especially on how to form the SPQR Graph that he explains in his paper.

## Week 6

I'm still waiting on the arrival of the transistors from the Czech Republic. This could be quite a lengthy wait since the standard shipping time is about 2 weeks. In the meantime, I met with Kurt to run over some concepts that were still confusing me from his two papers mentioned above. We sat down, covered the paper from top to bottom, and worked on some applications toward the FuzzFace.

Kurt explained more about the concept behind placing all of the nonlinearities in a group at the root of the tree to ensure computability. For transistors, it is customary to use the Ebers-Moll model in digital simulation. The key lies in using the R-Type Adaptor as a connector to link the incomputable nonlinearities to the rest of the circuit. In graph theory, the R stands for a 'Rigid' connection that is neither Series nor Parallel. The wave scattering parameters, while less commonly used, can be found using a technique called Modified Nodal Analysis.

The vector nonlinearities are placed above the root R type adaptor, so the nonlinear elements are separated from the scattering. In our meeting, we derived the adaptor structure for the FuzzFace analog circuit. A diagram is linked below.

## Week 7

Now that I have the WDF Graph, I still need to learn how to derive the Scattering Matricies using the Modified Nodal Analysis method described in the recent literature. Since many nonlinearities are described in the Kirchoff domain, we need to have a conversion state that transforms the Kirchoff domain vector nonlinearity into the wave domain. Once converted, the signals are sent to the scattering matrix. Unfortunately, some delay free loops still remain. To get rid of these issues, the matrices are consolidated into Nonlinear State Space form (NLSS) and a transformation is applied to the vector nonlinearity function. Refer back to Werner DAFx 2015 RESOLVING WAVE DIGITAL FILTERS WITH MULTIPLE/MULTIPORT NONLINEARITIES for a complete mathematical description of the process. A link to a diagram from the paper is below:

Unfortunately, I still do not have access to the alpha release of the C++ WDF Framework. It's looking very unlikely that I will get to this step of the project this quarter.

## Week 8

The transistors have arrived (hopefully in working order)! I now plan to get into the lab to extract the parameters necessary to build an LTSPICE model. As mentioned before, the circuit uses two potentiometers to control the tone and the volume of the output. Since LTSPICE does not have a built-in potentiometer, I thought it would be useful to learn how to install third-party libraries and symbols in the program. This ended up not being as straightforward as initially thought. I have put together a guide on how to install third-party LTSPICE libraries for Mac OSX users in the link below.

After wading through file systems, .lib files, and .asy files, I installed and made some changes to the "Standard Potentiometer" library from the "LTwiki." This should be very useful down the line simulating different volume and tone stages for future analog circuit projects.

I have constructed a new LTSPICE simulation including the two potentiometers. The simulation accurately depicts the asymmetrical clipping and signature harmonic alterations of the FuzzFace.

## Week 9

Since the C++ Framework is still in development, I asked Kurt if he had any MATLAB or any other software packages that I can use to simulate WDF's. Kurt sent me a couple of MATLAB files and a simulation of Diode Clipper to get my bearings in the library. I also went to the Max Lab with my AC128 to perform parameter extraction. With the extracted Gummel-Poon parameters, the output waveform is finally an accurate simulation of the FuzzFace, demonstrating asymmetrical clipping with tone knob adjustments while not affecting the output waveform amplitude.

## Week 10 and Presentation

Here is a link to the slides and results I presented for the final presentation day. Now that I've extracted an appropriate model that accurately simulates the transistors, I can't wait to put the WDF Formulation into the alpha release of the framework when it becomes availiable.