View Single Post
Old 01-20-2019, 11:30 AM   #51
ErBird
Human being with feelings
 
Join Date: Jan 2017
Location: Los Angeles
Posts: 1,161
Default

The new version seems very well-behaved. Very nice!

I made a small tweak to allow higher gain levels. It doesn't seem to affect the anti-aliasing ability. Tested up to 90 dB on a 100 Hz sine wave.

Instead of:
Code:
slider3 ? (
  spl0 = ch0.antialiased_tanh_rect(spl0);
  spl1 = ch1.antialiased_tanh_rect(spl1);
) : (
  spl0 = tanh(spl0);
  spl1 = tanh(spl1);
);
I have:
Code:
slider3 ? (
  354 < abs(spl0) ? (
    spl0 = sign(spl0);
  ):(
    spl0 = ch0.antialiased_tanh_rect(spl0);    
  );
  354 < abs(spl1) ? (
    spl1 = sign(spl1);
  ):(
    spl1 = ch1.antialiased_tanh_rect(spl1);    
  );
) : (
  spl0 = tanh(spl0);
  spl1 = tanh(spl1);
);

Last edited by ErBird; 01-20-2019 at 07:16 PM.
ErBird is offline   Reply With Quote