| >
>
> Ola everyone
>
> Is there a way to simulate distortion using csound? My knowledge on the
> innings of distortion are very limited, but I believe it comes from boosting
> a signals level until it clips. The cliping would have to be forced with
> csound, by perhaps something like this:
> asig = (asig > ithreshold ? ithreshold : asig)
> Can someone be so kind as to explain the basic method, if any, for
> achieving that with csound?
> Thanks in advance as always
> pedro
The problem with using boosting with a hard clip of the value is that you
get a particularly 'digital' form of distortion.
I've done distortion in a non-Csound environment that used integers
for internal processing. Given that...
You can do distortion with a table lookup if you're prepared to have a
big table. You can define a transformation in the table which maps each
of the possible 65536 input values onto an output value. You can
get hard distortion by simply mapping every value above a certain
cutoff and below -cutoff to cutoff or -cutoff respectively.
Different types of distortion can be obtained by using tanh style curves
so that the distortion comes in slowly and realistically.
Basically, a distortion is a crude form of compression, and like compression
you can have 'hard knee' or 'soft knee', usually with a compression ratio of
infinity to 1 (i.e. there will, eventually, be a hard limit).
There's a lot more than this to actual modelling of distortion of (say)
real guitar amplifiers.
Cheers,
Ross-c |