Guitar Diode Distortion

Hi all,

Here is a distortion effect for use mainly on electric guitars.
It’s similar to a diode distortion effect and has 3 settings namely soft, medium and hard.

Depending on which setting it’s on, the level can increase slightly.
To increase the effect, run it several times, but keep in mind the level increase each time.

It also high pass filters (from 20Hz) to reduce too much low end which will makes it sound too muddy.

The ideal way to use it, is to duplicate a guitar track and leave one “dry” and the other apply this effect to.
By using the individual track levels, you have control over “dry” and “wet” so to speak.

Of course, it can be used on just one track if you wish.
Screen Shot 2021-05-28 at 12.03.05 AM.png
I have attached the plugin below.
It can be installed like any Nyquist plug in.
Don’t forget to enable it in Audacity.

Have also attached a short clip of a guitar with before and after.
They are in 192Kb/s MP3’s
Horrible I know but had to fit within the forum’s size limits.
And no, it’s not me playing the guitar, it’s a buddy of mine, you don’t want to hear me playing a guitar, trust me.
GuitarWithEffects.mp3.zip (1.07 MB)
GuitarDry.mp3.zip (1.07 MB)
GuitarDiodeDistortion.ny (672 Bytes)

It’s not easy to hear exactly what the effect is doing because the “GuitarDry.mp3” is already heavily over-driven.

I agree, however it was the only guitar clip I have.

If you try it on a clean guitar, the gritty distortion and harmonics are clearly audible.

As you can see, it a very simple plugin.
Got the idea whilst I was reading the Nyquist reference and came across “s-sqrt”.


It occurred to me that the way it acts on samples, is very much like a diode rectifier.
Screen Shot 2021-05-28 at 11.49.58 AM.png
So I generated a single 1Khz tone.
Before applying “s-sqrt” :
Screen Shot 2021-05-28 at 12.20.50 PM.png
And after:
Screen Shot 2021-05-28 at 12.20.24 PM.png
So it’s pretty much a diode.

Continued in next post due to attachment limits…

Since the negative cycles have been chopped off, there will also be distortion and harmonics.
It’s these harmonics that add “richness” to the sound.
Screen Shot 2021-05-28 at 11.58.28 AM.png
Now, looking at a simple guitar effect unit that does this, we see a diode, a switch and a variable resistor.
When the switch is in the center position, it does nothing.
When in the “2” position, the audio is clipped (negative cycles) by the diode.
The same thing happens in position “1”, but since there is a variable resistor in the path, it causes a volt drop
and hence less of the audio is clipped.

Therefore, position “2” is a hard effect, whilst “1” is a soft effect.


The circuit is simulated by the Nyquist code.
The plugin in has 3 settings (instead of 2 like in the circuit).
The variable resistor is done by using “scale” and the diode with “s-sqrt”.

The “highpass8” is there to reduce some low end that occurs.
Screen Shot 2021-05-28 at 11.59.57 AM.png

You may be interested to know that Audacity’s “Distortion” effect (https://manual.audacityteam.org/man/distortion.html) was originally developed in Nyquist.
I later converted it to C++ so that it could do “real-time preview” (which is not yet available for Nyquist effects).

The effect is based on Nyquist’s SHAPE function: https://www.cs.cmu.edu/~rbd/doc/nyquist/part8.html#index458

Thanks Steve, will have a look at “shape” as well.

I’m always interested in different ways to achieve similar effects.
With distortion, each method will produce different sounding audio due to the harmonics and wave shapes produced.

My idea is to add to the diode effect with quite a “shallow” resonant filter.
This will enable the user to pick out and concentrate on one of the harmonics whilst not completely attenuating the others.
The resonant filter will in turn add some more “colour” as well.

Attached below, is another example of the effect on a guitar.
The effect is much more subtle than clipping it too much and having just square waves left.
If you listen on headphones, there is also a slight widening effect.

EDIT:

I just occurred to me that another type of distortion can be achieved with “quantize” (a.k.a. bit crushing), but with a twist.
Take the audio and apply a lowpass and highpass.
Apply quantizing to say the high end only and sum that with the low end which is left untouched.

The other way round is also possible.

Wonder what it will sound like?

Will experiment and if any good, will create a new thread.

Cyanide2 allegedly works with Mac, (but it is old).
I can testify it works in Audacity on Windows.

Nice find, thanks Trebor.

A very useful tool for every guitarist.