Overview
Shifts the samples in a block of data left or right a specified number of samples
Discussion
This module shifts the data in a block of data a specified number of samples left or right. The blockSize of the output pin is the equal to the blockSize of the input pin. Zeros are shifted in and samples are dropped, as necessary. This module is typically used with frequency domain data to shift spectra up or down in frequency. The module operates on multichannel signals and the same shifting operation is applied to each channel.
The parameter, index specifies the number of values to be shifted. The index is zero based, and must lie in the range of [-blockSize+1 blockSize-1]. If index is outside of the allowable range, it is clipped to the ends of the buffers. Negative values of index cause the data to be shifted down in time, and positive values of index cause the data to be shifted up in time.
Type Definition
Code Block |
---|
typedef struct _ModuleShiftSamples { ModuleInstanceDescriptor instance; // Common Audio Weaver module instance structure INT32 index; // Specifies the number of values to be shifted. } ModuleShiftSamplesClass; |
Variables
Properties
Name | Type | Usage | isHidden | Default value | Range | Units |
index | int | parameter | 0 | 0 | -31:31 |
Pins
Input Pins
Name: in
Description: Input signal
...
Complex support: Real and Complex
Output Pins
Name: out
Description: Output signal
Data type: {float, int, fract32}
MATLAB Usage
File Name: shift_samples_module.m
...