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

Oscilloscope audio processor. More...

#include <PluginProcessor.h>

Inheritance diagram for OscilloscopeAudioProcessor:

Public Member Functions

 OscilloscopeAudioProcessor ()
 
 ~OscilloscopeAudioProcessor () override
 
void prepareToPlay (double sampleRate, int samplesPerBlock) override
 
void releaseResources () override
 
bool isBusesLayoutSupported (const BusesLayout &layouts) const override
 
void processBlock (juce::AudioBuffer< float > &, juce::MidiBuffer &) override
 
juce::AudioProcessorEditor * createEditor () override
 
bool hasEditor () const override
 
const juce::String getName () const override
 
bool acceptsMidi () const override
 
bool producesMidi () const override
 
bool isMidiEffect () const override
 
double getTailLengthSeconds () const override
 
int getNumPrograms () override
 
int getCurrentProgram () override
 
void setCurrentProgram (int index) override
 
const juce::String getProgramName (int index) override
 
void changeProgramName (int index, const juce::String &newName) override
 
void getStateInformation (juce::MemoryBlock &destData) override
 
void setStateInformation (const void *data, int sizeInBytes) override
 
int getSampleRate ()
 
AudioBufferQueue< float > * getAudioBufferQueue ()
 
juce::AudioProcessorValueTreeState * getTreeState ()
 
int getEditorWidth ()
 
int getEditorHeight ()
 
void storeEditorSize (int width, int height)
 
int getEditorRefreshRate ()
 

Detailed Description

Oscilloscope audio processor.

This class handles all the audio I/O operations, initialization and state retrieval.

Definition at line 24 of file PluginProcessor.h.

Constructor & Destructor Documentation

◆ OscilloscopeAudioProcessor()

OscilloscopeAudioProcessor::OscilloscopeAudioProcessor ( )

Construct a new Oscilloscope Audio Processor object

Definition at line 13 of file PluginProcessor.cpp.

◆ ~OscilloscopeAudioProcessor()

OscilloscopeAudioProcessor::~OscilloscopeAudioProcessor ( )
override

Destroy the Oscilloscope Audio Processor object

Definition at line 61 of file PluginProcessor.cpp.

Member Function Documentation

◆ acceptsMidi()

bool OscilloscopeAudioProcessor::acceptsMidi ( ) const
override

Returns whether the plugin accepts midi.

Returns
true if the plugin accepts midi.
false otherwise.

Definition at line 83 of file PluginProcessor.cpp.

◆ changeProgramName()

void OscilloscopeAudioProcessor::changeProgramName ( int  index,
const juce::String &  newName 
)
override

Definition at line 123 of file PluginProcessor.cpp.

◆ createEditor()

juce::AudioProcessorEditor * OscilloscopeAudioProcessor::createEditor ( )
override

Create a Editor object

Returns
juce::AudioProcessorEditor*

Definition at line 190 of file PluginProcessor.cpp.

◆ getAudioBufferQueue()

AudioBufferQueue< float > * OscilloscopeAudioProcessor::getAudioBufferQueue ( )

Get the AudioBufferQueue object

Returns
AudioBufferQueue<float>* Audio Buffer Queue object.

Definition at line 227 of file PluginProcessor.cpp.

◆ getCurrentProgram()

int OscilloscopeAudioProcessor::getCurrentProgram ( )
override

Definition at line 115 of file PluginProcessor.cpp.

◆ getEditorHeight()

int OscilloscopeAudioProcessor::getEditorHeight ( )

Get editor height.

Returns
Editor height.

Definition at line 247 of file PluginProcessor.cpp.

◆ getEditorRefreshRate()

int OscilloscopeAudioProcessor::getEditorRefreshRate ( )

Get the stored refresh rate.

Returns
Stored editors' refresh rate.

Definition at line 264 of file PluginProcessor.cpp.

◆ getEditorWidth()

int OscilloscopeAudioProcessor::getEditorWidth ( )

Get editor width.

Returns
Editor width.

Definition at line 241 of file PluginProcessor.cpp.

◆ getName()

const juce::String OscilloscopeAudioProcessor::getName ( ) const
override

Get the Name object

Returns
const juce::String

Definition at line 79 of file PluginProcessor.cpp.

◆ getNumPrograms()

int OscilloscopeAudioProcessor::getNumPrograms ( )
override

Definition at line 109 of file PluginProcessor.cpp.

◆ getProgramName()

const juce::String OscilloscopeAudioProcessor::getProgramName ( int  index)
override

Definition at line 119 of file PluginProcessor.cpp.

◆ getSampleRate()

int OscilloscopeAudioProcessor::getSampleRate ( )

Get the Sample Rate of the host.

Returns
int sample rate.

Definition at line 225 of file PluginProcessor.cpp.

◆ getStateInformation()

void OscilloscopeAudioProcessor::getStateInformation ( juce::MemoryBlock &  destData)
override

Get the State Information object

Parameters
destDatamemory block where to store information.

Definition at line 195 of file PluginProcessor.cpp.

◆ getTailLengthSeconds()

double OscilloscopeAudioProcessor::getTailLengthSeconds ( ) const
override

Definition at line 107 of file PluginProcessor.cpp.

◆ getTreeState()

juce::AudioProcessorValueTreeState * OscilloscopeAudioProcessor::getTreeState ( )

Get the TreeState object

Returns
juce::AudioProcessorValueTreeState* TreeState.

Definition at line 231 of file PluginProcessor.cpp.

◆ hasEditor()

bool OscilloscopeAudioProcessor::hasEditor ( ) const
override

Return whether the plugin has an editor.

Returns
true if the plugin has an editor.
false otherwise.

Definition at line 186 of file PluginProcessor.cpp.

◆ isBusesLayoutSupported()

bool OscilloscopeAudioProcessor::isBusesLayoutSupported ( const BusesLayout &  layouts) const
override

Definition at line 141 of file PluginProcessor.cpp.

◆ isMidiEffect()

bool OscilloscopeAudioProcessor::isMidiEffect ( ) const
override

Return whether the plugin is a midi effect.

Returns
true if the plugin is a midi effect.
false otherwise.

Definition at line 99 of file PluginProcessor.cpp.

◆ prepareToPlay()

void OscilloscopeAudioProcessor::prepareToPlay ( double  sampleRate,
int  samplesPerBlock 
)
override

Use this method as the place to do any pre-playback initialisation.

Parameters
sampleRateSample rate.
samplesPerBlockSamples per block.

Definition at line 127 of file PluginProcessor.cpp.

◆ processBlock()

void OscilloscopeAudioProcessor::processBlock ( juce::AudioBuffer< float > &  buffer,
juce::MidiBuffer &  midiMessages 
)
override

Process a block of audio data.

Definition at line 166 of file PluginProcessor.cpp.

◆ producesMidi()

bool OscilloscopeAudioProcessor::producesMidi ( ) const
override

Returns whether the plugin produces midi.

Returns
true if the plugin produces midi.
false otherwise.

Definition at line 91 of file PluginProcessor.cpp.

◆ releaseResources()

void OscilloscopeAudioProcessor::releaseResources ( )
override

When playback stops, you can use this as an opportunity to free up any spare memory, etc.

Definition at line 138 of file PluginProcessor.cpp.

◆ setCurrentProgram()

void OscilloscopeAudioProcessor::setCurrentProgram ( int  index)
override

Definition at line 117 of file PluginProcessor.cpp.

◆ setStateInformation()

void OscilloscopeAudioProcessor::setStateInformation ( const void *  data,
int  sizeInBytes 
)
override

Set the State Information object

Parameters
datamemory block where to read information.
sizeInBytessize in bytes.

Definition at line 205 of file PluginProcessor.cpp.

◆ storeEditorSize()

void OscilloscopeAudioProcessor::storeEditorSize ( int  width,
int  height 
)

Store editor size in order to be able to recover it from the

Parameters
processorTreeStateValueTree. This is done in order to make the editor size persistent.
widthEditor width.
heightEditor height.

Definition at line 254 of file PluginProcessor.cpp.


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