Skip to content

Commit d9340f5

Browse files
committed
More docs
1 parent 4bd54d7 commit d9340f5

File tree

1 file changed

+15
-18
lines changed

1 file changed

+15
-18
lines changed

modules/yup_audio_gui/displays/yup_SpectrumAnalyzerComponent.h

Lines changed: 15 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -26,33 +26,30 @@ namespace yup
2626
/**
2727
A component that displays a real-time spectrum analyzer.
2828
29-
This component performs FFT processing on audio data collected by a
30-
SpectrumAnalyzerState and renders the frequency spectrum as a visual display.
31-
The FFT processing is performed on the UI thread using a timer, following
32-
the pattern from the JUCE spectrum analyzer tutorial.
29+
This component performs FFT processing on audio data collected by a SpectrumAnalyzerState and renders
30+
the frequency spectrum as a visual display. The FFT processing is performed on the UI thread using a timer,
31+
following the pattern from the JUCE spectrum analyzer tutorial.
3332
34-
The component can be configured with different window functions, display
35-
types, frequency ranges, and update rates. It automatically handles
36-
logarithmic frequency scaling for natural spectrum visualization.
33+
The component can be configured with different window functions, display types, frequency ranges, and update
34+
rates. It automatically handles logarithmic frequency scaling for natural spectrum visualization.
3735
3836
Example usage:
37+
3938
@code
40-
SpectrumAnalyzerState analyzerState;
41-
SpectrumAnalyzerComponent analyzerComponent(analyzerState);
39+
SpectrumAnalyzerState analyzerState;
40+
SpectrumAnalyzerComponent analyzerComponent(analyzerState);
4241
43-
// Configure the display
44-
analyzerComponent.setWindowType(WindowType::hann);
45-
analyzerComponent.setFrequencyRange(20.0f, 20000.0f);
46-
analyzerComponent.setDecibelRange(-100.0f, 0.0f);
47-
analyzerComponent.setUpdateRate(30);
42+
// Configure the display
43+
analyzerComponent.setWindowType(WindowType::hann);
44+
analyzerComponent.setFrequencyRange(20.0f, 20000.0f);
45+
analyzerComponent.setDecibelRange(-100.0f, 0.0f);
46+
analyzerComponent.setUpdateRate(30);
4847
49-
// In audio callback:
50-
analyzerState.pushSamples(audioData, numSamples);
48+
// In audio callback:
49+
analyzerState.pushSamples(audioData, numSamples);
5150
@endcode
5251
5352
@see SpectrumAnalyzerState, FFTProcessor, WindowFunctions
54-
55-
@tags{AudioGUI}
5653
*/
5754
class YUP_API SpectrumAnalyzerComponent
5855
: public Component

0 commit comments

Comments
 (0)