|
Gin
|
Visual component for displaying audio waveforms with zoom and scroll. More...
#include <gin_waveformcomponent.h>
Inherits juce::Component.
Public Types | |
| enum | ColourIds { lineColourId = 0x1231e10 , backgroundColourId = 0x1231e11 , traceColourId = 0x1231e12 , envelopeColourId = 0x1231f13 } |
Public Member Functions | |
| WaveformComponent () | |
| ~WaveformComponent () override | |
| Destructor. | |
| void | setHorizontalZoom (float zoom) |
| void | setHorizontalOffset (float offset) |
| void | setBuffer (juce::AudioSampleBuffer &buffer) |
| void | paint (juce::Graphics &g) override |
| void | resized () override |
Visual component for displaying audio waveforms with zoom and scroll.
WaveformComponent renders multi-channel audio waveforms with support for horizontal zooming and panning. It efficiently displays large audio buffers by downsampling to min/max envelopes at the current zoom level, providing smooth visualization even for long audio files.
Key Features:
Color Customization:
The component automatically processes the audio buffer into min/max pairs for efficient rendering at any zoom level, avoiding the need to draw individual samples when zoomed out.
Usage:
| WaveformComponent::WaveformComponent | ( | ) |
|
override |
Destructor.
| void WaveformComponent::setBuffer | ( | juce::AudioSampleBuffer & | buffer | ) |
|
override |
|
override |