Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Scroll Documents: Update page title prefix

Overview

Converts from linear units to decibels using a fast approximation

Discussion

Converts from linear units to decibels (db20) using a polynomial approximation. The function uses a 3rd order polynomial and the maximum error over the entire input range is 0.003 dB.

Type Definition

Code Block
typedef struct _ModuleDb20Approx
{
    ModuleInstanceDescriptor instance;            // Common Audio Weaver module instance structure
} ModuleDb20ApproxClass;

Pins

Input Pins

Name: in

Description: Input signal

...

Sample rate range: Unrestricted

Complex support: Real

Output Pins

Name: out

Description: Output signal

Data type: float

MATLAB Usage

File Name: db20_approx_module.m

...