(8.D.2.1) PhaseDifferencePostFilter
Overview
Phase Difference Post Filter
Type Definition
typedef struct _ModulePhaseDifferencePostFilter
{
ModuleInstanceDescriptor instance; // Common Audio Weaver module instance structure
FLOAT32 filterDelayThreshold; // Threshold to determine if a time-freq bin is within the specified direction
FLOAT32 targetWidth; // The width of the target direction, in degrees. Calculated from targetDir, micSpacing, and filterDelayThreshold
FLOAT32 maskAttenDB; // dB units - attenuation in the time-freq bin if the sound from that bin is not in the specified direction
FLOAT32 maskAtten; // Linear units - attenuation in the time-freq bin if the sound from that bin is not in the specified direction
FLOAT32 timeDomainSR; // Sample rate - in time domain
FLOAT32 targetDir; // Target direction, in degrees. NOT Implemented
FLOAT32 micSpacing; // Mic Spacing, in meters.
INT32 fftSize; // FFT Size
INT32 numBins; // Number of bins
INT32 numFilters; // Number of Gammatone Filters
FLOAT32 epsilon; // A small number
FLOAT32* gtFilterMag; // Matrix holding the magnitude of gammatone filter coefficients (real)
FLOAT32* phaseDiff; // Phase difference, in radians. Part of scratch.
FLOAT32* oneOverExpectedPhaseDiff; // One over the expected phase difference.
FLOAT32* W; // Gammatone domain weights
FLOAT32* mu; // Mask
FLOAT32* mu_g; // Mask after Gammatone filterbank
} ModulePhaseDifferencePostFilterClass;
Variables
Properties
Name | Type | Usage | isHidden | Default value | Range | Units |
filterDelayThreshold | float | parameter | 0 | 0.2 | 0:10 | Â |
targetWidth | float | derived | 0 | 6.5544 | Unrestricted | Â |
maskAttenDB | float | parameter | 0 | -40 | -60:0 | Â |
maskAtten | float | derived | 0 | 0.01 | Unrestricted | Â |
timeDomainSR | float | const | 0 | 16000 | Unrestricted | Â |
targetDir | float | parameter | 0 | 0 | Unrestricted | Â |
micSpacing | float | parameter | 0 | 0.075 | Unrestricted | Â |
fftSize | int | const | 0 | 512 | Unrestricted | Â |
numBins | int | const | 0 | 257 | Unrestricted | Â |
numFilters | int | const | 0 | 40 | Unrestricted | Â |
epsilon | float | const | 0 | 1e-19 | Unrestricted | Â |
gtFilterMag | float* | derived | 0 | [256 x 40] | Unrestricted | Â |
phaseDiff | float* | derived | 1 | [257 x 1] | Unrestricted | Â |
oneOverExpectedPhaseDiff | float* | derived | 1 | [257 x 1] | Unrestricted | Â |
W | float* | derived | 1 | [40 x 1] | Unrestricted | Â |
mu | float* | derived | 1 | [257 x 1] | Unrestricted | Â |
mu_g | float* | derived | 1 | [257 x 1] | Unrestricted | Â |
Pins
Input Pins
Name: in
Description: input
Data type: float
Channel range: 2
Block size range: 257
Sample rate range: Unrestricted
Complex support: Complex
Output Pins
Name: out
Description: output
Data type: float
Scratch Pins
Channel count: 1
Block size: 257
Sample rate: 48000
Â
Channel count: 1
Block size: 257
Sample rate: 48000
MATLAB Usage
File Name: phase_difference_post_filter_module.m
M=phase_difference_post_filter_module(NAME, numFilters, fftSize)
Creates a phase difference post filter module
Currently, only 2 channels are supported.
description TBD
Arguments:
NAME - name of the module.
Â