LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How would I soft-clip a sine wave?

Hello,

 

My goal is to generate both a hard-clipped and soft-clipped sine wave.

 

The hard-clipping is fine. I simply converted the dynamic data type to an array and fed it into a Coerce and In Range, where the limits were set at what I wanted to clip at.

 

But how would I soft-clip a sine wave? As in, instead of it just flat-lining at the clipping point, the signal is merely heavily attenuated.

 

Thank you.

0 Kudos
Message 1 of 2
(2,465 Views)

Hard clip, and then do a polynomial interpolation between the clipped and the original.

 

Check out madbrain's answer here. More ideas are there.

 

This was just the first hit on Google.

0 Kudos
Message 2 of 2
(2,455 Views)