Document toolboxDocument toolbox

Meter

Overview

Peak and RMS meter module

Discussion

This modules provides a flexible level meter that can operate in several modules. The module has a single multichannel input and separately meters each channel. The meter can be configured to conform to IEC 60280-10 (peak meters) and IEC 60280-17 (VU Meter) specifications. The meterType parameter is used to configure the module as follows.

If meterType=0, then the meter implements a peak meter according to IEC 60280-10 in "fast mode". The attackTime is fixed at 5 msec and the release time is fixed to 1087 msec.

If meterType=1, then the meter implements a peak meter according to IEC 60280-10 in "slow mode". The attackTime is fixed at 10 msec and the release time is fixed to 1450 msec.

If meterType=2, then the meter implements a meter according to IEC 60280-17. This corresponds to the industry standard "VU meter" definition. The attack and release times are 65 msec.

If meterType=3, then the meter implements a custom peak meter. You have to manually set the attackTime and releaseTime from a Matlab script.

If meterType=4, then the meter is instantaneous and has attack and release times of 0 msec. The meter value equals the last value in each block.

If meterType=16, then the meter implements a computationally cheap approximation to IEC 60280-10 in "fast mode". The attackTime is fixed at 5 msec and the release time is fixed to 1087 msec.

If meterType=17, then the meter implements a computationally cheap approximation to IEC 60280-10 in "slow mode". The attackTime is fixed at 10 msec and the release time is fixed to 1450 msec.

If meterType=18, then the meter implements a computationally cheap approximation to IEC 60280-17. This corresponds to the industry standard "VU meter" definition. The attack and release times are 65 msec.

If meterType=19, then the meter implements a custom peak meter in a computationally fast manner. You have to manually set the attackTime and releaseTime from a Matlab script.

If meterType=20, then the meter implements an instantaneous peak meter. The attack and decay times are zero. Basically, the max abs value of each block is returned for each block without time constants.

In meterTypes 0 to 4, the peak attack and release are performed on a sample-by-sample basis in the envelope follower. In meterTypes 16 to 20, the peak absolute value for the entire input block is found and this one value is passed through the envelope follower.

Type Definition

typedef struct _ModuleMeter { ModuleInstanceDescriptor instance; // Common Audio Weaver module instance structure INT32 meterType; // Operating mode of the meter. Selects between peak and RMS calculations. See the discussion section for more details. FLOAT32 attackTime; // Attack time of the meter. Specifies how quickly the meter value rises. FLOAT32 releaseTime; // Release time of the meter. Specifies how quickly the meter decays. FLOAT32 attackCoeff; // Internal coefficient that realizes the attack time. FLOAT32 releaseCoeff; // Internal coefficient that realizes the release time. FLOAT32* value; // Array of meter output values, one per channel. } ModuleMeterClass;

Variables

Properties

Name

Type

Usage

isHidden

Default value

Range

Units

meterType

int

parameter

0

18

Unrestricted

 

attackTime

float

derived

1

65

0:1000

msec

releaseTime

float

derived

1

65

0:10000

msec

attackCoeff

float

derived

1

0.02336

Unrestricted

 

releaseCoeff

float

derived

1

0.02336

Unrestricted

 

value

float*

state

0

[1 x 1]

-60:10

linear

Pins

Input Pins

Name: in

Description: audio input

Data type: float

Channel range: Unrestricted

Block size range: Unrestricted

Sample rate range: Unrestricted

Complex support: Real

Scratch Pins

Channel count: 1

Block size: 32

Sample rate: 48000

MATLAB Usage

File Name: meter_module.m

M=meter_module(NAME) Creates a meter module for use in the Audio Weaver environment. The module has a single multichannel input pin. Arguments: NAME - name of the module.

Â