Rectification is a type of distortion effect where the negative amplitude values of a signal are distorted in different ways. For half-wave rectification, all negative amplitude values are changed to zero.
This type of distortion is related to, but different from, full-wave rectification.
One method to create half-wave rectification in our computer code is to use a conditional statement. Here, we set up one condition for when the signal is greater than zero and a different condition for when the signal is less than or equal to zero. When the signal is positive, the output signal should equal the input signal. When the signal is negative, the output signal should equal zero regardless of the input signal.
Half-wave rectification is conceptually similar to the effect of processing an analog, electric signal with a diode in a circuit.
Next, let’s look at a different approach to creating distortion called infinite clipping.