Subject: Re: [linux-audio-dev] acid, linux
From: Jarno Seppanen (jams_AT_cs.tut.fi)
Date: to joulu 02 1999 - 14:18:51 EST
Paul Barton-Davis <pbd_AT_Op.Net> writes:
> someone should implement a logarithmic/exponential clipping function
> that asymptotically approaches ((2^bits_per_sample)-1) once the sample
> amplitude exceeds ((2^bits_per_sample)-some_threshold).
>
> for those who don't know, one implementation of this is patented by
> apogee ("softlimit"), but there i suspect that their patent covers (1)
> a fairly h/w-based implementation and (2) probably only cover a particular
> function.
Well, this is a soft clipping code snippet from "Out Of Phase" anno 1994. It
is essentially a waveshaper with a nice smooth waveshaping function. If I
recall correctly, it starts to soft clip at +-1 and CurrentLimitingExcess is
the hard clipping threshold.
if (X > 1)
{
/* X exceeds normal channel boundary on top, apply limiter */
X = 1 + FATAN((X - 1) * HALFPI / (Compressor->CurrentLimitingExcess - 1))
/ (HALFPI / (Compressor->CurrentLimitingExcess - 1));
}
else if (X < -1)
{
/* X exceeds normal channel boundary on bottom, apply limiter */
X = -1 + FATAN((X + 1) * HALFPI / (Compressor->CurrentLimitingExcess - 1))
/ (HALFPI / (Compressor->CurrentLimitingExcess - 1));
-- -Jarno
This archive was generated by hypermail 2b28 : pe maalis 10 2000 - 07:23:26 EST