The MagicPlotSources act as an interface, so the GUI can visualise an arbitrary plot of data. More...
Public Member Functions | |
MagicPlotSource ()=default | |
virtual | ~MagicPlotSource ()=default |
virtual void | pushSamples (const juce::AudioBuffer< float > &buffer)=0 |
This is the callback whenever new sample data arrives. More... | |
virtual void | createPlotPaths (juce::Path &path, juce::Path &filledPath, juce::Rectangle< float > bounds, MagicPlotComponent &component)=0 |
This is the callback that creates the plot for drawing. More... | |
virtual void | prepareToPlay (double sampleRate, int samplesPerBlockExpected)=0 |
This method is called by the MagicProcessorState to allow the plot computation to be set up. More... | |
virtual bool | isActive () const |
You can add an active state to your plot to allow to paint in different colours. More... | |
virtual void | setActive (bool shouldBeActive) |
juce::int64 | getLastDataUpdate () const |
Use this information to invalidate your plot drawing. More... | |
void | resetLastDataFlag () |
Call this to invalidate the lastData flag. More... | |
virtual juce::TimeSliceClient * | getBackgroundJob () |
If your plot needs background processing, return here a pointer to your TimeSliceClient, and it will automatically be added to the common background thread. More... | |
The MagicPlotSources act as an interface, so the GUI can visualise an arbitrary plot of data.
To create a specific new plot, create a subclass and implement drawPlot.
|
default |
|
virtualdefault |
|
pure virtual |
This is the callback whenever new sample data arrives.
It is the subclasses responsibility to put that into a FIFO and return as quickly as possible.
Implemented in MagicOscilloscope, MagicFilterPlot, and MagicAnalyser.
|
pure virtual |
This is the callback that creates the plot for drawing.
path | is the path instance that is constructed by the MagicPlotSource |
filledPath | is the path instance that is constructed by the MagicPlotSource to be filled |
bounds | the bounds of the plot |
component | grants access to the plot component, e.g. to find the colours from it |
Implemented in MagicOscilloscope, MagicFilterPlot, and MagicAnalyser.
|
pure virtual |
This method is called by the MagicProcessorState to allow the plot computation to be set up.
Implemented in MagicOscilloscope, MagicFilterPlot, and MagicAnalyser.
|
virtual |
You can add an active state to your plot to allow to paint in different colours.
|
virtual |
juce::int64 getLastDataUpdate | ( | ) | const |
Use this information to invalidate your plot drawing.
void resetLastDataFlag | ( | ) |
Call this to invalidate the lastData flag.
Referenced by MagicOscilloscope::pushSamples(), and MagicFilterPlot::setIIRCoefficients().
|
virtual |
If your plot needs background processing, return here a pointer to your TimeSliceClient, and it will automatically be added to the common background thread.
Reimplemented in MagicAnalyser.