Overview
pdf of data
Discussion
The PDF module builds a histogram of incoming data and allows you to freeze the histogram with an input pin. It also provides optional smoothing as well as an optional reset pin. A histogram is a graphical representation showing a visual impression of the distribution of data values. A histogram is essentially a table in which each entry represents the number of times that the input sample values fell in a particular range.
...
(OPTIONAL) Enable the reset pin in the Arguments tab. Connect a BooleanSource module to the optional reset pin to clear the histogram data.
Type Definition
Code Block |
---|
typedef struct _ModulePDF { ModuleInstanceDescriptor instance; // Common Audio Weaver module instance structure INT32 numBins; // Number of bins INT32 controllableResetPin; // Controlling Reset Pin FLOAT32 lowerBinEdge; // Specifies the lowest bin in the histogram FLOAT32 higherBinEdge; // Specifies the highest bin in the histogram FLOAT32 smoothingTime; // The smoothing time of the PDF in ms FLOAT32 alpha; // Forgetting factor FLOAT32 binSpacing; // BinSpacing INT32 reset; // Boolean parameter to reset the pdf. FLOAT32* binCenter; // indices FLOAT32* previousOut; // previous output. INT32* hist; // init hist. } ModulePDFClass; |
Variables
Properties
Name | Type | Usage | isHidden | Default value | Range | Units |
numBins | int | const | 0 | 32 | Unrestricted | |
controllableResetPin | int | const | 0 | 1 | Unrestricted | |
lowerBinEdge | float | parameter | 0 | -1 | Unrestricted | |
higherBinEdge | float | parameter | 0 | 1 | Unrestricted | |
smoothingTime | float | parameter | 0 | 1000 | 0:10000 | |
alpha | float | derived | 0 | 0.0006664 | Unrestricted | |
binSpacing | float | derived | 0 | 0.0625 | Unrestricted | |
reset | int | parameter | 0 | 0 | 0:1 | |
binCenter | float* | derived | 0 | [32 x 1] | Unrestricted | |
previousOut | float* | state | 0 | [32 x 1] | Unrestricted | |
hist | int* | state | 0 | [32 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: float
MATLAB Usage
File Name: pdf_module.m