Skip to main content
Skip table of contents

ComplexModulate

Overview

This module accepts a real or complex input and generates a complex

Discussion

This module multiplies the input by the complex exponential exp(-j*2*pi*modBin*n/K) where modBin is an inspector parameter, K is the size of the input buffer (the FFT size) and n = 0:1:(K-1) is the sample number in the block. The only tunable parameter is modBin and K is taken from the wire size.

This module is usually used as part of frequency domain processing. The module effectively shifts the frequency spectrum right by 2*pi*modBin/K radians/sample. Alternatively, you can think of the modules as shifting by modBin FFT bins.

modBin is a floating-point value and can take on any real value including non-integer values. By default modBin = 0.25. The module supports real and complex inputs and always generates a complex output.

Type Definition

CODE
typedef struct _ModuleComplexModulate
{
    ModuleInstanceDescriptor instance;            // Common Audio Weaver module instance structure
    FLOAT32 modBin;                               // Omega of modulation coefficient equation.
    FLOAT32* modCoeffs;                           // Modulation coefficient array
} ModuleComplexModulateClass;

Variables

Properties

Name

Type

Usage

isHidden

Default value

Range

Units

modBin

float

parameter

0

0.25

Unrestricted

modCoeffs

float*

state

1

[32 x 1]

Unrestricted

Pins

Input Pins

Name: in

Description: Real or complex input

Data type: float

Channel range: 1

Block size range: Unrestricted

Sample rate range: Unrestricted

Complex support: Real and Complex

Output Pins

Name: cmplx

Description: Complex result

Data type: float

MATLAB Usage

File Name: complex_modulate_module.m

CODE
 M=complex_modulate_module(NAME)
 This module accepts a real or complex input and generates a complex
 output by multiplying input with exp(j*2*pi*modBin*n/N)
 Arguments:
    NAME - name of the module.

JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.