Overview
Subband smoothing across frequency bins
Discussion
This module performs smoothing across frequency bins. Smoothing is done by averaging multiple bins to the left and right of a particular frequency sample. The smoothing only operates on real data. To smooth complex data it must first be decomposed into real and imaginary components.
...
The module is designed to work with the wola_analysis_subsystem.m and the sample rate specified equals the decimated subband sample rate.
Type Definition
Code Block |
---|
typedef struct _ModuleSbSmoothFract32 { ModuleInstanceDescriptor instance; // Common Audio Weaver module instance structure INT32 type; // Determines which type of smoothing is applied: Linear=0, Logarithmic=1, Custom=2 FLOAT32 startFreq; // Starting frequency for the smoothing operation FLOAT32 width; // Amount of smoothing INT32* startIndex; // Starting index for the averaging process. INT32* endIndex; // Ending index for the averaging process. fract32* oneOverN; // Precomputed 1/N for averaging. fract32* cumSum; // Cumulative sum of values from the start of the buffer. This holds 64-bit values. } ModuleSbSmoothFract32Class; |
Variables
Properties
Name | Type | Usage | isHidden | Default value | Range | Units |
type | int | parameter | 0 | 1 | 0:2 | |
startFreq | float | parameter | 0 | 0 | 0:24000 | Hz |
width | float | parameter | 0 | 0.1667 | 0:2400 | |
startIndex | int* | derived | 1 | [257 x 1] | Unrestricted | |
endIndex | int* | derived | 1 | [257 x 1] | Unrestricted | |
oneOverN | fract32* | derived | 1 | [257 x 1] | Unrestricted | |
cumSum | fract32* | state | 1 | [516 x 1] | Unrestricted |
Pins
Input Pins
Name: in
Description: audio input
...
Sample rate range: Unrestricted
Complex support: Real
Output Pins
Name: out
Description: audio output
Data type: fract32
MATLAB Usage
File Name: sb_smooth_fract32_module.m
...