First Plugin

Written by steve

While I was busy experimenting with the dsp valve code the Guitarix team began releasing LV2 plugin versions their amps, at first these were hard wired configurations as the standalone amp has so many options it was not possible to make the plugin particularly usable unless it was simplified ( this is now not the case as a fully configurable plugin has now been produced ).

With the aim of becoming familiar with the LV2 architecture I decided to code a plugin based on my experiments and hence was born my first guitarix preamplifier.

This consist of a 2 stage valve preamplifier with a feedback loop and presence and resonance controls. Distortion/saturation is controlled by the level of the input gain.

Read more: First Plugin

Feedback tone controls.

Written by steve

In many guitar amps a presence control is inserted in the feedback loop. In effect this is high pass filter to ground, gradually bleeding more high frequencies to ground and thus decreasing the treble content of the feedback signal, which in turn means that the treble is accentuated in the final output.

To simulate the presence control a simple adjustable low pass filter was inserted into the feedback loop.

Read more: Feedback tone controls.

Negative Feedback

Written by steve

In most guitar amplifiers a negative feedback loop is incorporated to flatten the frequency response and reduce noise, often taken from one of the speaker taps on the output transformer back to the cathode of one of the preamp valves. As this is not possible with the current valve models I decided to wrap the loop around various combinations of valves to see the results.

It is important that the feedback signal is 180 degrees out of phase with the original signal to ensure that he feedback is negative otherwise we will end up with howling feedback.

The valve models already invert the signal so if feedback is implemented around an odd number of valves no extra processing is necessary, if an even number the signal must be inverted.

Generally the level of feedback in guitar amps results in an overall gain reduction of between 6-10dB.

Read more: Negative Feedback

Valve Distortion

Written by steve

Next step is to cascade several valve stages together and see what happens.

Using same single valve stage as previously now was time to see what happens when multiple stages are cascaded together, each stage being capable of overloading the next as in a real amplifier. Several parts of an original circuit are fairly straightforward to simulate with simple lowpass filters, in particular CR ( Capacitor-Resistor ) filters are commonly used between stages to block DC and to tailor the low frequency response of the circuit. In a real amp too much low frequency content can cause muddying of the sound as the low frequencies are of a higher energy than the high frequencies and distort much sooner. Looking at any circuit diagram of a Marshall amplifier reveals that the low frequencies are heavily reduced in the early stages to enable more distortion in the later stages yet retain a reasonable sound at the output, this is achieved using a bypass capacitor on the cathode resistor.

Read more: Valve Distortion

Where to start....

Written by steve

As my aim was both to learn the intricacies of audio DSP programming and to assess the quality of valve simulations using DSP code I decided that the first project should just be a very simply one stage valve preamplifier, a simple task as the valve models are already coded and provided in the Guitarix framework.

Real valve amplifiers are incredibly simple in construction as valves are already basic voltage amplifiers ( unlike transistors which are basically high speed switches ). A single stage amplifier consists of one half of a small triode valve, 3 resistors and 1 or 2 capacitors plus the power source. The operating point of the valve is controlled by the values of these components and can be tuned for the intended purpose ( highest gain, cleanest signal etc etc ). In guitar amps it is not always required to find the operating point with least distortion so chosen values are mostly different from those found in hi-fi amps as some form of harmonic distortion is a necessary part of the final sound.

The valve models in Guitarix are based on ........ and are implemented using a lookup table generated with various parts of the circuit predefined ( power supply voltage, anode resistor, input resistor ). The resulting model can be tweaked at run time as the cathode resistor and resulting bias value are variables. The following values were used for initial experiments as they are the most common in guitar preamplifiers :

Read more: Where to start....

The Quest begins.....

Written by steve

Choosing the tools.

As my interest had been sparked by the open source project Guitarix I decided to use that as a framework for my experiments, this would save a lot of programming time, as the framework already existed, and ease the learning curve for DSP prigramming as it makes use of the excellent Faust DSP programming language and its FaustWorks user interface. This enables the user to very quickly develop DSP algorithms and test them as it autogenerates highly optimised DSP code and builds a variety of different plugin architectures on the fly. Check it out at

 After a very short time I was happily writing DSP code in Faust and so ready to start the experiment.



More Articles ...