Hi List!
I have been playing a bit with SoundHack +Chebyshev external, hoping that i could get a nice distorted sound for my guitar. Leaving aside the fact that the parameters are quite difficult to use, i m faced with a few problems. One issue is that it seems to sound good only when the amplitude of the sound is close to 1, which is obviously not the case for a raw guitar sound. Anything that gets above 1 induces a very harsh burst of noise. I have tried a compressor (the one that comes with the SoundHack bundle), but doesn't seem to be able to behave as a limiter, since the compression ratio cannot go to infinity. Does anybody know of a good sounding compressot that could work as a limiter? More generally, i m not sure if i m headed in the right direction. What i want to do is something like:
Guitar adc ---> compressor ---> Chebyshev distortion ---> hip~ 5 to remove DC component ---> dac to amp
I m not sure whether this is the right way of dealing with guitar distortion. I m not sure Chebyshev polynomials is the right waveshaping technique either. I ve found this ( http://www.mitpressjournals.org/doi/pdf/10.1162/comj.2009.33.2.85), in which several waveshaping techniques are mentioned, I don't know if anybody has any experience with these?
I m not trying to model an amp here, i m only interested in modeling a distortion unit. There is a thread in the archives, but i'd be interested in getting some fresher thoughts upon the subject...
Pierre
On 12/09/10 15:31, Pierre Massat wrote:
I m not sure whether this is the right way of dealing with guitar distortion.
I don't think there's a right way - judge by your ears, if you like it then that way is good for you at that particular moment in time. Personally when I want distortion I use various (frequency-) filters and expr~ to waveshape, but my input is generally synthetic.
Miller's "patch for guitar" has an interesting waveshaping technique you could borrow: essentially it involves separating a sinusoid into separate phase/amplitude information, and waveshaping from the phase before recombining with the amplitude. Tihs could probably be extended to a 2D wavetable with a [tabread16~] or something similar. Results without a separate pickup for each string (necessary to get close to a single-frequency sinusoid) will probably be very strange.
http://www-crca.ucsd.edu/~msp/smeck/latest/doc/index.htm
Another thing to consider is aliasing: I read somewhere (and I hope I'm not repeating untruths) that you need to oversample by a factor of N if you waveshape by a polynomial of degree N (eg a cubic would need 3x oversampling to avoid aliasing).
On Sun, 12 Sep 2010, Pierre Massat wrote:
One issue is that it seems to sound good only when the amplitude of the sound is close to 1, which is obviously not the case for a raw guitar sound.
Tu peux utiliser la version polynômiale des formules de Tchébycheff, car celles-ci s'étendent au delà de 1 sans problème, tandis que la version arccosinus a des problèmes en dehors de l'intervalle -1..+1 (pour simplifier les choses, on dit habituellement qu'elle n'existe pas en dehors de cet intervalle...).
Mais c'est quand même mieux de pas tellement dépasser ±1, c'est juste que les polynômes pardonnent beaucoup plus. C'est un effet très dépendant du volume.
| Mathieu Bouchard ------------------------------ Villeray, Montréal, QC
On Sun, 12 Sep 2010, Pierre Massat wrote:
I m not trying to model an amp here, i m only interested in modeling a distortion unit.
Ah, I forgot, did you try [expr~ tanh($v1)] ?
At first I assumed that you wanted to go beyond that simple distorsion and into more interesting forms of distortion. Chebyshev's are only useful if you want something that can also sounds like pitch shifts by harmonic steps.
I think that tanh is rather close to the physical behaviour of capacitors being strained, but surely not exactly that, and I didn't do the math to figure out what the real formula would be. (Did anyone try that ?)
| Mathieu Bouchard ------------------------------ Villeray, Montréal, QC
On 2010-09-12 11:13, Mathieu Bouchard wrote:
On Sun, 12 Sep 2010, Pierre Massat wrote:
I m not trying to model an amp here, i m only interested in modeling a distortion unit.
Ah, I forgot, did you try [expr~ tanh($v1)] ?
At first I assumed that you wanted to go beyond that simple distorsion and into more interesting forms of distortion. Chebyshev's are only useful if you want something that can also sounds like pitch shifts by harmonic steps.
I think that tanh is rather close to the physical behaviour of capacitors being strained, but surely not exactly that, and I didn't do the math to figure out what the real formula would be. (Did anyone try that ?)
See attached patch. I use it instead of a fuzz box now. It's not the capacitors, it's the amplifier losing gain when it approaches the power supply. Vacuum tubes have a softer knee than transistors.
Martin
On Sun, 12 Sep 2010, Martin Peach wrote:
It's not the capacitors, it's the amplifier losing gain when it approaches the power supply.
Yeah, but it seems to be a pattern similar to the one found in capacitors, because capacitor theory has exp(-x) all over it, and the only way that capacitors behave like [hip~] is when the signal is much below the capacity rating (µF)... otherwise they lose gain... when they don't, it's because exp(-x) can be well approximated by x.
And then, exp is very close to tanh in several different ways, one of them being this (use gnuplot) :
plot [-2:2] [-1:1] exp(x*sqrt(2))-1, 1-exp(-x*sqrt(2)), tanh(x), x
I put the plain 'x' at the end to show what I mean above (though you already know that)
| Mathieu Bouchard ------------------------------ Villeray, Montréal, QC
On 2010-09-12 12:05, Mathieu Bouchard wrote:
On Sun, 12 Sep 2010, Martin Peach wrote:
It's not the capacitors, it's the amplifier losing gain when it approaches the power supply.
Yeah, but it seems to be a pattern similar to the one found in capacitors, because capacitor theory has exp(-x) all over it, and the only way that capacitors behave like [hip~] is when the signal is much below the capacity rating (µF)... otherwise they lose gain... when they don't, it's because exp(-x) can be well approximated by x.
I guess it's similar since capacitors charge at a rate proportional to a voltage difference, while transistors can supply charge carriers at a rate proportional to a voltage difference, so caps charge fastest when they are nearly empty and transistors have the best gain with small signal inputs.
The whole universe has exp written all over it in fact...
And then, exp is very close to tanh in several different ways, one of them being this (use gnuplot) :
plot [-2:2] [-1:1] exp(x*sqrt(2))-1, 1-exp(-x*sqrt(2)), tanh(x), x
I put the plain 'x' at the end to show what I mean above (though you already know that)
Of course, all the hyperbolic trig functions are made from exp, by definition.
http://en.wikipedia.org/wiki/Hyperbolic_function
Another use of exp is the sigmoid function used in biology, that can be used to make a soft transition from one state to another as in 'fuzzy logic'.
Martin
On Sun, 12 Sep 2010, Martin Peach wrote:
The whole universe has exp written all over it in fact...
indeed... radioactive decay... pendulum friction... light transmission in opaque materials... and even the rate at which I completed the courses of my math degree.
Of course, all the hyperbolic trig functions are made from exp, by definition. Another use of exp is the sigmoid function used in biology,
The sigmoïd is an hyperbolic trig function, by definition. The way it's written is either another way to write tanh, or one plus half of tanh.
| Mathieu Bouchard ------------------------------ Villeray, Montréal, QC
On Sun, 12 Sep 2010, Martin Peach wrote:
plot [-2:2] [-1:1] exp(x*sqrt(2))-1, 1-exp(-x*sqrt(2)), tanh(x), x
Of course, all the hyperbolic trig functions are made from exp, by definition.
Ah, some other things I wanted to say :
Even though tanh is made from exp, it's not directly the same as the two simpler exponentials (above) that may describe capacitor behaviour more directly. What I wanted to show is tanh is a rather good approximation to both at once, but only if you put an extra sqrt(2) factor.
And to finish about the sigmoïd, tanh(x) is usually written as (exp(x)-exp(-x))/(exp(x)+exp(-x)), but you can also write it as 1-2/(1+exp(2*x)), which is almost the usual form of the sigmoïd function.
| Mathieu Bouchard ------------------------------ Villeray, Montréal, QC