52 JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR(
Oscilloscope)
68 static constexpr int kBits = 14;
154 void updateAmplitudes(
int index,
int offset);
160 void updateAmplitudes(
int index);
168 int oversample_amount_;
169 float min_frequency_;
170 float max_frequency_;
173 bool paint_background_lines_;
181 JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR(
Spectrogram)
A component for rendering lines with optional filling and boost effects using OpenGL.
Definition open_gl_line_renderer.h:16
Renders a time-domain waveform using OpenGL.
Definition oscilloscope.h:15
void setOscilloscopeMemory(const vital::poly_float *memory)
Sets the memory buffer that the oscilloscope reads from.
Definition oscilloscope.h:47
virtual ~Oscilloscope()
Destructor.
Definition oscilloscope.cpp:15
static constexpr int kResolution
The number of points used to represent the waveform.
Definition oscilloscope.h:18
Oscilloscope()
Constructs the Oscilloscope and sets up fill and corners.
Definition oscilloscope.cpp:9
void drawWaveform(OpenGlWrapper &open_gl, int index)
Draws the waveform line for a given channel index.
Definition oscilloscope.cpp:17
void render(OpenGlWrapper &open_gl, bool animate) override
Renders the oscilloscope line for both channels.
Definition oscilloscope.cpp:35
Renders a frequency-domain representation (spectrogram) using OpenGL.
Definition oscilloscope.h:64
virtual ~Spectrogram()
Destructor.
void setMinDb(float db)
Sets the minimum dB level displayed.
Definition oscilloscope.h:134
void setAudioMemory(const vital::StereoMemory *memory)
Sets the StereoMemory from which audio data is read for the FFT.
Definition oscilloscope.h:104
void setMaxFrequency(float frequency)
Sets the maximum frequency displayed in the spectrogram.
Definition oscilloscope.h:128
static constexpr float kDefaultMaxDb
Default maximum dB level displayed.
Definition oscilloscope.h:70
static constexpr int kResolution
Number of points in the frequency line.
Definition oscilloscope.h:66
static constexpr float kDefaultMaxFrequency
Default maximum frequency.
Definition oscilloscope.h:73
static constexpr float kDefaultMinFrequency
Default minimum frequency.
Definition oscilloscope.h:72
static constexpr float kDecayMult
Decay multiplier for amplitude smoothing.
Definition oscilloscope.h:67
void paintBackgroundLines(bool paint)
Enables or disables painting background frequency lines.
Definition oscilloscope.h:146
void setMinFrequency(float frequency)
Sets the minimum frequency displayed in the spectrogram.
Definition oscilloscope.h:122
void drawWaveform(OpenGlWrapper &open_gl, int index)
Draws the frequency-domain waveform (spectrogram line) for a given channel index.
Definition oscilloscope.cpp:145
static constexpr float kDefaultMinDb
Default minimum dB level displayed.
Definition oscilloscope.h:71
void setOversampleAmount(int oversample)
Sets the oversampling amount used for adjusting frequency scaling.
Definition oscilloscope.h:116
static constexpr int kAudioSize
Size of audio block for the FFT.
Definition oscilloscope.h:69
static constexpr int kBits
Number of bits, defining the transform size (2^kBits).
Definition oscilloscope.h:68
void paintBackground(Graphics &g) override
Paints a background using JUCE's Graphics (e.g., frequency lines).
Definition oscilloscope.cpp:188
static constexpr float kDbSlopePerOctave
dB slope per octave for visualization.
Definition oscilloscope.h:74
Spectrogram()
Constructs the Spectrogram with default parameters.
Definition oscilloscope.cpp:52
void render(OpenGlWrapper &open_gl, bool animate) override
Renders the spectrogram for both channels.
Definition oscilloscope.cpp:163
void setMaxDb(float db)
Sets the maximum dB level displayed.
Definition oscilloscope.h:140
A specialized MemoryTemplate for two-channel (stereo) audio.
Definition memory.h:216
Declares classes for time-domain memory storage and retrieval with cubic interpolation.
A helper struct containing references to OpenGL context, shaders, and display scale.
Definition shaders.h:174
Represents a vector of floating-point values using SIMD instructions.
Definition poly_values.h:600