This page contains data from a spice simulation of an instrument amplifier's preamp stage (Fender 5F4 type) and a LADSPA unit that performs similar (i.e. approximated) tone coloring and hard clipping.
A previous analysis suggested that sampling a linear ramp response from a valve preamp is a viable way to recreate its particular harmonic distortion characteristics.
For this work, a preamp stage from an existing instrument amplifier has been simulated using the spice package (Here's the spice netlist). This preamp operates the valve at different voltages, producing more pronounced tone forming. In addition, its filtering effect is reduced wrt. the previous model, resulting in simulation data more suitable for DSP emulation purposes.
To get an idea of the model's filtering and amplitude response characteristics, it was run on an input signal of 2 ms of 0 V, then a ramp from -5 V to 5 V over another 2 ms, and finally the input voltage was ramped over the same difference within 4 ms.
|
|
| Vin | |
|
|
| Vout |
From the plots, we can deduce that a relatively simple input to output voltage mapping will perform well in capturing the preamp's tone coloring properties in a DSP emulation, because memory effects seem to have little to no influence on its response.
It can also be seen that the original design intention was to provide a fairly linear amplitude response in an input voltage window of about -1.2 to +1.2 V.
The DSP unit presented here works by mapping input to output amplitudes based on a sample table storing the last 4 ms from the above response.
The computational cost vs. quality tradeoff point has been set at interpolating linearly; the sound quality achieved suggests that neither antialiasing measures (oversampling) nor higher-order interpolation are necessary as long as the plugin is used on electric guitar (or bass guitar) signals.
This is what it sounds like (in combination with the 'unmatched' cabinet emulator).
CPU cost is 3 - 7% for realtime audio at 64 frames/block, 44.1 kHz sample rate on the author's system (AMD K6, 450 MHz). The number depends largely on cache phenomena.
You may want to read the Gnu Public License that covers this plugin.
Here's the plugin source code.
$ tar xvfz preamp.tar.gz $ cd preamp $ make # make install
The plugin has one audio input and output port each, and one control input, named 'gain'.
If the unit is fed a signal at unity gain (peak amplitude is one), 'gain' values smaller than one result in soft harmonic distortion; the smaller the value, the less coloring. 'gain' values higher than one (up to ten) will result in hard clipping. The unit does not implement any antialiasing measures. For guitar signals, the amount of aliasing will be very moderate if the gain is kept below one though, which happens to be the author's preferred mode of operation.
The unit applies inverse gain after the tone coloring stage to keep the output signal about the same volume across the 'gain' range.
You may want to route the unit's output through a cabinet emulation like unmatched to recreate more of the characteristics of the real thing.
Future versions of this plugin may or may not produce a different sound.
The author uses the plugin for coloring guitar signals in the following effects chain:
HiPass (140),
LadspaPlugin ('preamp.so'),
LadspaPlugin ('unmatched.so'),
Delay (t = .3, wet = .05, fb = .01),
Gain (db = -14),
where HiPass is equivalent to the filter implemented in ecasound, a fairly standard 3rd order IIR.
The unmatched 'cabinet simulator' plugin is documented elsewhere.