Skip to content

TriggeredPulse

Discussion

THIS MODULE IS DEPRECATED AND NOT RECOMMENDED FOR NEW DESIGNS. PLEASE USE THE TriggeredPulseV2 MODULE INSTEAD.

This module generates a rectangular pulse signal with a specified duration in response to an input trigger signal. You specify the pulse duration in milliseconds using the variable pulseDuration. The signal on the input pin triggers the pulse when it is non-zero. The output signal is 1 during the pulse and 0 otherwise.

If the pulse is retriggered while is is active, then the duration of the pulse is increased by pulseDuration milliseconds. If there are multiple triggers then the duration of the pulse will be cumulative.

Module Pack

Advanced

ClassID

classID = 1377

Type Definition

typedef struct _ModuleTriggeredPulse
{
ModuleInstanceDescriptor instance;            // Common Audio Weaver module instance structure
FLOAT32 pulseDuration;                        // Width of the output generated pulse.
UINT32 pulseDurationSamples;                  // Width of the output generated pulse in samples.
UINT32 sampleCount;                           // Sample counter that increments for each value output.
UINT32 extendedCount;                         // Extended pulse duation count in samples.
INT32 prevTrigState;                          // Holds the previous state of the input trigger pin.
INT32 trigger;                                // Boolean indicates when to trigger the pulse.
} ModuleTriggeredPulseClass;

Variables

Properties

Name Type Usage isHidden Default Value Range Units
pulseDuration float parameter 0 100 0:1000 msec
pulseDurationSamples uint derived 1 4800 Unrestricted
sampleCount uint state 1 0 Unrestricted
extendedCount uint state 1 0 Unrestricted
prevTrigState int state 1 0 Unrestricted
trigger int state 1 0 Unrestricted

Pins

Input Pins

Name in
Description Control input signal
Data type int
Channel range 1
Block size range 1
Sample rate range Unrestricted
Complex support Real

Output Pins

Name out
Description Control output signal
Data Type int

Matlab Usage

File Name: triggered_pulse_module.m 
 M = triggered_pulse_module(NAME, BLOCKSIZE, SAMPLERATE) 
 Creates a triggered pulse module for use with the Audio Weaver 
 environment. The module generates output pulse with the duration 
 specified by the parameter pulseDuration in msec, when the input pin 
 is triggered from 0 to 1.   

 Arguments: 
    NAME - name of the module. 
    BLOCKSIZE - number of samples on output channel. By default, 
         BLOCKSIZE inherits from the input pin. 
    SAMPLERATE - sample rate of the output signal, in Hz. By default, 
         SAMPLERATE inherits from the input pin. 

Copyright (c) 2026 DSP Concepts, Inc.