Nota — a free DAW for macOS, Windows and Linux. No subscription, no account — just open it and make music.
description: "Task list for Feature 030: Professional C++20 DSP Architecture Overhaul, .h/.cpp Modularization & Plugin Scanner Separation"
Tasks: Professional C++20 DSP Architecture Overhaul, .h/.cpp Modularization & Plugin Scanner Separation
Input: Design documents from /specs/030-dsp-architecture-overhaul/ (spec.md, plan.md, research.md, data-model.md, contracts/, quickstart.md)
Organization: Tasks are grouped by user story and ordered so each phase leaves the build (./scripts/build.sh) and smoke tests (tests/Nota.SmokeTest) 100% green.
Phase 1: Setup & Foundational Infrastructure (dsp/core/ & dsp/math/)
Purpose: Establish directory structure, compiler RT-safety attributes, denormal guards, FastMath, Simd, SimdAudio, and SilenceDetector primitives that all subsequent phases depend on.
- T001 Create directory hierarchy under
src/native/nota.engine/src/(abi/,dsp/core/,dsp/math/,dsp/primitives/,dsp/poly/,devices/racks/,devices/effects/,devices/instruments/,devices/midi_fx/,engine/,audio_io/macos/,audio_io/desktop/,media/) andsrc/native/nota.engine/pluginhost/(bridge/,scanner/worker/,hosting/) - T002 [P] Implement
RtAttributes.h(NOTA_RT_SAFE,NOTA_HOT,NOTA_ALWAYS_INLINE,NOTA_CACHE_ALIGNED,NOTA_CPU_PAUSE) insrc/native/nota.engine/src/dsp/core/RtAttributes.h - T003 [P] Implement unified
ScopedNoDenormals.hRAII FTZ/DAZ guard for ARM64 and x86_64 insrc/native/nota.engine/src/dsp/core/ScopedNoDenormals.h - T004 [P] Implement
AudioSpan.h(StereoSpan,ConstStereoSpan,PlanarAudioSpanoverstd::span<float>) insrc/native/nota.engine/src/dsp/core/AudioSpan.h - T005 [P] Implement
FastMath.h(exp2f,log2f,dbToLin,linToDb,tanhRatio,tanh,tanhPrecise,sin,cos,tanPrewarp) insrc/native/nota.engine/src/dsp/math/FastMath.h - T006 [P] Implement
Simd.h(ARM NEON and x86 SSE/AVX/FMAadd,addScaled,scale,mul,dot16,maxAbs,clip,squashNonFinite) insrc/native/nota.engine/src/dsp/math/Simd.h - T007 [P] Implement
SimdAudio.h(isSilent,peakAndSumSquares,deinterleaveStereo,interleaveStereo,interleaveStereoAdd,scaleStereo,addStereoScaled,StereoMeterAccumulator) insrc/native/nota.engine/src/dsp/math/SimdAudio.h - T008 [P] Implement
AudioBufferUtils.h(isBufferSilent,scaleStereoMeter,addStereoScaledMeter,addStereoScaledMeterMap,processMasterBus) insrc/native/nota.engine/src/dsp/math/AudioBufferUtils.h - T009 [P] Implement
Random.hdeterministic audio-thread PRNG insrc/native/nota.engine/src/dsp/math/Random.h - T010 Implement
SilenceDetector.handSilenceDetector.cpp(dual-threshold hysteresis $-80\text{ dBFS}$ / $-90.5\text{ dBFS}$, sample-accurate hold counter,lastMaxPeakcache) insrc/native/nota.engine/src/dsp/core/SilenceDetector.handsrc/native/nota.engine/src/dsp/core/SilenceDetector.cpp - T011 Implement
Parameter.handParameter.cpp(normalized parameter mappings,OnePoleSmoother,ParameterChangeTracker) insrc/native/nota.engine/src/dsp/core/Parameter.handsrc/native/nota.engine/src/dsp/core/Parameter.cpp
Checkpoint: Core dsp/core/ and dsp/math/ headers and translation units compile cleanly with zero warnings.
Phase 2: User Story 2 - Standalone Plugin Scanner & Hosting Separation (Priority: P1)
Goal: Decouple plugin scanning and catalog management (nota_pluginscanner + nota-scanworker) from Engine and nota_pluginhost, making PluginCatalog thread-safe and splitting PluginHost.cpp into clean .h/.cpp modules.
Independent Test: Build nota_pluginscanner, nota_pluginhost, nota-scanworker, and nota_engine; run PluginStoreTests and --scan smoke tests.
- T012 [P] [US2] Create
PluginCatalogBridge.hand movePluginHostBridge.hintosrc/native/nota.engine/pluginhost/bridge/ - T013 [US2] Implement thread-safe
PluginCatalog.handPluginCatalog.cpp(guarded bystd::shared_mutex, managingplugins.xml,scanpaths.txt, and ID fallback lookup) insrc/native/nota.engine/pluginhost/scanner/PluginCatalog.handsrc/native/nota.engine/pluginhost/scanner/PluginCatalog.cpp - T014 [US2] Implement
OutOfProcessScanner.handOutOfProcessScanner.cpp(child process coordinator, timeout management, sentinel XML extraction) insrc/native/nota.engine/pluginhost/scanner/OutOfProcessScanner.handsrc/native/nota.engine/pluginhost/scanner/OutOfProcessScanner.cpp - T015 [US2] Implement
abi_pluginscanner.cpp(nota_pluginhost_scan,nota_pluginhost_plugin_count,nota_pluginhost_plugin_desc,nota_pluginhost_plugin_id,nota_pluginhost_index_of_id,nota_pluginhost_add_scan_path,nota_pluginhost_remove_scan_path,nota_pluginhost_scan_path_count,nota_pluginhost_scan_path) insrc/native/nota.engine/pluginhost/scanner/abi_pluginscanner.cpp - T016 [US2] Split
nota-scanworkerintoPluginScannerWorker.h,PluginScannerWorker.cpp, andmain.cppinsrc/native/nota.engine/pluginhost/scanner/worker/ - T017 [P] [US2] Extract
NotaPlayHead.handNotaPlayHead.cppinsrc/native/nota.engine/pluginhost/hosting/ - T018 [P] [US2] Extract
PluginEditorWindow.handPluginEditorWindow.cpp(PluginEditorWindow,EditorHost, macOSNSEventkey monitor) insrc/native/nota.engine/pluginhost/hosting/ - T019 [P] [US2] Extract
PluginInstrument.handPluginInstrument.cpp(usingsimd_audio::deinterleaveStereo/interleaveStereoAdd) insrc/native/nota.engine/pluginhost/hosting/ - T020 [P] [US2] Extract
PluginEffect.handPluginEffect.cpp(usingsimd_audio::deinterleaveStereo,fast_math::dbToLinsidechain scaling, and tail/idle support) insrc/native/nota.engine/pluginhost/hosting/ - T021 [US2] Implement
PluginHost.handPluginHost.cpp(instance factories,nota_pluginhost_open_test_window,nota_pluginhost_pump) and registernota_pluginscanner+nota_pluginhosttargets insrc/native/nota.engine/CMakeLists.txt
Checkpoint: nota_pluginscanner, nota_pluginhost, and nota-scanworker build as separated modules; all C ABI nota_pluginhost_* symbols resolve and pass smoke tests.
Phase 3: User Story 3 - Shared C++20 DSP Primitives & Polyphony (dsp/primitives/ & dsp/poly/) (Priority: P1)
Goal: Extract and implement shared, reusable .h/.cpp DSP building blocks so devices and instruments no longer duplicate filters, delay lines, convolutions, oscillators, envelopes, or voice managers.
Independent Test: Compile all dsp/primitives/ and dsp/poly/ translation units and verify behavior via smoke tests.
- T022 [P] [US3] Implement
SvfFilter.handSvfFilter.cpp(Cytomic TPT SVF +Lr4Splitter4th-order Linkwitz-Riley crossover) insrc/native/nota.engine/src/dsp/primitives/ - T023 [P] [US3] Implement
BiquadCascade.handBiquadCascade.cpp(DF2T chunked 64-sample block filter cascade + RBJ/Orfanidis coefficient calculators) insrc/native/nota.engine/src/dsp/primitives/ - T024 [P] [US3] Implement
LadderFilter.handLadderFilter.cpp(4-pole zero-delay feedback transistor ladder withfast_math::tanhRatio) insrc/native/nota.engine/src/dsp/primitives/ - T025 [P] [US3] Implement
DelayLine.handDelayLine.cpp(power-of-two circular buffer with bitmask indexing, linear, 4-point Hermite cubic, and allpass reads) insrc/native/nota.engine/src/dsp/primitives/ - T026 [P] [US3] Implement
Hadamard.h(branchless unrolledhadamard4andhadamard8) insrc/native/nota.engine/src/dsp/primitives/Hadamard.h - T027 [P] [US3] Implement
Oscillator.handOscillator.cpp(polyBLEP / polyBLAMP waveforms and tempo-syncedLfoGeneratorusingfast_math::sin) insrc/native/nota.engine/src/dsp/primitives/ - T028 [P] [US3] Implement
Envelope.handEnvelope.cpp(AdsrEnvelope,ArEnvelope,EnvelopeFollowerusingfast_math::linToDb/dbToLin) insrc/native/nota.engine/src/dsp/primitives/ - T029 [P] [US3] Split
OversamplerintoOversampler.handOversampler.cpp(with vectorizeddeinterleaveStereo/interleaveStereo) insrc/native/nota.engine/src/dsp/primitives/ - T030 [P] [US3] Extract
ConvKernelzero-latency partitioned FFT convolution fromChamberintoConvolution.handConvolution.cppinsrc/native/nota.engine/src/dsp/primitives/ - T031 [P] [US3] Implement
TruePeakMeter.handTruePeakMeter.cpp(32-float double-buffered 16-tap FIR withsimd::dot16) insrc/native/nota.engine/src/dsp/primitives/ - T032 [P] [US3] Split
CompensationDelayintoCompensationDelay.handCompensationDelay.cpp(withisIdle()support) insrc/native/nota.engine/src/dsp/primitives/ - T033 [P] [US3] Implement
SynthVoice.h,SynthVoice.cpp,PolyVoiceManager.h, andPolyVoiceManager.cppinsrc/native/nota.engine/src/dsp/poly/
Checkpoint: All shared DSP primitives compile cleanly as independent translation units.
Phase 4: User Story 1 & 4 - Modular .h/.cpp Split & Optimization of All Devices, Effects, Instruments & Racks (Priority: P1)
Goal: Organize abi/, audio_io/, media/, engine/, and devices/ into domain folders; split all 25 audio effects, 16 instruments, 6 MIDI effects, and 4 rack classes into .h + .cpp pairs; apply FastMath, Simd, UI telemetry decimation, and isIdle()/hasTail()/wake() auto-sleep across every device.
Independent Test: Rebuild nota_engine and run Nota.SmokeTest, verifying that changing any single device .cpp recompiles only 1 file and all device/instrument tests pass.
4A. Move & Split abi/, audio_io/, media/, and Base devices/ Interfaces
- T034 [US1] Move all
nota_engine_*.cpp,nota_encoder.cpp, andnota_engine_internal.hintosrc/native/nota.engine/src/abi/ - T035 [P] [US1] Move hardware audio/MIDI/gamepad backends and config files into
src/native/nota.engine/src/audio_io/,audio_io/macos/, andaudio_io/desktop/; splitMpeInputintoMpeInput.handMpeInput.cpp - T036 [P] [US1] Move
SampleBuffer,AudioFile,AudioImport,Warp,WarpStream,TempoDetect, andSampleAnalysisintosrc/native/nota.engine/src/media/; splitSampleBufferintoSampleBuffer.handSampleBuffer.cpp - T037 [US1] Move
Device.h,Instrument.h,MidiDevice.h,DeviceFactory.h, andBuiltinDevices.hintosrc/native/nota.engine/src/devices/and implementDevice.cpp,Instrument.cpp,MidiDevice.cpp,DeviceFactory.cpp, andBuiltinDevices.cpp(removing all 47 concrete device#includes from headers!)
4B. Split & Optimize Racks (src/devices/racks/)
- T038 [US1] Split
RackCore,RackDevice,RackInstrument, andDrumRackinto.hand.cpppairs insrc/native/nota.engine/src/devices/racks/
4C. Split & Optimize All 25 Audio Effects (src/devices/effects/)
- T039 [P] [US1] [US3] [US4] Split and optimize EQ & Filter effects into
.h+.cpppairs insrc/native/nota.engine/src/devices/effects/:Eq.h/.cpp(64-sample block biquad, FastMath, auto-sleep),Eq3.h/.cpp,DynamicEq.h/.cpp(linToDb/exp2f, auto-sleep),AutoFilter.h/.cpp(fast_math::tanh/sin, auto-sleep) - T040 [P] [US1] [US3] [US4] Split and optimize Dynamics effects into
.h+.cpppairs insrc/native/nota.engine/src/devices/effects/:Compressor.h/.cpp(linToDb/dbToLin, decimatedkeyRing_, auto-sleep),Ceiling.h/.cpp(TruePeakMeterSIMDdot16, hoistedinvCeil, auto-sleep),Prism.h/.cpp(SvfFilterLR4 crossover,FastMath, auto-sleep),AutoGain.h/.cpp - T041 [P] [US1] [US3] [US4] Split and optimize Reverb & Delay effects into
.h+.cpppairs insrc/native/nota.engine/src/devices/effects/:ChamberIrSynth.h/.cpp,Chamber.h/.cpp(Convolution,Hadamard,FastMathducking & soft-clip, unrolled diffusion, auto-sleep),Reverb.h/.cpp(fast_math::sinLFO, tail auto-sleep),Delay.h/.cpp(hoistedinvTanhDrive,fast_math::sinwow LFO, tail auto-sleep),BeatRepeat.h/.cpp,Strata.h/.cpp - T042 [P] [US1] [US3] [US4] Split and optimize Modulation & Spatial effects into
.h+.cpppairs insrc/native/nota.engine/src/devices/effects/:Chorus.h/.cpp,Flanger.h/.cpp,Phaser.h/.cpp,AutoPan.h/.cpp(hoistedinvTanhKk,fast_math::sin, instant silence bypass),Shutter.h/.cpp,Utility.h/.cpp(instant silence bypass),Lens.h/.cpp - T043 [P] [US1] [US3] [US4] Split and optimize Saturation & Pitch effects into
.h+.cpppairs insrc/native/nota.engine/src/devices/effects/:Vintage.h/.cpp(fast_math::tanh/sin/cos, precomputedkTanh06, auto-sleep),Amp.h/.cpp,Crush.h/.cpp,Forge.h/.cpp,AutoShift.h/.cpp
4D. Split & Optimize All Instruments (src/devices/instruments/)
- T044 [P] [US1] [US3] [US4] Split and optimize Analog/Subtractive Synths into
.h+.cpppairs insrc/native/nota.engine/src/devices/instruments/:Synth.h/.cpp,VoltSynth.h/.cpp(fast_math::sin/exp2f,isIdle()),BassSynth.h/.cpp(hoistedpreMakeup/outMakeup,fast_math::tanh/sin,isIdle()),Monolith.h/.cpp,Pentad.h/.cpp(unifiedFastMath.h),Consort.h/.cpp(unifiedScopedNoDenormals.h&FastMath.h) - T045 [P] [US1] [US3] [US4] Split and optimize Digital/FM/Wavetable/Generative Synths into
.h+.cpppairs insrc/native/nota.engine/src/devices/instruments/:WavetableSynth.h/.cpp(hoisteddriveInvNorm,fast_math::tanh/sin),OperatorSynth.h/.cpp(fast_math::sin, block-decimatedringW_),FluxSynth.h/.cpp(fast_math::sin/tanh),PendulumSynth.h/.cpp(fast_math::sin/cosharmonics) - T046 [P] [US1] [US3] [US4] Split and optimize Physical, Sampler & Drum Instruments into
.h+.cpppairs insrc/native/nota.engine/src/devices/instruments/:PhysicalSynth.h/.cpp,Keys.h/.cpp(unifiedScopedNoDenormals.h&FastMath.h),Sampler.h/.cpp,GrainSynth.h/.cpp,RhythmVoiceDsp.h/.cpp,RhythmMachine.h/.cpp,MosaicProgram.h/.cpp,Mosaic.h/.cpp
4E. Split All 6 MIDI Effects (src/devices/midi_fx/)
- T047 [P] [US1] Split
Arpeggiator,MidiChord,MidiScale,MidiNoteLength,MidiVelocity, andMidiRandominto.h+.cpppairs insrc/native/nota.engine/src/devices/midi_fx/
Checkpoint: All 25 effects, 16 instruments, 6 MIDI effects, and 4 racks compile as separate .cpp translation units and pass all device smoke tests.
Phase 5: User Story 5 - Engine Core .h/.cpp Split, Multi-Core AudioThreadPool & SIMD Mixer (src/engine/) (Priority: P2)
Goal: Move engine classes to src/engine/, split model headers (Track, Graph, Transport, Automation, Modulation, MidiClip, SessionPlayer, NoteExpression, MidiController) into .h + .cpp, fix the computeBlockMidi AR-6 allocation hazard, and integrate AudioThreadPool (with per-worker scratch buffers) and SIMD mixer summing in Engine_Render.cpp.
Independent Test: Run DspOptimizationTests and DspSilenceBypassTests in tests/Nota.SmokeTest.
- T048 [P] [US1] Move and split
Graph(Graph.h/.cpp),Track(Track.h/.cpp),Transport(Transport.h/.cpp,TransportInfo.h),SessionPlayer(SessionPlayer.h/.cpp),Automation(Automation.h/.cpp),Modulation(Modulation.h/.cpp),MidiClip(MidiClip.h/.cpp),MidiController(MidiController.h/.cpp),NoteExpression(NoteExpression.h/.cpp),CommandQueue.h,SnapshotHistory.h, andAudition.h/.cppinsrc/native/nota.engine/src/engine/ - T049 [US5] Implement
AudioThreadPool.handAudioThreadPool.cpp(lock-free Fork-Join worker pool withNOTA_CACHE_ALIGNEDatomics,ScopedNoDenormalsper worker thread, and pre-allocated per-workerworkerScratch_buffers) insrc/native/nota.engine/src/engine/ - T050 [US3] [US5] Pre-allocate
blockMidi_andblockExpr_buffers on the message thread duringEngine::publishRaw()/propagateSampleRate()to eliminatestd::vector::resize()on the audio thread inEngine::computeBlockMidi()(fixing AR-6) - T051 [US4] [US5] Update
Engine.h,Engine.cpp, andEngine_Render.cppinsrc/native/nota.engine/src/engine/to:- Dispatch Pass 1 leaf tracks in parallel via
AudioThreadPoolusingworkerScratchBuffer(workerId). - Skip
playEventsand redundant buffer scans wheninst->isIdle()andn == 0. - Propagate
SilenceDetectorandcurrentSilentdown leaf, group, return, and master device chains. - Vectorize leaf/group/return fader scaling, route taps (
routeBus_,routeBusPre_), and master bus processing (processMasterBus).
- Dispatch Pass 1 leaf tracks in parallel via
- T052 [US1] Update
src/native/nota.engine/CMakeLists.txtwith the complete modular source list and include directories
Checkpoint: Engine compiles and links cleanly; parallel rendering, silence bypass, and SIMD mixer summing operate with zero AR-6 violations.
Phase 6: Verification, Smoke Tests & Documentation Sync
Purpose: End-to-end validation, regression tests, and Nota documentation sync.
- T053 [P] Add
DspOptimizationTests.csandDspSilenceBypassTests.csintests/Nota.SmokeTest/and wire them intotests/Nota.SmokeTest/Program.cs - T054 [P] Update
ARCHITECTURE.md,BUILD.md,.agents/skills/nota-instrument/SKILL.md, and.claude/skills/nota-instrument/SKILL.mdto document the new folder structure,.h/.cppconvention, and separatednota_pluginscannermodule - T055 [P] Add
.clang-formatin repository root andCHANGELOG.md[Unreleased]entry documenting the C++20 DSP architecture overhaul,.h/.cppmodularization, plugin scanner separation, multi-core rendering, SIMD vectorization, and auto-sleep bypass - T056 Verify AGPL-3.0-only two-line SPDX header on every new
.h,.cpp, and.csfile - T057 Run
./scripts/build.shuntil native build, symbol export check, managed build, andtests/Nota.SmokeTestpass 100% green
Dependencies & Execution Order
- Phase 1 (
dsp/core&dsp/math): No dependencies — starts immediately. - Phase 2 (
pluginhost/scanner&pluginhost/hosting): Depends on Phase 1 (FastMath,SimdAudio). Can run in parallel with Phase 3. - Phase 3 (
dsp/primitives&dsp/poly): Depends on Phase 1. - Phase 4 (
devices/,abi/,audio_io/,media/.h/.cppsplit & optimization): Depends on Phases 1 & 3. Tasks T039–T047 are highly parallelizable across device families. - Phase 5 (
engine/.h/.cppsplit,AudioThreadPool&Engine_Render.cpp): Depends on Phases 1–4. - Phase 6 (Tests, Docs & Final Gate): Depends on Phases 1–5.