Divide
Overview
Divides two signals on a sample-by-sample basis
Discussion
Divides the last input into all other inputs. With an N-pin input, the output will be N-1 pins, and for i=1:(N-1): Out_i = In_i/In_N. The number of channels in the input channels needs to be identical in order for the module to properly work.
This module does not protect against divide-by-zero conditions.
Module Pack
Standard
ClassID
classID = 47
Type Definition
typedef struct _ModuleDivide
{
ModuleInstanceDescriptor instance; // Common Audio Weaver module instance structure
} ModuleDivideClass;
Pins
Input Pins
| Name | in1 |
| Description | Audio input |
| Data type | float |
| Channel range | Unrestricted |
| Block size range | Unrestricted |
| Sample rate range | Unrestricted |
| Complex support | Real |
| Name | in2 |
| Description | Audio input |
| Data type | float |
| Channel range | Unrestricted |
| Block size range | Unrestricted |
| Sample rate range | Unrestricted |
| Complex support | Real |
Output Pins
| Name | out1 |
| Description | Audio output |
| Data Type | float |
Matlab Usage
File Name: divide_module.m
M=divide_module(NAME, NUMIN)
Creates a multi-input divide module for use in the Audio Weaver
environment. Arguments:
NAME - name of the module.
NUMIN - number of input pins
Copyright (c) 2026 DSP Concepts, Inc.