Improved spectrogram by using the RHI - #174
Merged
Merged
Conversation
kunitoki
force-pushed
the
dev/better_spectrogram
branch
from
September 6, 2026 23:59
9363303 to
68f1a1e
Compare
kunitoki
force-pushed
the
dev/better_spectrogram
branch
from
September 7, 2026 00:15
68f1a1e to
a08da98
Compare
(cherry picked from commit c06f1c9662494c6a203220e9c9726ca52a260c43)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This pull request introduces several significant improvements and fixes across the DSP, UI, and audio GUI components. The most notable changes are the introduction of double-precision support in the
FFTProcessor, major GPU optimizations and accuracy improvements in theSpectrogramComponent, and a new repaint mode for UI components that optimizes partial redraws. Additionally, several bug fixes and documentation updates were made to reflect these enhancements.DSP and FFTProcessor Improvements:
FFTProcessoris now templated on the sample type (floatordouble), with all backends supporting native double-precision paths. The public API now accepts buffers with any alignment, and references to the scaling enum must be qualified (e.g.,FFTProcessor<float>::FFTScaling::asymmetric). [1] [2] [3] [4] [5]Audio GUI (
yup_audio_gui) Enhancements:SpectrogramComponentnow keeps its waterfall history on the GPU, using a precompiled shader bundle for efficient rendering. The scroll speed is adjustable, and the log-frequency to FFT-bin mapping is precomputed for performance. The component now requires a GPU render context.Logger::outputDebugString, and render resolution is exposed via a new constant.SpectrumAnalyzerComponentandSpectrogramComponentnow use a newSpectrumBinMappingfor continuous, accurate log-frequency display, with improved interpolation and aggregation over bands.SpectrumAnalyzerStateso that FFT data is available immediately after a bulk push.SpectrumAnalyzerComponentnow generates its spectrum outline per pixel column for smooth, continuous curves at any resolution.UI and Graphics Updates:
ComponentNative::RepaintMode, allowing selection between repainting disjoint dirty rectangles (default) or a single bounding box for backward compatibility. Documentation updated to explain the new mode. [1] [2]Other Fixes and Minor Changes:
SignalGeneratorwas refactored for clarity and correctness, using a commongenerateWhiteNoise()method and clamping brown noise output. [1] [2]FFTProcessor. [1] [2]These changes collectively improve performance, accuracy, and usability in both DSP and UI components.