// ZPWR-PATCH-CORE — ENGINEERING REPORT

v0.3.0 · patch JSON v4 · juce_core-only routing graph · module map · dependency footprint · test status

>_EXECUTIVE SUMMARY

zpwr-patch-core (zpc) is the signal-agnostic modular patch graph shared by the MenkeTechnologies plugin stack — zpwr-fx, zpwr-synth and zpwr-midi-fx. It is built as a static library (zpwr::patch_core) from eight translation units and ~57 headers under include/zpc/, and ships universal (x86_64 + arm64) on macOS. The graph is templated on the signal type carried between nodes: float for audio, a note-event stream for MIDI. The headline numbers are taken from the live registries the plugins run (4238 blocks across the Audio / Synth / MIDI registries, per the Block Catalog); coverage against the VCV Rack / Voltage Modular / Eurorack ecosystems (7374 modules audited) is in the Port Report.

4238
Blocks Registered
3
Registries (FX / Synth / MIDI)
1
Runtime Dependency
7
Headless Test Suites
~57
Headers (include/zpc)
8
Translation Units
v4
Patch JSON Version
7374
Modules Audited (Port Report)

~MODULE MAP

The library is a small juce_core-only core plus a set of header-only block packs. The core owns routing, evaluation order, the mod matrix and serialization; the packs register the audio, synthesis and MIDI blocks the plugins expose. Per-block jacks, params and badges live in Blocks.

UnitKindRole
include/zpc/PatchCore.h + src/PatchCore.cppcorePatch data, module registry, runtime graph, engine; routing / topological order / mod-matrix / per-sample eval; the signal-agnostic core modules (Expr, Gain, Mixer); JSON serialization and version migration.
include/zpc/ScriptEngine.h + src/ScriptEngine.cppcoreRT-safe expression VM exposed as the Expr module.
include/zpc/WebEditor.hheaderShared WebView editor backend — catalog / patch / preset / browser native functions consumed by every host.
include/zpc/HostSupport.hheaderSoft-knob pool, host state, BinaryData finder, MidiInbox, CPU / RAM meters.
include/zpc/LayeredEngine.hheaderUnlimited layers, each a full engine copy, with per-layer parallel / series bus routing + JSON round-trip.
include/zpc/GlobalMods.hheaderShared global-modulator bus — LFOs / envelopes / random + the full MIDI / MPE source set.
include/zpc/ReferenceDoc.hheaderOffline reference-page renderer (registry → reference.html / PDF).
include/zpc/PresetStore.h, PresetTags.h, BlockPresets.hheaderFile-based preset CRUD, BROWSE-tab tag vocabulary, and per-block factory presets.
include/zpc/Wavetables.h, Scala.h, Multisample.h, Sfz/SampleLoad.h, Nksf.hheaderWavetable oscillator + tables, Scala microtuning, multisample / SFZ / NKSF sample loading.
include/zpc/dsp/* + src/dsp/WavetableBank.cppdspjuce-free synthesis DSP primitives — virtual-analog oscillator, filter, wavetable bank.
src/midi/* (Scale, ChordDictionary, ChordEngine, Arpeggiator, MidiModules)midiShared note-stream module registry + chord & scale engines, used by zpwr-midi-fx and zpwr-synth.
block packs: AudioModules.h, Analog*.h, Circuit.h, TubeAmp.h, Eventide.h, Valhalla.h, Traktor*.h, Physical*.h, Synthesis.h, MoreOscillators.h, GranularSpectral.h, Convolution.h, NovelBlocks.hheaderRegister the audio and synthesis blocks listed in the catalog; per-block jacks / params / badges live in Blocks.

~DEPENDENCY FOOTPRINT

The routing library is deliberately thin on the link line: exactly one external target, no networking, and PIC so it folds straight into each plugin binary.

DependencyScopeNotes
juce::juce_coreruntime (linked)The only external target the graph lib links. JUCE_USE_CURL=0 is defined so it pulls in no networking.
zdsp::corevendored, not linked hereShared real-time audio DSP, header-only at libs/zdsp-core. Not linked into the juce_core-only graph lib — the audio plugins link it themselves because it needs the heavier JUCE audio modules.
JUCE checkout (-DZPC_JUCE_DIR)optional, test/tool buildsStandalone headless test and developer-tool builds pull a JUCE checkout via this flag.

Consumers add the core with add_subdirectory and link zpwr::patch_core; the consumer's CMAKE_OSX_ARCHITECTURES (default x86_64;arm64) propagates, so it compiles universal as part of each plugin's VST3 / CLAP binary.


~VERIFICATION

Seven headless console-app test suites live under tests/ and are built through the JUCE CMake API when juce::juce_core is available. GlobalModsTest and ZdspCheck are gated on juce_audio_basics / the vendored zdsp-core submodule respectively. These suites and the lint were inventoried from the source tree for this report; they were not executed here, so no pass/fail counts are claimed.

SuiteGateCovers
PatchCoreTestjuce_coreCore patch model, routing, eval, serialization / migration.
LayeredEngineTestjuce_coreLayer stacking + per-layer parallel/series bus routing + JSON round-trip.
DspModulesTestjuce_corejuce-free synthesis DSP primitives.
MidiModulesTestjuce_coreNote-stream registry, chord & scale engines, arpeggiator.
HostSupportTestjuce_coreSoft-knob pool, host state, meters, MidiInbox.
GlobalModsTestjuce_audio_basicsGlobal-modulator bus: slot layout, MIDI routing, generated sources.
ZdspCheckvendored zdsp-coreVendored shared real-time DSP sanity check.

Developer Tools

The build also produces GenSeedModules (seed/registry generation) and DspBench (DSP benchmarking) alongside the test suites.

ASCII String Lint

An ASCII string-literal linter (scripts/lint_ascii_strings.py) rejects non-ASCII bytes inside C++ string / char literals. It runs in CI on every push (.github/workflows/lint-ascii.yml) and is wired as a .githooks/pre-commit hook.