This object displays the FFT of the incoming data.
.
More...
#include <customviews.h>
This object displays the FFT of the incoming data.
.
SpectrumView:
- uses a lock-free ring buffer for queueing up input data from the plugin
- implements ICustomView::pushDataValue() and ICustomView::updateData()
- uses a pair of lock-free ring buffers to implement a safe double-buffering system
- during updates, the queue is dumped into the FFT array
- when a new FFT is processed, its magnitude array is calculated in the first available buffer in the empty queue; it is then placed in the filled (ready) queue
- the draw() function is on the same thread with the PluginKernel/PluginGUI paradigm\ but just in case it ISN'T, the drawing uses the double buffer to safely get the next available magnitude array to display
- the result is a super fast visually synchronized display
- Author
- Will Pirkle http://www.willpirkle.com
- Version
- Revision : 1.0
- Date
- Date : 2018 / 09 / 7
◆ SpectrumView()
VSTGUI::SpectrumView::SpectrumView |
( |
const CRect & |
size, |
|
|
IControlListener * |
listener, |
|
|
int32_t |
tag |
|
) |
| |
SpectrumView constructor.
- Parameters
-
size | - the control rectangle |
listener | - the control's listener (usuall PluginGUI object) |
tag | - the control ID value |
◆ addFFTInputData()
bool VSTGUI::SpectrumView::addFFTInputData |
( |
double |
inputSample | ) |
|
|
protected |
returns true if the input buffer is full and ready for a FFT operation
will keep track of indexing and reject samples when full
- Parameters
-
inputSample | input point for FFT |
◆ draw()
void VSTGUI::SpectrumView::draw |
( |
CDrawContext * |
pContext | ) |
|
|
override |
override to draw, called if the view should draw itself
◆ interpArrayValue()
double VSTGUI::SpectrumView::interpArrayValue |
( |
double * |
array, |
|
|
int |
arraySize, |
|
|
double |
fractionalIndex |
|
) |
| |
|
inlineprotected |
interpolate a value from an array
- Parameters
-
array | - pointer to array to interpolate |
arraySize | - length of array |
fractionalIndex | - fractional location of value in array (e.g. 3.446 is 0.446 between 3 and 4) |
◆ normalizeBufferGetFMax()
double VSTGUI::SpectrumView::normalizeBufferGetFMax |
( |
double * |
buffer, |
|
|
unsigned int |
bufferSize, |
|
|
int * |
ptrMaxIndex |
|
) |
| |
|
inlineprotected |
normalize a buffer and find the index of the maximum value at the same time
- Parameters
-
buffer | - pointer to buffer to normalize |
bufferSize | - length of buffer |
ptrMaxIndex | - return value passed by pointer of INDEX of max value in buffer |
◆ pushDataValue()
void VSTGUI::SpectrumView::pushDataValue |
( |
double |
data | ) |
|
|
overridevirtual |
◆ setWindow()
set the window
- Parameters
-
_window | the window type (seee windowType) |
◆ showFilledFFT()
void VSTGUI::SpectrumView::showFilledFFT |
( |
bool |
_filledFFT | ) |
|
|
inline |
show FFT as filled (or unfilled) plot
◆ updateView()
void VSTGUI::SpectrumView::updateView |
( |
| ) |
|
|
overridevirtual |
The documentation for this class was generated from the following files:
- C:/RackAFX_v7/ASPIK_SDK/PluginTemplate/project_source/source/CustomControls/customviews.h
- C:/RackAFX_v7/ASPIK_SDK/PluginTemplate/project_source/source/CustomControls/customviews.cpp