Visual graph editor, inspector, and debugger for gen-dsp signal graphs
Project description
dsp-graph
Visual graph editor, inspector, and debugger for gen-dsp signal-processing graphs.
Overview
dsp-graph provides a web UI (React + React Flow) backed by a Python server (FastAPI) for loading, visualizing, simulating, optimizing, building, and inspecting DSP signal graphs defined with gen-dsp's graph DSL.
Features:
- Load graphs from JSON or
.gdspDSL source (via toolbar or drag-and-drop) .gdspeditor with syntax highlighting, autocomplete, go-to-definition, and live preview- Interactive graph visualization with React Flow (pan, zoom, minimap)
- Auto fit-to-view on graph load, topology change, and container resize
- Node inspector showing all properties
- Per-sample simulation with output display
- Multi-pass graph optimization with before/after comparison
- C++ code generation preview with copy/download
- Binary plugin build for multiple platforms (CLAP, VST3, AU, LV2, etc.)
- Batch multi-platform build with zip download
- Content-addressed build cache (avoids recompilation for unchanged graphs)
- Graphviz DOT export
- SVG export of the current canvas view
- Export/roundtrip back to graph JSON and
.gdsp
Installation
pip install dsp-graph
Or from source:
git clone https://github.com/shakfu/dsp-graph.git
cd dsp-graph
make install-dev
make frontend-build
Quick Start
dsp-graph serve
Starts the server at http://127.0.0.1:8765. Open that URL in a browser, then load a gen-dsp graph JSON or .gdsp file via the toolbar or by dragging it onto the window. Use --open to auto-open the browser on start.
CLI Options
dsp-graph serve [--host HOST] [--port PORT] [--reload] [--open]
--host: Bind address (default: 127.0.0.1)--port: Port (default: 8765)--reload: Auto-reload on code changes--open: Open browser on start
Development
# Install dev dependencies
make install-dev
# Run backend tests
make test
# Install frontend dependencies
make frontend-install
# Run frontend dev server (hot reload, proxies /api to backend)
make frontend-dev
# Build frontend (outputs to src/dsp_graph/static/)
make frontend-build
# Run full QA (test + lint + typecheck + format)
make qa
# Start server with auto-reload
make dev
Architecture
Backend (Python)
convert.py-- Core Graph <-> ReactFlow conversion layerserver.py-- FastAPI app with SPA static servingcli.py-- CLI entry point (dsp-graph serve)cache.py-- Content-addressed disk cache for build artifactsapi/graph.py-- Graph load/validate/export/catalog endpointsapi/simulate.py-- Per-sample simulation endpointapi/optimize.py-- Multi-pass optimization endpointapi/compile.py-- C++ code generation endpointapi/generate.py-- Project generation (source files, zip download, platform listing)api/build.py-- Binary build, batch build, and build cache managementapi/layout.py-- Auto-layout endpoint
Frontend (React + TypeScript)
- React Flow (xyflow) for graph visualization
- Zustand for state management
- CodeMirror editor with custom
.gdsplanguage support - Custom node types: input, output, param, dsp_node
- Vite build, outputs to
src/dsp_graph/static/
API Endpoints
| Endpoint | Method | Description |
|---|---|---|
/api/graph/load/json |
POST | Load Graph JSON -> ReactFlow |
/api/graph/load/gdsp |
POST | Parse .gdsp source -> ReactFlow |
/api/graph/validate |
POST | Validate a Graph |
/api/graph/export/json |
POST | ReactFlow -> Graph JSON |
/api/graph/node-types |
GET | Node type catalog + colors |
/api/graph/dot |
POST | Graph -> Graphviz DOT |
/api/simulate |
POST | Run per-sample simulation |
/api/optimize |
POST | Optimize graph (before/after) |
/api/compile |
POST | Graph -> C++ source |
/api/layout |
POST | Auto-layout ReactFlow nodes |
/api/generate |
POST | Generate project source files |
/api/generate/zip |
POST | Generate project as zip download |
/api/generate/platforms |
GET | List supported target platforms |
/api/build |
POST | Compile graph to binary plugin |
/api/build/binary |
POST | Compile and download binary |
/api/build/batch |
POST | Build for multiple platforms |
/api/build/batch/{id}/zip |
GET | Download batch build as zip |
/api/build/cache |
DELETE | Clear build cache |
/api/build/cache/info |
GET | Build cache statistics |
License
MIT
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file dsp_graph-0.1.8.tar.gz.
File metadata
- Download URL: dsp_graph-0.1.8.tar.gz
- Upload date:
- Size: 793.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
101b071ed5035ba8357e6adb002bfc97e435d4c37f461bd8777869c9fd619357
|
|
| MD5 |
7dc70246ef7e0f08b2d3b5b3acfe58f7
|
|
| BLAKE2b-256 |
fd41b5d5602b7cc5fc7f775226ddcb32027f58a0a178141e30b5de3f23f3017d
|
File details
Details for the file dsp_graph-0.1.8-py3-none-any.whl.
File metadata
- Download URL: dsp_graph-0.1.8-py3-none-any.whl
- Upload date:
- Size: 799.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
308736a8337e7c3f302c5c7bc618cc6ce53605775b7eb2bbe3fc31af7d9a8354
|
|
| MD5 |
569c2d54cc2b97ab5fd2e26d27502b22
|
|
| BLAKE2b-256 |
c23d8768e8b7cf794cec962bcec38ab81d386a365e3d9492b9d3261f80d705cb
|