Soft knee rms limiter noise

Algorithm development and general DSP issues

Moderator: frank

Post Reply
JCaudio
Posts: 2
Joined: Tue Oct 30, 2007 4:42 am

Soft knee rms limiter noise

Post by JCaudio »

Hello,
Trying to include a soft limiting/compression function to emulate tape saturation in my Tape echo machine algorythm. When I add the code snippet from the Spin site "soft knee rms limiter" (included below) I get quite an increase in noise output from the FV-1 in the no-signal condition.
Is this to be expected? The algo is very quiet when the limiter code block is disabled. Anyone have any other thoughts on how to implement tube and tape emulations?
Regards,
John Collins

;rms limiter, approx 10dB limiting range,
;soft knee, variable comp ratio.

equ sigin reg0
equ avg reg1
equ gain reg2

rdax adcl,0.5
rdax adcr,0.5
wrax sigin,1 ;write mono input signal
mulx sigin ;square input
rdfx avg,0.001 ;average squared result
wrax avg,0 ;avg stored, ACC cleared

sof 0,0.125 ;put 1/8 in acc
rdax avg,1 ;add our averaged input level
log -0.4,-0.25 ;square root and 1/x combined
exp 1,0 ;
wrax gain,1
mulx adcl
sof -2,0 ;restore gain, to avoid output clipping
sof -2,0
sof 1.5,0
wrax dacl,0
rdax gain,1
mulx adcr
sof 1.5,0

clr
rdax sigin,1
wrax dacr,0 ;write outputs, zero ACC
B.C.
Posts: 38
Joined: Sat Mar 06, 2010 5:28 pm

Post by B.C. »

Since compression is really a gain device, if not set properly excess noise can and will occur. I would suggest playing with you coeff values till you can lower the noise floor a little.

Hope this helps :)
JCaudio
Posts: 2
Joined: Tue Oct 30, 2007 4:42 am

Post by JCaudio »

Thanks, BC.
I also found that I had the code block in the wrong place within the overall program. When I position it correctly, the noise is no longer apparent.
John Collins
Post Reply