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

Detects when a boolean changes from false to true. More...

#include <digital.hpp>

Public Types

enum  State : uint8_t { LOW , HIGH , UNINITIALIZED }
 
enum  Event { NONE = 0 , TRIGGERED = 1 , UNTRIGGERED = -1 }
 

Public Member Functions

void reset ()
 
bool process (bool in)
 Returns whether the input changed from false to true.
 
Event processEvent (bool in)
 Returns TRIGGERED if the input changed from false to true, and UNTRIGGERED if the input changed from true to false.
 
bool isHigh ()
 

Public Attributes

union { 
 
   State   s = UNINITIALIZED 
 
   bool   state 
 Deprecated. More...
 
};  
 

Detailed Description

Detects when a boolean changes from false to true.

Member Enumeration Documentation

◆ State

Enumerator
LOW 
HIGH 
UNINITIALIZED 

◆ Event

Enumerator
NONE 
TRIGGERED 
UNTRIGGERED 

Member Function Documentation

◆ reset()

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

◆ process()

bool rack::dsp::BooleanTrigger::process ( bool in)
inline

Returns whether the input changed from false to true.

◆ processEvent()

Event rack::dsp::BooleanTrigger::processEvent ( bool in)
inline

Returns TRIGGERED if the input changed from false to true, and UNTRIGGERED if the input changed from true to false.

◆ isHigh()

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

Member Data Documentation

◆ s

State rack::dsp::BooleanTrigger::s = UNINITIALIZED

◆ state

bool rack::dsp::BooleanTrigger::state

Deprecated.

◆ [union]


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