API Reference
gen-dsp's Python API is organized into three packages:
gen_dsp.core -- Pipeline modules: parsing gen~ exports, building manifests, generating projects, and compiling
gen_dsp.platforms -- Platform registry and backend implementations
gen_dsp.graph -- Optional graph frontend (requires pydantic)
Data Flow
gen~ export dir -> parser.py -> ExportInfo -> manifest.py -> Manifest -> Platform.generate_project()
For the graph frontend:
Graph (Python/JSON) -> compile.py -> C++ -> adapter.py -> Manifest -> ProjectGenerator.from_graph()
Core Modules
| Module |
Description |
parser |
Regex-based parser for gen~ exports, produces ExportInfo |
manifest |
Manifest dataclass: front-end-agnostic IR with ParamInfo |
project |
ProjectGenerator: copies export files, runs template substitution |
builder |
Builder delegates to Platform.build(), returns BuildResult |
patcher |
Applies platform-specific fixes (e.g. exp2f on macOS) |
cache |
Resolves shared FetchContent cache directory |
midi |
MIDI mapping detection and compile-definition generation |
| Module |
Description |
platforms |
Platform base class, PLATFORM_REGISTRY, helper functions |
Graph Frontend