Versions Compared

Key

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

Overview

Computes long term min/max/max abs

Discussion

This module keeps track of the maximum (minimum, and maximum absolute value) seen on the input. This is useful, for example, for keeping track of peak signal levels. The state variable value holds the maximum value seen thus far.

...

An optional constructor argument OUTPUTVALUE specifies whether the computed statistic should be output on an output pin. By default, OUTPUTVALUE=0 and the statistic is only stored internally in instantaneousValue. The .reset variable is used to clear history and restart the calculation. The variable .reset is set to 1 when the module is first constructed.

Type Definition

Code Block
typedef struct _ModuleRunningMinMaxFract32
{
    ModuleInstanceDescriptor instance;            // Common Audio Weaver module instance structure
    INT32 statisticsType;                         // Type of statistics needed.
    fract32 value;                                // Instantaneous output value.
    INT32 reset;                                  // Trigger pin to reset monitoring.
} ModuleRunningMinMaxFract32Class;

Variables

Properties

Name

Type

Usage

isHidden

Default value

Range

Units

statisticsType

int

parameter

0

0

0:2

value

fract32

state

0

0

-60:10

reset

int

state

0

1

Unrestricted

Pins

Input Pins

Name: in

Description: Audio input

...

Sample rate range: Unrestricted

Complex support: Real

Output Pins

Name: out

Description: State value output

Data type: fract32

MATLAB Usage

File Name: running_minmax_fract32_module.m

...