Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Scroll Documents: Update page title prefix

Overview

Source module which periodically outputs an impulse. Time specified in msec.

Discussion

This module has a single mono output pin and generates a periodic impulse of value 1; all other output samples are set to 0. The variable .periodMsec specifies the period of the generation process in milliseconds and can be adjusted at run-time.

...

As with all source modules, you have to set the blockSize and sampleRate of the output pin. The module is initialized so that it fires immediately; sample 0 of block 0 is set to 1.

Type Definition

Code Block
typedef struct _ModuleImpulseMsecSourceFract32
{
    ModuleInstanceDescriptor instance;            // Common Audio Weaver module instance structure
    INT32 periodMsec;                             // Period or rate of the impulse generator (in msec).
    INT32 period;                                 // Period or rate of the impulse generator (in samples).
    INT32 sampleIndex;                            // Specifies the index of the next non-zero value.
} ModuleImpulseMsecSourceFract32Class;

Variables

Properties

Name

Type

Usage

isHidden

Default value

Range

Units

periodMsec

int

parameter

0

1000

0:10000

msec

period

int

derived

1

48000

0:240000

samples

sampleIndex

int

state

1

0

Unrestricted

Pins

Output Pins

Name: out

Description: audio output

Data type: fract32

MATLAB Usage

File Name: impulse_msec_source_fract32_module.m

...