Expand description
DSL parser for .pedal circuit definition files.
Parses component declarations, net connections, and control mappings into an AST that can drive WDF tree construction or KiCad export.
Structs§
- CapConfig
- Extended capacitor configuration with parasitic modeling.
- Component
Def - A single component declaration, e.g.
R1: resistor(4.7k) - Control
Def - Control mapping:
Gain.position -> "Drive" [0.0, 1.0] = 0.5 - Init
Hint - One device hint from the
init { ... }block. - Monitor
Def - Monitor definition for real-time metering visualization.
- Named
Supply - A named power supply rail.
- NetDef
- A net connection:
in -> C1.aorC1.b -> R1.a, D1.a - Pedal
Def - Top-level pedal definition.
- PortDef
- Named port declaration from the .pedal DSL.
- Sidechain
Info - Sidechain definition for feedback compression loops.
- Subcircuit
Def - A subcircuit block within a pedal/equipment definition. Subcircuits partition a circuit into named sub-networks that can have independent rate domains (e.g., audio path vs. sidechain).
- Supply
Config - Power supply configuration — models B+ rail behavior under load.
- Tape
Head Config - Voltage-driven Jiles-Atherton tape head configuration.
- Transformer
Config - Audio transformer configuration.
- UseInstance
- A file-based subcircuit instance:
micamp: use("../sub/ba284.pedal").
Enums§
- Analog
Switch Type - Analog switch IC types.
- BbdType
- BBD (Bucket-Brigade Device) types for analog delay lines.
- CapType
- Capacitor dielectric types with different parasitic characteristics.
- Comparator
Type - Comparator IC types.
- Diode
Type - Init
State - Named or explicit initial state for one NL device in an
init { ... }block. - LfoWaveform
Dsl - LFO waveform shapes for DSL.
- Matched
Transistor Type - Matched transistor pair/array types for exponential converters.
- Meter
Type - Meter type for monitor visualization.
- Mosfet
Type - MOSFET types for enhancement-mode devices used in guitar pedals.
- Neon
Type - Neon bulb types for relaxation oscillators and optocouplers. Neon bulbs exhibit negative resistance behavior:
- OpAmp
Type - Op-amp types with different characteristics. Each type has distinct slew rate, gain-bandwidth product, and input impedance that affect the tone and response of the circuit.
- Photocoupler
Type - Pin
- A pin reference – either a reserved node (
in,out,gnd,vcc), a component pin (C1.a,R1.b), or a fork for dynamic routing. - PotTaper
- Potentiometer taper type.
- Rectifier
Type - Rectifier type — determines supply output impedance character.
- Sidechain
Target - Sidechain target — what the sidechain CV modulates.
- Spring
Tank Type - Spring-reverb tank models (Accutronics / RE-201 grounded).
- VcaType
- VCA (Voltage-Controlled Amplifier) IC types.
- VcfType
- VCF (Voltage-Controlled Filter) IC types.
- VcoType
- VCO (Voltage-Controlled Oscillator) IC types.
- VcoWaveform
Dsl - VCO waveform selection for DSL.
- Winding
Type - Transformer winding configuration.
Constants§
- DEFAULT_
NPN_ MODEL - Default SPICE model name for a generic NPN BJT.
- DEFAULT_
PNP_ MODEL - Default SPICE model name for a generic PNP BJT.
Functions§
- parse_
pedal - Parse a complete
.pedalor.synthfile. Bothpedal "Name" { ... }andsynth "Name" { ... }produce the same AST. - parse_
pedal_ file - Convenience wrapper that returns
Result.