Expand description
Automatic schematic layout engine for PedalKernel .pedal circuits.
Converts a parsed pedalkernel::dsl::PedalDef into a positioned layout
suitable for:
- Plugin UI — real-time signal flow visualization with monitor-driven glow
- KiCad export — properly placed
.kicad_schfiles for PCB design
§Pipeline
PedalDef
→ LayoutGraph (directed graph with pin-direction inference)
→ FunctionalGroups (gain stages, tone stacks, push-pull, etc.)
→ Column assignment (Sugiyama layering for left-to-right signal flow)
→ Vertical placement (supply → signal path → ground convention)
→ Wire routing (orthogonal Manhattan paths)
→ Optimization (crossing minimization, grid snap, symmetry)
→ Layout (JSON-serializable output)Modules§
- graph
- Phase 1: Directed graph construction from the
.pedalnetlist. - groups
- Phase 2: Functional group detection.
- kicad
- KiCad
.kicad_schschematic export from layout data. - layering
- Phase 3: Sugiyama layer (column) assignment.
- optimize
- Phase 6: Aesthetic optimization pass.
- placement
- Phase 4: Vertical placement within columns.
- routing
- Phase 5: Wire routing (orthogonal Manhattan paths).
- symbols
- Component symbol definitions.
- types
- Output types for the schematic layout engine.
Functions§
- generate_
layout - Generate a complete schematic layout from a parsed pedal definition.
- to_json
- Serialize a layout to
.pedal_layoutJSON format. - to_
kicad_ schematic - Export a layout to KiCad
.kicad_schschematic format.