[PD] Guitar distortion (Chebyshev?)

Mathieu Bouchard matju at artengine.ca
Mon Sep 13 18:00:26 CEST 2010


On Sun, 12 Sep 2010, Pierre Massat wrote:

> Now please, could someone tell me how this works? Like this tan 
> distortion, this table that switches from 0 to 1 with a variably soft 
> transition, what is this supposed to model, and what does it do to the 
> raw waveform?

The use of the table is just a shortcut so that tanh doesn't have to be 
used live, in which case it may take a good chunk of CPU (especially if 
you want to use many of them at once).

As I was trying to allude to in this thread, tanh doesn't directly model 
much, but is a good approximation to several patterns appearing when you 
are using analogue electronics close to its max capacity. The graph of 
tanh vs several forms of exp shows this. (see one of the mails).

> I'd like to try the sigmoid function but i don't really understand the 
> way the whole thing works. Also, i'm assuming the size of the table 
> matters. Miller's Chebyshev table in the help patch is 129 points wide, 
> i guess the sound would improve if i made it larger, wouldn't it?

The table is optional. If you use a table, more points will be more 
precise, but also, if you use [tabread4~], you will need many less points 
than [tabread~] to get a comparable level of precision, and with 
[tabread4c~] (external) you can get a bit better than that (though for the 
case of tanh the difference doesn't show as much as for steep or spiky 
functions)

> This is all very exciting for me right now! I always thought distortion 
> could not be properly modelised,

Just because the formulas don't normally show up in a book about the 
basics of dsp, doesn't mean it can't be done. You see, when mapping from 
the original theory of a [lop~] or [hip~], to analog electronics, the 
supposition was that 1-exp(-k*x) can be rounded to k*x. As long as you 
assume it is true, you can't see where the distorsion can be coming from.

It's like what I learnt about lenses and curved mirrors, in grade 11 and 
again in grade 13... it's all based on the supposition that tan(x) can be 
rounded to x, but then it only works well for viewing angles that are 
quite close to the centre...

  _______________________________________________________________________
| Mathieu Bouchard ------------------------------ Villeray, Montréal, QC


More information about the Pd-list mailing list