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

Counts calls to process(), returning true every division calls. More...

#include <digital.hpp>

Public Member Functions

void reset ()
 
void setDivision (uint32_t division)
 
uint32_t getDivision ()
 
uint32_t getClock ()
 
bool process ()
 Returns true when the clock reaches division and resets.
 

Public Attributes

uint32_t clock = 0
 
uint32_t division = 1
 

Detailed Description

Counts calls to process(), returning true every division calls.

Example:

if (divider.process()) {

Runs every division calls }

Member Function Documentation

◆ reset()

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

◆ setDivision()

void rack::dsp::ClockDivider::setDivision ( uint32_t division)
inline

◆ getDivision()

uint32_t rack::dsp::ClockDivider::getDivision ( )
inline

◆ getClock()

uint32_t rack::dsp::ClockDivider::getClock ( )
inline

◆ process()

bool rack::dsp::ClockDivider::process ( )
inline

Returns true when the clock reaches division and resets.

Member Data Documentation

◆ clock

uint32_t rack::dsp::ClockDivider::clock = 0

◆ division

uint32_t rack::dsp::ClockDivider::division = 1

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