This is an add function. It can add up stereo or mono signals as a (Kyma) Mixer does. If you add up to many correlated audio signals, an audio signal starts to clip. Most of the time this gives an unwanted/unpleasant sound. This Sound tries to make a smooth transition between normal and clipped signal. The range in which this smoothing works is adjustable.

In Kyma audio signals are in the range -1 and +1 (in fact +1 is not allowed!). Within the AddHardLimit sound the signals can reach further then this range. For example: if one inputs two times the same sound the internal range could become -2 until <+2 ("<"= means almost). If the SoftkneeRange is 1 then this complete range is compressed to the -1 and <+1 range. This is done via a non-linear operation, which introduces distortion. This distortion is however less annoying then normal clipping. If the SoftkneeRange would be 0.5 for this same example it would work a bit different: the samples in the range -0.5 and 0.5 go through without any processing, the samples in the range -1.5 and -0.5 plus 0.5 and 1.5 are non-linear processed to become between -1 and -0.5 plus 0.5 and 1. All the rest is hard clipped.


In most cases one can guess if the addition will clip or not. If heavy clipping is to be expected, one can simply counteract this by attenuation of the input signals. Due to implementation issues I have chosen to do this attenuation in steps of -6 dB (= signal*0.5). The attenuation is done with the InputShift parameter. With a value of zero, there is no attenuation. If this value is 1, attenuation is -6dB, and if this value is 3, attenuation is (3*-6=)-18dB. The used assembler instruction for this function is called an "arithmetic right shift". That is why this parameter has this name.


-- ChristiaanGelauff - 08 Oct 2005 -- Updated 31-3-2007           Back one page