Skip to main content

Module dsl

Module dsl 

Source
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.
ComponentDef
A single component declaration, e.g. R1: resistor(4.7k)
ControlDef
Control mapping: Gain.position -> "Drive" [0.0, 1.0] = 0.5
InitHint
One device hint from the init { ... } block.
MonitorDef
Monitor definition for real-time metering visualization.
NamedSupply
A named power supply rail.
NetDef
A net connection: in -> C1.a or C1.b -> R1.a, D1.a
PedalDef
Top-level pedal definition.
PortDef
Named port declaration from the .pedal DSL.
SidechainInfo
Sidechain definition for feedback compression loops.
SubcircuitDef
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).
SupplyConfig
Power supply configuration — models B+ rail behavior under load.
TapeHeadConfig
Voltage-driven Jiles-Atherton tape head configuration.
TransformerConfig
Audio transformer configuration.
UseInstance
A file-based subcircuit instance: micamp: use("../sub/ba284.pedal").

Enums§

AnalogSwitchType
Analog switch IC types.
BbdType
BBD (Bucket-Brigade Device) types for analog delay lines.
CapType
Capacitor dielectric types with different parasitic characteristics.
ComparatorType
Comparator IC types.
DiodeType
InitState
Named or explicit initial state for one NL device in an init { ... } block.
LfoWaveformDsl
LFO waveform shapes for DSL.
MatchedTransistorType
Matched transistor pair/array types for exponential converters.
MeterType
Meter type for monitor visualization.
MosfetType
MOSFET types for enhancement-mode devices used in guitar pedals.
NeonType
Neon bulb types for relaxation oscillators and optocouplers. Neon bulbs exhibit negative resistance behavior:
OpAmpType
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.
PhotocouplerType
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.
RectifierType
Rectifier type — determines supply output impedance character.
SidechainTarget
Sidechain target — what the sidechain CV modulates.
SpringTankType
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.
VcoWaveformDsl
VCO waveform selection for DSL.
WindingType
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 .pedal or .synth file. Both pedal "Name" { ... } and synth "Name" { ... } produce the same AST.
parse_pedal_file
Convenience wrapper that returns Result.