Skip to main content
Skip table of contents

Lin Smooth

About This Guide

This Application Note explains the use of the LinSmooth module in the Audio Weaver Application.

The LinSmooth Module

The LinSmooth module can be found in Sound Design/Effects folder or by using the search window in the module browser. It is called “Lin Smooth”.

Figure 1. Location in Module Browser

Linear versus exponential smoothing

The LinSmooth module’s algorithm differs from the smoothing algorithm built into many modules.

The modules with smoothing built-in use a one-pole IIR filter whose rise-time is defined as the time for the output to go from 0% to about 62% when the input goes from 0% to 100%. The rise and fall times for this type of filter are the same. The shape of the transition is exponential.

In the example below, the smoothing time is set to 20 msec.

  • Black: lnput signal

  • Blue: Smoothed signal

Exponential smoothing

The LinSmooth module, on the other hand, uses the current output along with the new output value to calculate the rate that will result in a fixed transition time from 0% to 100% with a linear slope. Depending on the distance between the new and old value, the slope will adjust automatically to make the transition time the same.

Linear smoothing

The LinSmooth supports individual slope control for increasing (TimeUp) and decreasing (TimeDown) levels.

  • Green: LinSmooth Input

  • Blue: LinSmooth Output

Settings:

Linear and exponential smoothing with random input

While the examples below show comparison between the LinSmooth module and the built-in smoothing in a ScalerV2, the LinSmooth module can of course be used for any purpose in addition to controlling volume.

LinSmooth_vs_ExpSmooth.awd

The attached file LinSmooth_vs_ExpSmooth.awd generates a random number between -1 and 1 every 50 msec. The same signal is sent to a LinSmooth module and a ScalerV2 module, the latter with a DC Source of 1.0 and set to linear gain mode. The scaler’s output therefore shows the gain signal with the ScalerV2 module’s built-in exponential smoothing applied.

First, let’s set the smoothing times for both modules to 10 msec.

  • Black: LinSmooth output

  • Blue: ScalerV2 output showing exponential smoothing

  • Red: Random input

  • Black: LinSmooth output

  • Blue: ScalerV2 output showing exponential smoothing

In the example below, the LinSmooth’s up and down smoothing times are set to 20 msec. The Scaler’s smoothing time is set to 10 msec. The two controls track more closely (which may or may not be your goal).

  • Red: Random input

  • Black: LinSmooth output

  • Blue: ScalerV2 output showing exponential smoothing

In the example below, the LinSmooth’s up smoothing time is 10 msec and the down smoothing time is 30 msec. The Scaler’s smoothing time is set to 10 msec.

  • Red: Random input

  • Black: LinSmooth output

  • Blue: ScalerV2 output showing exponential smoothing

Using LinSmooth with Continuously Varying Signals

You can also use LinSmooth to change the shape of continuous signals such as sine waves. This example shows a 15 Hz sine wave. Note that the input sine wave (red) goes from -1.0 to 1.0.

  • Blue: through the exponential smoothing of the ScalerV2 (which acts as a low pass filter, attenuating and shifting in phase, but doesn’t change the shape).

  • Black: through a LinSmooth module with Up time = 10 msec and Down time = 30 msec. The signal is attenuated and shifted in phase, but its shape has been changed as well. The change in shape will increase with the sine wave’s frequency. This introduces harmonics into the result and is a form of distortion.

Tip:

When using LinSmooth with a module that already incorporates smoothing, set the smoothing time in the controlled module to 0.

JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.