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.