Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

The ScaleOffset module scales the input signal, and adds a fixed (DC) offset. The module is useful for specific nonlinearities, as well as in dynamics processing, where the scale and offset can occur in the log domain. If the input is complex, the same gain and offset are applied equally to both the real and imaginary parts.

The output is computed on a sample by sample basis according to the formula: $yy[n]=\textrm{gain} \times gain * x[n] + \textrm{ offset}$

Type Definition

Code Block
typedef struct _ModuleScaleOffset
{
    ModuleInstanceDescriptor instance;            // Common Audio Weaver module instance structure
    FLOAT32 gain;                                 // Linear gain.
    FLOAT32 offset;                               // DC offset.
} ModuleScaleOffsetClass;

Variables

Properties

Name

Type

Usage

isHidden

Default value

Range

Units

gain

float

parameter

0

1

-10:10

offset

float

parameter

0

1

-10:10

Pins

Input Pins

Name: in

Description: Input signal

...