Detects spikes in a continuous signal and outputs events containing the spike data. More...
#include <SpikeDetector.h>
Classes | |
struct | Electrode |
Public Member Functions | |
SpikeDetector () | |
constructor | |
~SpikeDetector () | |
destructor | |
void | process (AudioSampleBuffer &buffer, MidiBuffer &events, int &nSamples) |
Processes an incoming continuous buffer and places new spikes into the event buffer. | |
void | setParameter (int parameterIndex, float newValue) |
Used to alter parameters of data acquisition. | |
void | updateSettings () |
Called whenever the signal chain is altered. | |
bool | enable () |
Called prior to start of acquisition. | |
bool | disable () |
Called after acquisition is finished. | |
AudioProcessorEditor * | createEditor () |
Creates the SpikeDetectorEditor. | |
bool | addElectrode (int nChans) |
Adds an electrode with n channels to be processed. | |
bool | removeElectrode (int index) |
Removes an electrode with a given index. | |
int | getNumChannels (int index) |
Returns the number of channels for a given electrode. | |
bool | setChannel (int electrodeIndex, int channelNum, int newChannel) |
Edits the mapping between input channels and electrode channels. | |
int | getChannel (int index, int chan) |
Returns the continuous channel that maps to a given electrode channel. | |
bool | setElectrodeName (int index, String newName) |
Sets the name of a given electrode. | |
StringArray | getElectrodeNames () |
Returns a StringArray containing the names of all electrodes. | |
void | setChannelThreshold (int electrodeNum, int channelNum, float threshold) |
double | getChannelThreshold (int electrodeNum, int channelNum) |
![]() | |
GenericProcessor (const String &name_) | |
virtual | ~GenericProcessor () |
const String | getName () const |
virtual void | prepareToPlay (double sampleRate, int estimatedSamplesPerBlock) |
void | releaseResources () |
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 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 | 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) |
virtual GenericEditor * | getEditor () |
virtual bool | isAudioOrRecordNode () |
virtual bool | recordStatus (int chan) |
virtual bool | audioStatus (int chan) |
virtual void | clearSettings () |
virtual void | generateDefaultChannelNames (StringArray &) |
virtual void | update () |
void | setStartChannel (int i) |
int | getStartChannel () |
![]() | |
AccessClass () | |
~AccessClass () | |
void | setUIComponent (UIComponent *) |
virtual void | updateChildComponents () |
EditorViewport * | getEditorViewport () |
DataViewport * | getDataViewport () |
ProcessorList * | getProcessorList () |
ProcessorGraph * | getProcessorGraph () |
ControlPanel * | getControlPanel () |
MessageCenter * | getMessageCenter () |
UIComponent * | getUIComponent () |
AudioComponent * | getAudioComponent () |
Public Attributes | |
AudioSampleBuffer | overflowBuffer |
Extra samples are placed in this buffer to allow seamless transitions between callbacks. | |
AudioSampleBuffer & | dataBuffer |
Reference to a continuous buffer (for internal use only). | |
StringArray | electrodeTypes |
Returns a list of possible electrode types (e.g., stereotrode, tetrode). | |
![]() | |
GenericProcessor * | sourceNode |
GenericProcessor * | destNode |
bool | isEnabled |
bool | wasConnected |
int | nextAvailableChannel |
int | saveOrder |
int | loadOrder |
int | currentChannel |
ScopedPointer< GenericEditor > | editor |
ProcessorSettings | settings |
int | nodeId |
Array< Parameter > | parameters |
StringArray | parameterNames |
Parameter | nullParam |
Additional Inherited Members | |
![]() | |
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 } |
Detects spikes in a continuous signal and outputs events containing the spike data.
SpikeDetector::SpikeDetector | ( | ) |
constructor
SpikeDetector::~SpikeDetector | ( | ) |
destructor
bool SpikeDetector::addElectrode | ( | int | nChans | ) |
Adds an electrode with n channels to be processed.
|
virtual |
Creates the SpikeDetectorEditor.
Reimplemented from GenericProcessor.
|
virtual |
Called after acquisition is finished.
Reimplemented from GenericProcessor.
|
virtual |
Called prior to start of acquisition.
Reimplemented from GenericProcessor.
int SpikeDetector::getChannel | ( | int | index, |
int | chan | ||
) |
Returns the continuous channel that maps to a given electrode channel.
double SpikeDetector::getChannelThreshold | ( | int | electrodeNum, |
int | channelNum | ||
) |
StringArray SpikeDetector::getElectrodeNames | ( | ) |
Returns a StringArray containing the names of all electrodes.
int SpikeDetector::getNumChannels | ( | int | index | ) |
Returns the number of channels for a given electrode.
|
virtual |
Processes an incoming continuous buffer and places new spikes into the event buffer.
Implements GenericProcessor.
bool SpikeDetector::removeElectrode | ( | int | index | ) |
Removes an electrode with a given index.
bool SpikeDetector::setChannel | ( | int | electrodeIndex, |
int | channelNum, | ||
int | newChannel | ||
) |
Edits the mapping between input channels and electrode channels.
void SpikeDetector::setChannelThreshold | ( | int | electrodeNum, |
int | channelNum, | ||
float | threshold | ||
) |
bool SpikeDetector::setElectrodeName | ( | int | index, |
String | newName | ||
) |
Sets the name of a given electrode.
|
virtual |
Used to alter parameters of data acquisition.
Reimplemented from GenericProcessor.
|
virtual |
Called whenever the signal chain is altered.
Reimplemented from GenericProcessor.
AudioSampleBuffer& SpikeDetector::dataBuffer |
Reference to a continuous buffer (for internal use only).
StringArray SpikeDetector::electrodeTypes |
Returns a list of possible electrode types (e.g., stereotrode, tetrode).
AudioSampleBuffer SpikeDetector::overflowBuffer |
Extra samples are placed in this buffer to allow seamless transitions between callbacks.