This page documents how runtime DSP/control data is captured and rendered in JUCE visualizer components.
ScopeWriterDefined in private/src/ScopeWriter.hpp.
ScopeWriter is a shared multi-scope, multi-voice circular buffer:
m_buffer: interleaved sample storage.(scope, voice, index) -> physical index.AdvanceIndex() advances write position each sample/frame boundary.Publish() atomically exposes latest stable index (m_publishedIndex) and commits marker updates.It also stores cycle markers:
RecordStart(scope, voice[, uBlockIndex])RecordEnd(scope, voice[, uBlockIndex])These markers are used for cycle-aware waveform views.
ScopeWriterHolderScopeWriterHolder carries:
ScopeWriter*voiceIxscopeIxModules write with minimal overhead:
Write(value) / Write(uBlockIndex, value)RecordStart() / RecordEnd()This is how voice VCO/filter/amp/LFO and quad buses push data into visualization buffers.
Not every visualizer is backed by ScopeWriter. Some effect views publish derived UI data directly into nested UI-state structs during PopulateUIState(...).
Current example:
QuadDelayEnvelopeVisualizerComponent reads m_delayUIStateQuadDelay::PopulateUIState(...) copies per-channel envelope snapshots and relative read/write head positions into rotating UI slotsDelayLineMovableWriter min/max buckets, remapped through PositionalBufferRecorder so the UI can sample the delay buffer against the current master-loop positionThis path is useful for views that need aggregated state rather than raw time-series buffers.
ScopeReader and factoriesScopeReader builds a display-ready sampling view from published data:
ScopeReaderFactory provides lightweight creation with current voice/scope context.
WindowedFFTScopeWriter,QuadWindowedFFTDefined primarily in JUCE/SmartGridOne/Source/ScopeComponent.hpp.
Main views:
ScopeComponent (audio/control traces)AnalyserComponent (per-voice spectrum + filter response overlays)QuadAnalyserComponent (delay/reverb/master quad spectra)QuadDelayEnvelopeVisualizerComponentTheoryOfTimeScopeComponentSoundStageComponent (quad position + meter-weighted bubbles)MelodyRollComponent (note events via NonagonNoteWriter)Additional mastering/meter views are in MasteringComponents.hpp and MeterComponent.hpp.
SquiggleBoyWithEncoderBank::UIState owns multiple ScopeWriter instances:
DSP/nonagon modules write into these through SetupScopeWriters(...); UI reads from published state on the JUCE thread.