32 namespace cinder {
namespace audio {
143 std::unique_ptr<dsp::Fft> mFft;
146 std::vector<float> mMagSpectrum;
150 float mSmoothingFactor;
MonitorSpectralNode(const Format &format=Format())
Definition: MonitorNode.cpp:100
size_t getNumBins() const
Returns the number of frequency bins in the analyzed magnitude spectrum. Equivilant to fftSize / 2...
Definition: MonitorNode.h:129
GLenum mode
Definition: GLee.h:3042
ChannelMode
Definition: Node.h:63
void fillCopiedBuffer()
Copies audio frames from the RingBuffer into mCopiedBuffer, which is suitable for operation on the ma...
Definition: MonitorNode.cpp:88
size_t mRingBufferPaddingFactor
Definition: MonitorNode.h:93
Node for retrieving time-domain audio PCM samples.
Definition: MonitorNode.h:50
const Buffer & getBuffer()
Definition: MonitorNode.cpp:70
std::shared_ptr< class MonitorSpectralNode > MonitorSpectralNodeRef
Definition: MonitorNode.h:39
const std::vector< float > & getMagSpectrum()
Returns the magnitude spectrum of the currently sampled audio stream, suitable for consuming on the m...
Definition: MonitorNode.cpp:134
void setSmoothingFactor(float factor)
Sets the factor (0 - 1, default = 0.5) used when smoothing the magnitude spectrum between sequential ...
Definition: MonitorNode.cpp:172
void process(Buffer *buffer) override
Override to perform audio processing on buffer.
Definition: MonitorNode.cpp:61
size_t mWindowSize
Definition: MonitorNode.h:92
float getSmoothingFactor() const
Returns the factor (0 - 1, default = 0.5) used when smoothing the magnitude spectrum between sequenti...
Definition: MonitorNode.h:135
MonitorNode(const Format &format=Format())
Definition: MonitorNode.cpp:39
virtual ~MonitorNode()
Definition: MonitorNode.cpp:44
GLuint buffer
Definition: GLee.h:2065
Buffer mCopiedBuffer
Definition: MonitorNode.h:91
float getFreqForBin(size_t bin)
Returns the corresponding frequency for bin. Computed as.
Definition: MonitorNode.cpp:177
std::shared_ptr< class MonitorNode > MonitorNodeRef
Definition: MonitorNode.h:38
std::unique_ptr< float, FreeDeleter< float > > AlignedArrayPtr
Definition: Buffer.h:279
size_t getWindowSize() const
Returns the window size, which is the number of samples that are copied from the audio stream...
Definition: MonitorNode.h:77
virtual ~MonitorSpectralNode()
Definition: MonitorNode.cpp:105
a Node that can be pulled without being connected to any outputs.
Definition: Node.h:242
void initialize() override
Called before audio buffers need to be used. There is always a valid Context at this point...
Definition: MonitorNode.cpp:48
GLuint GLuint GLsizei GLenum type
Definition: GLee.h:963
int int channel
Definition: GLee.h:17150
A Scope that performs spectral (Fourier) analysis.
Definition: MonitorNode.h:97
size_t getFftSize() const
Returns the size of the FFT used for spectral analysis.
Definition: MonitorNode.h:131
std::vector< dsp::RingBuffer > mRingBuffers
Definition: MonitorNode.h:90
void initialize() override
Called before audio buffers need to be used. There is always a valid Context at this point...
Definition: MonitorNode.cpp:109
GLenum GLsizei GLenum format
Definition: GLee.h:969
float getVolume()
Compute the average (RMS) volume across all channels.
Definition: MonitorNode.cpp:76
GLsizeiptr size
Definition: GLee.h:2089
WindowType
Describes the avaiable windowing functions.
Definition: Dsp.h:49