VCV Rack API v2
Loading...
Searching...
No Matches
rack::dsp::PulseGenerator Struct Reference

When triggered, holds a high value for a specified time before going low again. More...

#include <digital.hpp>

Public Member Functions

void reset ()
 Immediately disables the pulse.
 
bool process (float deltaTime)
 Advances the state by deltaTime.
 
bool isHigh ()
 
void trigger (float duration=1e-3f)
 Begins a trigger with the given duration.
 

Public Attributes

float remaining = 0.f
 

Detailed Description

When triggered, holds a high value for a specified time before going low again.

Member Function Documentation

◆ reset()

void rack::dsp::PulseGenerator::reset ( )
inline

Immediately disables the pulse.

◆ process()

bool rack::dsp::PulseGenerator::process ( float deltaTime)
inline

Advances the state by deltaTime.

Returns whether the pulse was in the HIGH state before stepping.

◆ isHigh()

bool rack::dsp::PulseGenerator::isHigh ( )
inline

◆ trigger()

void rack::dsp::PulseGenerator::trigger ( float duration = 1e-3f)
inline

Begins a trigger with the given duration.

Member Data Documentation

◆ remaining

float rack::dsp::PulseGenerator::remaining = 0.f

The documentation for this struct was generated from the following file: