From 4f3f2462c0d67deec62d3f1838423ba1d6333db3 Mon Sep 17 00:00:00 2001 From: mahal raskin Date: Tue, 19 Mar 2024 20:00:11 +0100 Subject: [PATCH] Added comment on what to to next and how to make class available on macOS --- .../SpectrogramFlatView/SpectrogramFlatView.swift | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/Sources/AudioKitUI/Visualizations/SpectrogramFlatView/SpectrogramFlatView.swift b/Sources/AudioKitUI/Visualizations/SpectrogramFlatView/SpectrogramFlatView.swift index 5bdab8d..646da37 100644 --- a/Sources/AudioKitUI/Visualizations/SpectrogramFlatView/SpectrogramFlatView.swift +++ b/Sources/AudioKitUI/Visualizations/SpectrogramFlatView/SpectrogramFlatView.swift @@ -35,6 +35,19 @@ Steps involved: this implementation caches the resulting image. + Suggested next steps on development: + * Layout and draw the slices directly on a Canvas (instead of HStack) and independently move the Canvas left. + * Make class compatible with macOS + - Drawing with Canvas instead of UIGraphicsImageRenderer + (caching of UIImage no longer needed if callback can draw directly on one Canvas) + - CrossPlatformColor from Waveform.swift or Color.Resolved instead of UIColor for gradient lookup + * Add some parameters that can be changed while the spectrogram is running + - Pause so user can have a close look at the analyzed past + - Gain or sensitivity + - Speed of the rolling plot / detail frequency by adjusting fftSize + - Min and max frequency shown + + Cause of inefficiency of this implementation * Each time a new slice arrives from FFTTap, the view gets a complete layout update. * Rendering of new slices is done on a background thread and involves too many steps