Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

Version 1 Current »

Overview

Remainder of a signal by constant or by other signal on a sample-by-sample basis

Discussion

The module provides output as the remainder of numerator input. divided by denominator value or denominator input pin. If the DENOMFROMPIN argument is 1 then the module expects denominator from the input pin. The size of the denominator pin must be either 1 or blockSize of the numerator pin. Output remainder pin have the same number of channels as the input. The module implements Matlab equivalent of Mod function.

Type Definition

typedef struct _ModuleRemainder

{

    ModuleInstanceDescriptor instance;            // Common Audio Weaver module instance structure

    FLOAT32 denominator;                          // Denominator value. Enabled if DENOMFROMPIN is zero.

} ModuleRemainderClass;

Variables

Properties

Name

Type

Usage

isHidden

Default value

Range

Units

denominator

float

state

0

1

Unrestricted

Pins

Input Pins

Name: numer

Description: Numerator input

Data type: float

Channel range: Unrestricted

Block size range: Unrestricted

Sample rate range: Unrestricted

Complex support: Real

Name: denom

Description: Denominator input

Data type: float

Channel range: 1

Block size range: Unrestricted

Sample rate range: Unrestricted

Complex support: Real

Output Pins

Name: rem

Description: Remainder output

Data type: float

MATLAB Usage

File Name: remainder_module.m

 M=remainder_module(NAME, DENOMFROMPIN)
 Creates a remainder module for use in the Audio Weaver
 environment.  Arguments:
    NAME - name of the module.
    DENOMFROMPIN - flag indicates denominator is from input pin

  • No labels