Oscilloscope 0.5.0
A simple oscilloscope VST
Loading...
Searching...
No Matches
Public Member Functions | List of all members
DecayCounter Class Reference

#include <DecayCounter.h>

Inheritance diagram for DecayCounter:

Public Member Functions

 DecayCounter (int framesPerSecond, float decaySeconds)
 
 ~DecayCounter ()
 
bool refreshNeeded ()
 
void resetDecayTime ()
 
void parameterChanged (const juce::String &parameterID, float newValue) override
 

Detailed Description

Class keeping track of decay time of the Oscilloscope

Definition at line 19 of file DecayCounter.h.

Constructor & Destructor Documentation

◆ DecayCounter()

DecayCounter::DecayCounter ( int  framesPerSecond,
float  decaySeconds 
)

Construct a new Decay Counter object

Parameters
framesPerSecondPluginEditor refresh rate.
decaySecondsDecay time in seconds.

Definition at line 13 of file DecayCounter.cpp.

◆ ~DecayCounter()

DecayCounter::~DecayCounter ( )

Destroy the Decay Counter object

Definition at line 22 of file DecayCounter.cpp.

Member Function Documentation

◆ parameterChanged()

void DecayCounter::parameterChanged ( const juce::String &  parameterID,
float  newValue 
)
override

Listens to changes in AudioProcessorValueTreeState's "decayTime" and updates decayTime accordingly

Parameters
parameterIDAlways "decayTime".
newValueNew value (between 0 and 1).

Definition at line 46 of file DecayCounter.cpp.

◆ refreshNeeded()

bool DecayCounter::refreshNeeded ( )

Decrements decay time and returns whether if it is time to refresh the wave plot.

Returns
true if decayTime <= 0.
false otherwise.

Definition at line 26 of file DecayCounter.cpp.

◆ resetDecayTime()

void DecayCounter::resetDecayTime ( )

Resets decay time to framesPerSeconds * decaySeconds

Definition at line 40 of file DecayCounter.cpp.


The documentation for this class was generated from the following files: