SharpBCI
A multi-threaded brain control interface (BCI) library in C#
|
A Pipeable which performs an FFT on each channel It outputs an FFTEvent every windowSize samples. More...
Public Member Functions | |
FFTPipeable (int windowSize, int channels, double sampleRate) | |
Create a new FFTPipeable which performs an FFT over windowSize. More... | |
FFTPipeable (int windowSize, int channels, double sampleRate, double targetFFTRate) | |
Create a new FFTPipeable which performs an FFT over windowSize. More... | |
Public Member Functions inherited from SharpBCI.Pipeable | |
void | SetInput (BlockingCollection< object > newInput) |
Set the input on this IPipeable to param input Should only be used internally by Connect. More... | |
void | Connect (IPipeable other) |
Connect the input of other to our output Note: mirror == false using this override. More... | |
void | Connect (IPipeable other, bool mirror) |
Connect the input of other to our output and allow for control of mirror data. More... | |
virtual void | Start (TaskFactory taskFactory, CancellationTokenSource cts) |
Actually start doing work (i.e., promise to eventually start pushing data to connected pipeables) More... | |
virtual void | Stop () |
Require this IPipeable to stop, blocking until actually stopped. More... | |
Protected Member Functions | |
override bool | Process (object item) |
Protected Member Functions inherited from SharpBCI.Pipeable | |
void | Add (object item) |
Additional Inherited Members | |
Public Attributes inherited from SharpBCI.Pipeable | |
const int | DEFAULT_BUFFER_SIZE = 1000 |
A Pipeable which performs an FFT on each channel It outputs an FFTEvent every windowSize samples.
Input Types: EEGEvent of type RAW Output Types: EEGEvent of the following types:
SharpBCI.FFTPipeable.FFTPipeable | ( | int | windowSize, |
int | channels, | ||
double | sampleRate | ||
) |
Create a new FFTPipeable which performs an FFT over windowSize.
targetFFTRate defaults to 10 Hz with this constructor.
windowSize | The size of the FFT window, determines granularity (google FFT) |
channels | How many channels to operate on |
sampleRate | Sampling rate of data |
SharpBCI.FFTPipeable.FFTPipeable | ( | int | windowSize, |
int | channels, | ||
double | sampleRate, | ||
double | targetFFTRate | ||
) |
Create a new FFTPipeable which performs an FFT over windowSize.
Expects an input pipeable of EEGEvent's
windowSize | The size of the FFT window, determines granularity (google FFT) |
channels | How many channels to operate on |
sampleRate | Sampling rate of data |
targetFFTRate | Optional: Frequency (in Hz) to perform an FFT (exact frequency may vary) |
|
protectedvirtual |
Implements SharpBCI.Pipeable.