theallelectricsmartgrid

Visualization Pipeline

This page documents how runtime DSP/control data is captured and rendered in JUCE visualizer components.

Capture layer: ScopeWriter

Defined in private/src/ScopeWriter.hpp.

ScopeWriter is a shared multi-scope, multi-voice circular buffer:

It also stores cycle markers:

These markers are used for cycle-aware waveform views.

Write helpers: ScopeWriterHolder

ScopeWriterHolder carries:

Modules write with minimal overhead:

This is how voice VCO/filter/amp/LFO and quad buses push data into visualization buffers.

Capture layer: effect UI snapshots

Not every visualizer is backed by ScopeWriter. Some effect views publish derived UI data directly into nested UI-state structs during PopulateUIState(...).

Current example:

This path is useful for views that need aggregated state rather than raw time-series buffers.

Read layer: ScopeReader and factories

ScopeReader builds a display-ready sampling view from published data:

ScopeReaderFactory provides lightweight creation with current voice/scope context.

FFT/analyzer layer

WindowedFFT

QuadWindowedFFT

JUCE visual components

Defined primarily in JUCE/SmartGridOne/Source/ScopeComponent.hpp.

Main views:

Additional mastering/meter views are in MasteringComponents.hpp and MeterComponent.hpp.

Wiring into UI state

SquiggleBoyWithEncoderBank::UIState owns multiple ScopeWriter instances:

DSP/nonagon modules write into these through SetupScopeWriters(...); UI reads from published state on the JUCE thread.