Markdown Converter
Agent skill for markdown-converter
This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.
Sign in to like and favorite skills
This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.
processBlock).FFT_SIZE - HOP_SIZE.AtlasConfig::{FFT_SIZE, HOP_SIZE, NUM_BINS, TILE_WIDTH, TILE_HEIGHT}.processBlock.setLatencySamples(FFT_SIZE - HOP_SIZE) and assert it.processBlock with juce::ScopedNoDenormals.Threading Model: Audio ↔ UI ↔ GPU via lock-free SPSC queues
┌─────────────────┐ Lock-Free SPSC ┌────────────────┐ Lock-Free SPSC ┌─────────────────┐ │ Audio Thread │◄─────────────────────►│ UI Thread │◄─────────────────────►│ GPU Thread │ │ │ SpectralDataQueue │ │ RenderCommandQueue │ │ │ • STFT/iFFT │ │ • Mouse/Touch │ │ • D3D11 Render │ │ • Mask Apply │ MaskDeltaQueue │ • Painting │ DeviceEventQueue │ • Particles │ │ • <5ms Latency │◄─────────────────────►│ • 60fps Timer │◄─────────────────────►│ • 60fps Target │ │ • ZERO Allocs │ │ • Parameter UI │ │ • WARP Fallback │ └─────────────────┘ └────────────────┘ └─────────────────┘
Key Data Flow: UI Painting → MaskDeltaQueue → HopScheduler → MaskAtlas → RealtimeSpectral → Audio Output
Atlas Configuration (
Source/Core/AtlasIds.h):
FFT_SIZE = 512 HOP_SIZE = 128 NUM_BINS = FFT_SIZE / 2 + 1 // 257 TILE_HEIGHT = NUM_BINS // 257 TILE_WIDTH = 512
Core Delta Message:
struct MaskColumnDelta { AtlasPosition position; // tileX, tileY, columnInTile, binStart float values[NUM_BINS]; // Attenuation values 0.0-1.0 // + metadata for timing/sequencing };
Safe to edit:
Source/Core/ - MaskAtlas, AtlasIds, ColumnOps, MessageBusSource/DSP/ - HopScheduler, RealtimeSpectral, SpectralEngineSource/GUI/ - SpectrogramComponent, BrushTools, PerfHUDSource/SpectralCanvasProAudioProcessor.* - Main plugin integrationProtected paths (from
.cursorrules):
Source/audio/** - PROTECTED RT PATH - Plan-only proposals requiredSource/engine/** - PROTECTED ENGINE PATH - Never edit directlyNever touch:
build/, *_deps/, JUCE/ - Generated/external filesBuild & Validation:
# Standard build cmake -B build -DCMAKE_BUILD_TYPE=RelWithDebInfo -DSCP_INSTALL_SHADERS=ON cmake --build build --config RelWithDebInfo # Essential validation (REQUIRED before commits) pluginval --strictness-level 8 build/SpectralCanvasPro_artefacts/RelWithDebInfo/VST3/SpectralCanvasPro.vst3 # RT-safety testing cmake -B build -DCMAKE_BUILD_TYPE=Debug -DENABLE_RT_SAFETY=ON build/Tests/RTSafetyTest # Run all tests ctest --test-dir build -V
prepareToPlay.Source/Core/ for RT-safe containers.docs/BLUEPRINT.md, docs/Developer-Notes.md first.getDeltaDrainsPerBlock() for debugging.processBlock()Essential reading before major changes:
docs/BLUEPRINT.md - Complete technical architecture and thread contractsdocs/Developer-Notes.md - RT-safety checklist, patterns, and emergency proceduresREADME.md - Project overview, build instructions, and quick start.cursorrules - File modification permissions and protection rulespluginval --strictness-level 8 before any commit.drains/block > 0 while paintingFFT_SIZE - HOP_SIZE (384 samples)Audio Dropouts:
processBlock() for new allocationsGPU Issues:
D3D_DRIVER_TYPE_WARPparticlesEnabled_ = falseBuild Failures:
rm -rf build && cmake -B buildgit submodule update --recursiveEnable RT STFT masking Implements Phase 4 (HEAR): double-buffered MaskAtlas with atomic flip, HopScheduler draining ≤16 UI column-deltas per block, and a preallocated RealtimeSpectral STFT→mask→iSTFT→OLA path. Verified no allocations in processBlock and correct latency reporting.
Phase 4 (HEAR): ✅ COMPLETE - RT-safe STFT masking pipeline merged and working
phase4/hear-stft-masking branch (commit 79793ff)Ready for Next Phase: System is now fully operational with real-time STFT masking
Remember: This is a passion project focused on making spectral manipulation immediate, musical, and expressive. Every decision should serve that goal while maintaining uncompromising RT-safety.
For advanced DSP theory, algorithm guidance, and RT-safety patterns, use the curated knowledge system:
Quick Access:
Task: dsp-knowledge, "How should I implement overlap-add for STFT reconstruction?" Task: dsp-knowledge, "What windowing function minimizes spectral leakage for masking?" Task: dsp-knowledge, "RT-safe filter coefficient updates in processBlock?"
Knowledge Sources:
Available Topics: FFT/STFT processing, windowing functions, phase vocoders, filter design, RT-safety patterns, latency management, denormal handling, JUCE integration patterns
The knowledge system automatically grounds technical decisions in authoritative sources while maintaining SpectralCanvasPro's RT-safety requirements.
@CLAUDE.sessions.md