Document toolboxDocument toolbox

(8.D.2.2) STSMR

Overview

ST Sound Meter

Discussion

The SoundMeter converts a fract32 PCM signal into a logarithmic scale. Pre-filtering is possible with three different configurations (DC removal, A-weighting and C-weighting). Logarithmic conversion is then performed. A smoothing filter allows to average the log values with a configurable time constant. It supports three different sample rates, mono or stereo signal, with a maximum input frame size of 480 stereo samples.

Supported sample rates are: 8, 16, or 48 kHz.

The inspector shows the left and right levels in dB with a useful range of 0 to -90 dB.

Type Definition

typedef struct _ModuleSTSMR { ModuleInstanceDescriptor instance; // Common Audio Weaver module instance structure INT32 enable; // Block enable INT32 averaging_time; // Smoothing time (0 - 10000) Ms INT32 filter_type; // Filter type (none, A weight, C weight, DC removal) FLOAT32 mean_level_left; // Measured left channel level FLOAT32 mean_level_right; // Measured right channel level INT32 nAPIResult; // Return status for last call into the ST API void * pGlobals; // Points to the global variables structure } ModuleSTSMRClass;

Variables

Properties

Name

Type

Usage

isHidden

Default value

Range

Units

enable

int

parameter

0

1

0:1:1

 

averaging_time

int

parameter

0

1000

0:1:10000

msec

filter_type

int

parameter

0

0

Unrestricted

 

mean_level_left

float

state

0

0

-90:0

 

mean_level_right

float

state

0

0

-90:0

 

nAPIResult

int

state

1

1

Unrestricted

 

pGlobals

void *

const

1

 

Unrestricted

 

Pins

Input Pins

Name: in

Description: audio input

Data type: fract32

Channel range: 1, 2

Block size range: 96:480

Sample rate range: 8000, 16000, 48000

Complex support: Real

Output Pins

Name: out

Description: audio output

Data type: fract32

Scratch Pins

Channel count: 1

Block size: 96

Sample rate: 8000

MATLAB Usage

File Name: st_smr_module.m

M = st_smr_module(NAME) Audio Weaver wrapper for the ST Sound Meter module. Arguments: NAME - name of the module. Copyright (c) 2017 DSP Concepts, Inc. All Rights Reserved. Author: Chris Perry

Â