Overview
Squares all inputs and then sums them together
Discussion
Squares all input channels, and sums them together. The ONECHANNELOUTPUT parameter allows the user to select between a multichannel output (for multichannel input pins), or a mono output. If ONECHANNELOUTPUT=1, then all of the signals are summed to form a mono output channel. If ONECHANNELOUTPUT=0, all input pins must have the same number of channels, and the ith channel for each input pin is summed together, resulting in a multichannel output.
Type Definition
Code Block |
---|
typedef struct _ModuleSquareAdd { ModuleInstanceDescriptor instance; // Common Audio Weaver module instance structure INT32 oneChannelOutput; // Boolean value to determine if multichannel output or mono output. } ModuleSquareAddClass; |
Variables
Properties
Name | Type | Usage | isHidden | Default value | Range | Units |
oneChannelOutput | int | const | 0 | 1 | 0:1:1 |
Pins
Input Pins
Name: in1
Description: Input signal
...
Sample rate range: Unrestricted
Complex support: Real
Output Pins
Name: out
Description: Output signal
Data type: float
MATLAB Usage
File Name: square_add_module.m
...