>_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.
~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.
| Unit | Kind | Role |
|---|---|---|
include/zpc/PatchCore.h + src/PatchCore.cpp | core | Patch 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.cpp | core | RT-safe expression VM exposed as the Expr module. |
include/zpc/WebEditor.h | header | Shared WebView editor backend — catalog / patch / preset / browser native functions consumed by every host. |
include/zpc/HostSupport.h | header | Soft-knob pool, host state, BinaryData finder, MidiInbox, CPU / RAM meters. |
include/zpc/LayeredEngine.h | header | Unlimited layers, each a full engine copy, with per-layer parallel / series bus routing + JSON round-trip. |
include/zpc/GlobalMods.h | header | Shared global-modulator bus — LFOs / envelopes / random + the full MIDI / MPE source set. |
include/zpc/ReferenceDoc.h | header | Offline reference-page renderer (registry → reference.html / PDF). |
include/zpc/PresetStore.h, PresetTags.h, BlockPresets.h | header | File-based preset CRUD, BROWSE-tab tag vocabulary, and per-block factory presets. |
include/zpc/Wavetables.h, Scala.h, Multisample.h, Sfz/SampleLoad.h, Nksf.h | header | Wavetable oscillator + tables, Scala microtuning, multisample / SFZ / NKSF sample loading. |
include/zpc/dsp/* + src/dsp/WavetableBank.cpp | dsp | juce-free synthesis DSP primitives — virtual-analog oscillator, filter, wavetable bank. |
src/midi/* (Scale, ChordDictionary, ChordEngine, Arpeggiator, MidiModules) | midi | Shared 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.h | header | Register 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.
| Dependency | Scope | Notes |
|---|---|---|
juce::juce_core | runtime (linked) | The only external target the graph lib links. JUCE_USE_CURL=0 is defined so it pulls in no networking. |
zdsp::core | vendored, not linked here | Shared 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 builds | Standalone 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.
| Suite | Gate | Covers |
|---|---|---|
PatchCoreTest | juce_core | Core patch model, routing, eval, serialization / migration. |
LayeredEngineTest | juce_core | Layer stacking + per-layer parallel/series bus routing + JSON round-trip. |
DspModulesTest | juce_core | juce-free synthesis DSP primitives. |
MidiModulesTest | juce_core | Note-stream registry, chord & scale engines, arpeggiator. |
HostSupportTest | juce_core | Soft-knob pool, host state, meters, MidiInbox. |
GlobalModsTest | juce_audio_basics | Global-modulator bus: slot layout, MIDI routing, generated sources. |
ZdspCheck | vendored zdsp-core | Vendored 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.