distortion for guitar

DSP, Plugin and Host development discussion.
Post Reply New Topic
RELATED
PRODUCTS

Post

I'm spending more time trying to find a really good distortion approach for guitar and it's turning out to be much more complicated (and interesting) than I'd expected.

I've been playing a lot with different transfer functions but that seems to be just a small part of things. I also need dynamic components that respond to the signal at large, and I apparently need to band limit the output to avoid aliasing.

I've got a slew rate limiting approach I like which seems to obviate the need for anti-alias filtering and it sounds pretty good. What do you knowledgeable folks think? Is that a valid way to avoid generating higher frequency artifacts?

I found a lot of material about transfer function stuff but little about slew/sag/dynamic duty cycle stuff. Any pointers/resources?

CAF

Post

The usual way of doing band limiting is oversampling, filtering and then downsampling.
Then, I don't use a transfer function, I model the schema directly.

Post

I went and read your blog. I think I found the pieces that dealt with distortion stuff.

Your comment about separating transients--that's kinda the Eventide thing right now, right?

Have you played with any of the tube amp behaviors? The thinking is they set up some pretty complex systems with grid leak, power supply sag, transformer saturation effects.

On the transfer function front, I'm trying to pre-compute the transfer functions into piecewise approximations to make them efficient at run time. Ever messed with that?

CAF

Post

Tube amps contain circuits that can respond to transients in some ways. Have a look at http://www.simulanalog.org/tubestage.pdf section 5.

Power supply sag and transformer saturation are somewhat controversial things. They exist as effects, good or bad. Not everybody wants them.
~stratum~

Post

Dynamic behavior of guitar amps or even some solid state analog pedals is complicated.

One time long ago I was going to test a guitar amp, various levels of input test wave viewed on one oscilloscope channel vs the output viewed on the other scope channel.

Was expecting to use the data to make a static transform formula or multi-dimensional input-output map.

But when distortion began, the output began looking like it was from mars compared to the input. Not just a simple distorted version of the input. Or if it was a simple distorted version, the output looked so different from the input that my eye was incapable of discovering a simple dynamic transform. Was just shaking my head wondering, "How can a few tubes do that?"

There are many articles about it. Not magic. Objectively discoverable but fairly complex. Personally it was educational to hands-on compare input vs output, even if it didn't seem immediatey useful in copying the observed behavior. Giving a feel for the surprises tube amps might deliver. Before doing the tests my theories were too simple-minded, expecting to see simpler behavior. At worst, a "dose of reality" about the nature of the problem.

Because of dynamic phase shifts and such, there is also the question-- Maybe a simpler transform of the signal would sound about the same even if the output would not look the same. It might be possible to waste time trying to nail details of the output which look dramatic to the eye but the ear doesn't care. Dunno.

Post

ChewingAluminumFoil wrote:I went and read your blog. I think I found the pieces that dealt with distortion stuff.

Your comment about separating transients--that's kinda the Eventide thing right now, right?

Have you played with any of the tube amp behaviors? The thinking is they set up some pretty complex systems with grid leak, power supply sag, transformer saturation effects.

On the transfer function front, I'm trying to pre-compute the transfer functions into piecewise approximations to make them efficient at run time. Ever messed with that?

CAF
What comment on separating transients?

I have played with tubes behavior, for instance in http://blog.audio-tk.com/2016/06/28/ana ... e-circuit/ and then ATK itself has several tube models for this specific model. I still need to implement the inverter at some point.
Interpolation is interesting, I use it for my compressors, but for a circuit modeling (with the ODE), I don't think it is smooth enough (i.e. it should be C1, not C0).

Post

From June 21, 2016
After my transient shaper, some people told me it would be nice to have a splitter: split the signal in two tracks, one with the transient, another with the sustain. For instance, it would be interesting to apply a different distortion on both signals.

Post

My slew limiting is certainly not true slew limiting but it's computationally very efficient and seems to sound pretty good. My sag is also pretty brute force. Here's where I apply at the end of processing each sample.

Code: Select all

       // factor in slew and sag
        float dy = outval - pDC->_prevValue;
        pDC->_prevValue += dy * pDC->_slew;
        pDC->_prevValue *= pDC->_sag;
        outval = (float)pDC->_prevValue;

        // update sag
        pDC->_sag *= pDC->_sagFactor;

Post

I guess I should explain a bit more. For slew, I'm using a fixed amount, say 0.75 and each time I calc a desired output value, I move 0.75 towards that value. This exponentially approaches the value.

For sag, each time the input switches sign, I reset sag to 1.0 and then multiply by a value slightly less than one (0.998 for instance) on every sample, to yield an exponentially decaying sag effect on a clipped signal.

CAF

Post

The idea of processing transients separately looks interesting.

About sag: In actual amps that's a subtle effect. I remember hearing an old zoom effect pedal during the early 2000's. It had such an exaggerated amount of sag simulation that it was blatantly obvious that it wasn't a result of anything natural.
~stratum~

Post

ChewingAluminumFoil wrote:From June 21, 2016
After my transient shaper, some people told me it would be nice to have a splitter: split the signal in two tracks, one with the transient, another with the sustain. For instance, it would be interesting to apply a different distortion on both signals.
That's exactly why I built ATKTransientSplitter.
The basic idea is that instead of just processing the transient with a compressor (with a ratio that can be lower than 1), you use a swell gain filter (that has a max gain of 1), which gives you the transient part, and the second channel is just 1-transient (see https://github.com/mbrucher/ATK-plugins ... Shaper.cpp).
You can do more, with having a chorus on the non transient part...

I'm still trying to figure out a stereo + mid/side version that makes sense and that is usable. Quite tough to do.

Post

Eventide has a lot on youtube about splitting transients. Here's a demo I saw a while back (with Chinese subtitles):

https://www.youtube.com/watch?v=Qk11Aan299s

Post Reply

Return to “DSP and Plugin Development”