Abstract base class for creating processors. More...
#include <GenericProcessor.h>
Classes | |
struct | ProcessorSettings |
Public Types | |
enum | eventTypes { TIMESTAMP = 0, BUFFER_SIZE = 1, PARAMETER_CHANGE = 2, TTL = 3, SPIKE = 4, EEG = 5, CONTINUOUS = 6 } |
enum | eventChannelTypes { GENERIC_EVENT = 999, SINGLE_ELECTRODE = 1, STEREOTRODE = 2, TETRODE = 4 } |
Public Member Functions | |
GenericProcessor (const String &name_) | |
virtual | ~GenericProcessor () |
const String | getName () const |
virtual void | prepareToPlay (double sampleRate, int estimatedSamplesPerBlock) |
void | releaseResources () |
virtual void | setParameter (int parameterIndex, float newValue) |
virtual AudioProcessorEditor * | createEditor () |
bool | hasEditor () const |
void | reset () |
void | setCurrentProgramStateInformation (const void *data, int sizeInBytes) |
void | setStateInformation (const void *data, int sizeInBytes) |
void | getCurrentProgramStateInformation (MemoryBlock &destData) |
void | getStateInformation (MemoryBlock &destData) |
void | changeProgramName (int index, const String &newName) |
void | setCurrentProgram (int index) |
const String | getInputChannelName (int channelIndex) const |
const String | getOutputChannelName (int channelIndex) const |
const String | getParameterName (int parameterIndex) |
const String | getParameterText (int parameterIndex) |
const String | getProgramName (int index) |
bool | isInputChannelStereoPair (int index) const |
bool | isOutputChannelStereoPair (int index) const |
bool | acceptsMidi () const |
bool | producesMidi () const |
bool | isParameterAutomatable (int parameterIndex) |
bool | isMetaParameter (int parameterIndex) |
int | getNumParameters () |
int | getNumPrograms () |
int | getCurrentProgram () |
float | getParameter (int parameterIndex) |
Parameter & | getParameterByName (String parameterName) |
Parameter & | getParameterReference (int parameterIndex) |
virtual void | process (AudioSampleBuffer &, MidiBuffer &, int &)=0 |
virtual float | getSampleRate () |
virtual float | getDefaultSampleRate () |
virtual int | getNumInputs () |
virtual int | getNumOutputs () |
virtual int | getDefaultNumOutputs () |
virtual float | getDefaultBitVolts () |
virtual int | getNextChannel (bool) |
virtual void | resetConnections () |
virtual void | setCurrentChannel (int chan) |
int | getNodeId () |
void | setNodeId (int id) |
GenericProcessor * | getSourceNode () |
GenericProcessor * | getDestNode () |
virtual void | switchIO (int) |
virtual void | switchIO () |
virtual void | setPathToProcessor (GenericProcessor *p) |
virtual void | setSourceNode (GenericProcessor *sn) |
virtual void | setDestNode (GenericProcessor *dn) |
virtual void | setMergerSourceNode (GenericProcessor *sn) |
virtual void | setSplitterDestNode (GenericProcessor *dn) |
virtual bool | isSource () |
virtual bool | isSink () |
virtual bool | isSplitter () |
virtual bool | isMerger () |
virtual bool | canSendSignalTo (GenericProcessor *) |
virtual bool | isReady () |
virtual bool | enable () |
virtual bool | disable () |
virtual void | enableEditor () |
virtual void | disableEditor () |
virtual bool | enabledState () |
virtual void | enabledState (bool t) |
virtual void | enableCurrentChannel (bool) |
virtual bool | stillHasSource () |
virtual AudioSampleBuffer * | getContinuousBuffer () |
virtual MidiBuffer * | getEventBuffer () |
virtual int | checkForEvents (MidiBuffer &mb) |
virtual void | addEvent (MidiBuffer &mb, uint8 type, int sampleNum, uint8 eventID=0, uint8 eventChannel=0, uint8 numBytes=0, uint8 *data=0) |
virtual void | handleEvent (int eventType, MidiMessage &event, int samplePosition=0) |
virtual GenericEditor * | getEditor () |
virtual void | clearSettings () |
virtual void | update () |
virtual void | updateSettings () |
void | setStartChannel (int i) |
int | getStartChannel () |
![]() | |
AccessClass () | |
~AccessClass () | |
void | setUIComponent (UIComponent *) |
Sets the object's UIComponent and copies all the necessary pointers from the UIComponent. | |
virtual void | updateChildComponents () |
Called within setUIComponent() to enable subclasses to update their members' pointers. | |
EditorViewport * | getEditorViewport () |
Returns a pointer to the application's EditorViewport. | |
DataViewport * | getDataViewport () |
Returns a pointer to the application's DataViewport. | |
ProcessorList * | getProcessorList () |
Returns a pointer to the application's ProcessorList. | |
ProcessorGraph * | getProcessorGraph () |
Returns a pointer to the application's ProcessorGraph. | |
ControlPanel * | getControlPanel () |
Returns a pointer to the application's DataViewport. | |
MessageCenter * | getMessageCenter () |
Returns a pointer to the application's MessageCenter. | |
UIComponent * | getUIComponent () |
Returns a pointer to the application's UIComponent. | |
AudioComponent * | getAudioComponent () |
Returns a pointer to the application's AudioComponent. |
Public Attributes | |
GenericProcessor * | sourceNode |
GenericProcessor * | destNode |
bool | isEnabled |
bool | wasConnected |
int | nextAvailableChannel |
int | saveOrder |
int | loadOrder |
int | currentChannel |
ScopedPointer< GenericEditor > | editor |
OwnedArray< Channel > | channels |
OwnedArray< Channel > | eventChannels |
ProcessorSettings | settings |
int | nodeId |
Array< Parameter > | parameters |
StringArray | parameterNames |
Parameter | nullParam |
Abstract base class for creating processors.
All processors must be derived from this class, and must provide an implementation of the process() method.
Any processors that are not filters must override the isSource(), isSink(), isSplitter(), and isMerger() methods.
GenericProcessor::GenericProcessor | ( | const String & | name_ | ) |
|
virtual |
const String GenericProcessor::getName | ( | ) | const |
|
virtual |
Reimplemented in AudioResamplingNode.
void GenericProcessor::releaseResources | ( | ) |
Reimplemented in AudioResamplingNode.
|
virtual |
|
virtual |
Reimplemented in SpikeDetector, SourceNode, AudioNode, ArduinoOutput, ResamplingNode, WiFiOutput, FPGAOutput, EventNode, SpikeDisplayNode, SignalGenerator, FilterNode, ReferenceNode, LfpDisplayNode, Splitter, Merger, and RecordControl.
bool GenericProcessor::hasEditor | ( | ) | const |
Reimplemented in SourceNode, ResamplingNode, PhaseDetector, SignalGenerator, FilterNode, and ReferenceNode.
void GenericProcessor::reset | ( | ) |
void GenericProcessor::setCurrentProgramStateInformation | ( | const void * | data, |
int | sizeInBytes | ||
) |
void GenericProcessor::setStateInformation | ( | const void * | data, |
int | sizeInBytes | ||
) |
void GenericProcessor::getCurrentProgramStateInformation | ( | MemoryBlock & | destData | ) |
void GenericProcessor::getStateInformation | ( | MemoryBlock & | destData | ) |
void GenericProcessor::changeProgramName | ( | int | index, |
const String & | newName | ||
) |
void GenericProcessor::setCurrentProgram | ( | int | index | ) |
const String GenericProcessor::getInputChannelName | ( | int | channelIndex | ) | const |
const String GenericProcessor::getOutputChannelName | ( | int | channelIndex | ) | const |
const String GenericProcessor::getParameterName | ( | int | parameterIndex | ) |
const String GenericProcessor::getParameterText | ( | int | parameterIndex | ) |
const String GenericProcessor::getProgramName | ( | int | index | ) |
bool GenericProcessor::isInputChannelStereoPair | ( | int | index | ) | const |
bool GenericProcessor::isOutputChannelStereoPair | ( | int | index | ) | const |
bool GenericProcessor::acceptsMidi | ( | ) | const |
bool GenericProcessor::producesMidi | ( | ) | const |
bool GenericProcessor::isParameterAutomatable | ( | int | parameterIndex | ) |
bool GenericProcessor::isMetaParameter | ( | int | parameterIndex | ) |
int GenericProcessor::getNumParameters | ( | ) |
References parameters.
int GenericProcessor::getNumPrograms | ( | ) |
int GenericProcessor::getCurrentProgram | ( | ) |
float GenericProcessor::getParameter | ( | int | parameterIndex | ) |
Parameter& GenericProcessor::getParameterByName | ( | String | parameterName | ) |
Parameter& GenericProcessor::getParameterReference | ( | int | parameterIndex | ) |
|
pure virtual |
Implemented in ExampleProcessor, SpikeDetector, SpikeDisplayNode, RecordNode, AudioResamplingNode, SourceNode, WiFiOutput, AudioNode, LfpDisplayNode, ArduinoOutput, FPGAOutput, ResamplingNode, Splitter, PhaseDetector, Merger, FilterNode, ReferenceNode, SignalGenerator, EventDetector, EventNode, and RecordControl.
|
virtual |
Reimplemented in SourceNode, and SignalGenerator.
References GenericProcessor::ProcessorSettings::sampleRate, and settings.
|
virtual |
Reimplemented in SourceNode.
|
virtual |
References GenericProcessor::ProcessorSettings::numInputs, and settings.
|
virtual |
References GenericProcessor::ProcessorSettings::numOutputs, and settings.
|
virtual |
Reimplemented in SignalGenerator, SourceNode, and EventNode.
|
virtual |
Reimplemented in SourceNode.
|
virtual |
|
virtual |
Reimplemented in RecordNode, and AudioNode.
|
virtual |
References currentChannel.
int GenericProcessor::getNodeId | ( | ) |
References nodeId.
void GenericProcessor::setNodeId | ( | int | id | ) |
References nodeId.
GenericProcessor* GenericProcessor::getSourceNode | ( | ) |
References sourceNode.
GenericProcessor* GenericProcessor::getDestNode | ( | ) |
References destNode.
|
virtual |
Reimplemented in Splitter.
|
virtual |
|
virtual |
|
virtual |
Reimplemented in Merger.
|
virtual |
Reimplemented in Splitter.
|
virtual |
Reimplemented in SourceNode, SignalGenerator, ExampleProcessor, and EventNode.
|
virtual |
Reimplemented in ArduinoOutput, WiFiOutput, FPGAOutput, SpikeDisplayNode, ExampleProcessor, and LfpDisplayNode.
|
virtual |
Reimplemented in Splitter.
|
virtual |
Reimplemented in Merger.
|
virtual |
|
virtual |
Reimplemented in SourceNode.
References isEnabled.
|
virtual |
Reimplemented in RecordNode, SpikeDetector, SourceNode, SpikeDisplayNode, LfpDisplayNode, ResamplingNode, ArduinoOutput, PhaseDetector, and SignalGenerator.
References isEnabled.
|
virtual |
Reimplemented in RecordNode, SpikeDetector, SourceNode, SpikeDisplayNode, LfpDisplayNode, ArduinoOutput, and SignalGenerator.
|
virtual |
|
virtual |
|
virtual |
References isEnabled.
|
virtual |
Reimplemented in SourceNode.
References isEnabled.
|
virtual |
Reimplemented in AudioNode.
|
virtual |
Reimplemented in Merger.
|
virtual |
Reimplemented in AudioResamplingNode.
|
virtual |
|
virtual |
|
virtual |
|
virtual |
Reimplemented in LfpDisplayNode, WiFiOutput, ArduinoOutput, FPGAOutput, and RecordControl.
|
virtual |
References editor.
|
virtual |
|
virtual |
|
virtual |
Reimplemented in SpikeDetector, FPGAOutput, SignalGenerator, LfpDisplayNode, PhaseDetector, Merger, FilterNode, ReferenceNode, ResamplingNode, and EventNode.
void GenericProcessor::setStartChannel | ( | int | i | ) |
int GenericProcessor::getStartChannel | ( | ) |
GenericProcessor* GenericProcessor::sourceNode |
Referenced by getSourceNode().
GenericProcessor* GenericProcessor::destNode |
Referenced by getDestNode().
bool GenericProcessor::isEnabled |
Referenced by enable(), enabledState(), and isReady().
bool GenericProcessor::wasConnected |
int GenericProcessor::nextAvailableChannel |
int GenericProcessor::saveOrder |
int GenericProcessor::loadOrder |
int GenericProcessor::currentChannel |
Referenced by setCurrentChannel().
ScopedPointer<GenericEditor> GenericProcessor::editor |
Referenced by getEditor().
OwnedArray<Channel> GenericProcessor::channels |
OwnedArray<Channel> GenericProcessor::eventChannels |
ProcessorSettings GenericProcessor::settings |
Referenced by getNumInputs(), getNumOutputs(), and getSampleRate().
int GenericProcessor::nodeId |
Referenced by getNodeId(), and setNodeId().
Array<Parameter> GenericProcessor::parameters |
Referenced by getNumParameters().
StringArray GenericProcessor::parameterNames |
Parameter GenericProcessor::nullParam |