Overview
Sample and hold module
Discussion
An audio rate sample and hold module for use with the Audio Weaver environment. The module has two input pins: trigger and data. The trigger signal block size must be either 1 or the same block size as the input signal. If the trigger signal block size is 1 then the trigger applies to all the samples.
...
Internally, the module stores the sampled data within the value array. This array has 1 sample per input channel.
Type Definition
Code Block |
---|
typedef struct _ModuleSampleAndHold { ModuleInstanceDescriptor instance; // Common Audio Weaver module instance structure FLOAT32* value; // Holds the last data value which was sampled. This is an array so that multiple channels can be supported. } ModuleSampleAndHoldClass; |
Variables
Properties
Name | Type | Usage | isHidden | Default value | Range | Units |
value | float* | state | 0 | [1 x 1] | Unrestricted |
Pins
Input Pins
Name: trig
Description: trigger signal
...
Sample rate range: Unrestricted
Complex support: Real
Output Pins
Name: out
Description: output data
Data type: {float, int, fract32}
MATLAB Usage
File Name: sample_and_hold_module.m
...