Versions Compared

Key

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

Overview

Block statistics of a block of samples

Discussion

This module calculates the Block Statistics of the input signal on a block-by-block basis. The input pin can have an arbitrary number of interleaved channels and the Block Statistics calculation occurs over all channels. The output pin has a single channel and a blockSize of 1.

...

  • OUTPUTVALUE=0 (default) - the statistic is only stored internally in instantaneousValue.

  • OUTPUTVALUE=1 then the value of the statistic is output of the first output pin as a floating-point value.

  • OUTPUTVALUE=2 then the module has two output pins. The first output pin is the statistic value and the second output pin is the index at which the value occurs.

    • Using OUTPUTVALUE=2 only makes sense when statisticType=0 (max), 1 (min), or 2 (maxAbs).

Type Definition

Code Block
typedef struct _ModuleBlockStatisticsFract32
{
    ModuleInstanceDescriptor instance;            // Common Audio Weaver module instance structure
    INT32 statisticsType;                         // Type of statistics needed
    fract32 instantaneousValue;                   // Instantaneous output value
} ModuleBlockStatisticsFract32Class;

Variables

Properties

Name

Type

Usage

isHidden

Default value

Range

Units

statisticsType

int

parameter

0

0

0:7

instantaneousValue

fract32

state

0

0

-60:10

Pins

Input Pins

Name: in

Description: Audio input

...

Sample rate range: Unrestricted

Complex support: Real

Output Pins

Name: out

Description: Block statistics output

Data type: fract32

MATLAB Usage

File Name: block_statistics_fract32_module.m

...