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

#include <SampleFinder.h>

Inheritance diagram for SampleFinder:

Public Member Functions

 SampleFinder (bool isCrescent, bool isAuto)
 
 ~SampleFinder ()
 
int findFirstSample (float triggerLevel, std::vector< float > currentlyDisplayedData)
 
void parameterChanged (const juce::String &parameterID, float newValue) override
 

Public Attributes

AutoSampleFinder autoFinder
 
ManualSampleFinder manualFinder
 
BaseFindercurrentFinder
 

Detailed Description

Class finding first sample to plot handling the logic for all modalities. Add this and its autoFinder and manualFinder params as listeners of "autoTriggered" and "slopeButtonTriggered" respectively and just call findFirstSample.

Definition at line 126 of file SampleFinder.h.

Constructor & Destructor Documentation

◆ SampleFinder()

SampleFinder::SampleFinder ( bool  isCrescent,
bool  isAuto 
)

Construct a new Sample Finder object.

Parameters
isCrescentWhether the slope is crescent.
isAutoWhether the mode is automatic.

Definition at line 45 of file SampleFinder.cpp.

◆ ~SampleFinder()

SampleFinder::~SampleFinder ( )

Destroy the Sample Finder object

Definition at line 53 of file SampleFinder.cpp.

Member Function Documentation

◆ findFirstSample()

int SampleFinder::findFirstSample ( float  triggerLevel,
std::vector< float >  currentlyDisplayedData 
)

Find first sample to plot in the current modality.

Parameters
triggerLevelTrigger level.
currentlyDisplayedDataCurrently displayed buffer.
Returns
int Distance in samples of first sample to plot.

Definition at line 55 of file SampleFinder.cpp.

◆ parameterChanged()

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

Sets finder according to whether the search is automatic or manual.

Parameters
parameterIDParameter to listen (always "autoTriggered")
newValuetrue if automatic, false otherwise

Definition at line 62 of file SampleFinder.cpp.

Member Data Documentation

◆ autoFinder

AutoSampleFinder SampleFinder::autoFinder

Finds first sample when in automatic mode.

Definition at line 164 of file SampleFinder.h.

◆ currentFinder

BaseFinder* SampleFinder::currentFinder

Points to the currently active finder.

Definition at line 176 of file SampleFinder.h.

◆ manualFinder

ManualSampleFinder SampleFinder::manualFinder

Finds first sample when in manual mode.

Definition at line 170 of file SampleFinder.h.


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