Allomorph is a forward electroacoustic Digital Twin simulation and neural audio modeling pipeline that transforms active, passive, and acoustic piezo bass signals into authentic digital twins of iconic passive pickup circuits, active preamps, and acoustic double bass transducers.
Designed for neural-capable pedalboards like the Darkglass Anagram, Tone3000 cloud training, and DAW plugin hosts, Allomorph produces:
-
Forward Digital Twin Wet Audio Stems: 48 kHz / 24-bit PCM stems synthesized via native Modified Nodal Analysis (MNA) circuit simulation and 15-parameter non-linear magnetic dynamics, calibrated to ITU-R BS.1770-4 gated loudness (
$-20.50\text{ LUFS}$ ) with a 4x oversampled true-peak safety ceiling ($\le 0.9900 / -0.09\text{ dBFS}$ ). -
Tone3000 Upload Bundles: Turnkey training packs partitioned by physical pickup affinity (
neck,bridge,parallel,direct) with zero-scroll pedalboard naming ($\le 34$ chars) and cryptographic SHA256 manifest provenance. -
Neural Amp Modeler (NAM) A2 Profiles: Dual-tier slimmable Architecture 2 neural models (
channels_3+channels_8) trained directly on(Source Digital Twin → Target Digital Twin)stem pairs for single-block front-end deployment in Darkglass Anagram Block 1. -
Interactive Frequency Response Portal: Polars + Altair Vega-Lite interactive comparator (
docs/frequency_responses.html) visualizing analytical forward and differential transfer curves across all instruments and voicings.
Converting a passive or rolled-off pickup to another instrument using linear digital EQ or static Impulse Responses (IRs) hits fundamental physical limits: linearly boosting attenuated high frequencies by
Allomorph solves this via direct Forward Digital Twin simulation and non-linear neural modeling:
- Active Sources (e.g. 18V EMG X-Series, Active Soapbars, StingRay): Deliver a wide-bandwidth, high-headroom signal that Allomorph maps into any vintage passive RLC circuit, ToneStyler capacitive shunt, or multi-scale voicing.
-
Passive Sources (e.g. Precision, Jazz, Mustang, Rickenbacker): Both the source bass and target voice are simulated forward from master unvoiced string excitation (
audio/input.wav), training a NAM WaveNet A2 network directly on(Source Twin → Target Twin). Rather than applying noisy linear high-frequency boosts, the non-linear WaveNet synthesizes phase-coherent upper harmonics directly from the strong fundamental and low-order string overtones. -
Acoustic & Piezo Transducers: Models bridge saddle force transducers (
$x = 0$ ), maple bridge rocking resonance ($800\text{ Hz}$ ), and wood mass damping ($3.2\text{ kHz}$ ).
While Allomorph synthesizes zero-latency minimum-phase FIR filters internally for linear acoustic and circuit stages, it trains NAM Architecture 2 (A2) neural models for hardware deployment because physical pickups are dynamic, non-linear systems:
-
Analog Dynamic "Give": Captures soft-knee magnetic flux compression, Lenz velocity drag, and dynamic reluctance "quack" (
$\lambda_L$ ) when digging in hard ($ff$ vs$pp$ ). - Pre-Conditioning Downstream Distortion: Sits in Darkglass Anagram Block 1 before high-gain drives (Microtubes B7K, Vintage Ultra, Alpha·Omega), conditioning active transients with authentic passive impedance damping.
-
Eddy Currents & Reactive Energy Storage: Reproduces frequency-dependent pole-piece skin dispersion (
$\sqrt{s}$ ), Foster eddy diffusion, and Dahl domain-wall hysteresis. - Multi-Coil Spatial Phase Summing: Captures compound standing-wave comb interactions and register-weighted string pull across split and dual-coil geometries.
- Noise-Free Harmonic Restoration: Synthesizes missing upper harmonics non-linearly without elevating the underlying input noise floor.
Allomorph simulates the complete electroacoustic path in four physical layers (see docs/aperture_math.md and docs/circuit_theory.md):
[Master String Excitation (audio/input.wav)]
│
▼
1. Spatial Aperture & Scale Continuum (src/allomorph/physics/)
├── 2D Cylindrical Rod / 1D Blade Sensing Apertures & Humbucker Spacing (d)
├── 24-Point Log Wave-Speed Continuum, Inharmonicity RBF & Saddle Stiffness
└── Causal Multi-Pickup Arrival Delays (tau_i) & Bridge Excursion Low-Shelf
│
▼
2. Branch-Wise Non-Linear Magnetic & Op-Amp Dynamics (src/allomorph/circuit/)
├── 15-Parameter State-Space Magnetic Feel (Lenz Sag, Pull, Quack, Dahl Hysteresis)
└── 2-Block Active Op-Amp Headroom (18V X-Series vs 9V Classic)
│
▼
3. MNA Passive RLC & Active Preamp Harness (src/allomorph/circuit/)
├── Coil Inductance (L), DC Resistance, Self-Capacitance & Eddy/Skin Dispersion
├── Coupled 2x2 Mutual Matrix, Volume/Tone Wipers & ToneStyler Shunts
└── Active 2/3-Band Preamp Buffers, 750 pF Cable Load & 1 MΩ Receiver Input
│
▼
4. Loudness Staging & Neural Pairing (src/allomorph/dsp/ & trainer/)
├── ITU-R BS.1770-4 Gated Loudness (-20.50 LUFS) & 4x True-Peak Ceiling (<= 0.9900)
└── NAM A2 WaveNet Training (Source Twin -> Target Twin)
See docs/anagram_workflow.md for hardware input gain staging (
[Physical Bass (Knobs 100%)] ──► [Block 1: Allomorph NAM A2] ──► [Block 2: Darkglass Preamp/Drive] ──► [Block 3: Cab IR] ──► [FOH / USB]
Allomorph models 24 target pickup voicings, active preamps, and transducers across 9 instrument families. For full electrical parameters (docs/voice_catalog.md:
| Family | Target Voice IDs | Representative Topologies & Sonic Character |
|---|---|---|
| Precision |
precision_vintage, precision_mids, precision_warm, precision_dub, precision_active
|
'62 Alnico V split-coil with CTS |
| Jazz |
jazz_pair_open, jazz_pair_mids, jazz_pair_active, jazz_bridge_growl, jazz_bridge_open, jazz_neck_warm
|
60s dual single-coils in parallel ( |
| StingRay |
stingray_parallel, stingray_series
|
Music Man bridge humbucker ( |
| Dingwall |
dingwall_bridge, dingwall_middle, dingwall_parallel
|
|
| Rickenbacker |
rickenbacker_clank, rickenbacker_open
|
High-gain bridge single-coil with vintage |
| PJ |
pj_passive, pj_active
|
Split-P neck + 60s J-bridge in vintage passive parallel ( |
| P∕MM |
p_mm_parallel, p_mm_series
|
Split-P neck + MM humbucker bridge into studio active buffer in parallel slap and series low-mid punch modes. |
| Mudbucker | mudbucker_deep |
Gibson EB-style |
| Upright | upright_piezo |
Orchestral 3/4 double bass bridge saddle piezo force transducer with |
Allomorph uses uv and provides a unified CLI (allomorph) alongside the standalone circuit runner (allomorph-sim):
# Install dependencies and sync environment
uv sync
# 1. Browse configured source instruments, target voices, and Tone3000 packs
uv run allomorph list
# 2. Generate interactive Polars + Altair frequency response charts & HTML portal
uv run allomorph viz
# 3. Synthesize 24-bit Forward Digital Twin wet audio stems
uv run allomorph stems generate all
uv run allomorph stems generate 30in_emg_mmtw:precision_active
# 4. Audit synthesized stems for BS.1770-4 loudness (-20.50 LUFS) & true-peak safety (<= 0.9900)
uv run allomorph audit
# 5. Package turnkey Tone3000 upload bundles (bundles/<pickup>/)
uv run allomorph pack packs
# 6. Train NAM Architecture 2 (.nam) models (native in-VRAM PyTorch or stock Lightning engine)
uv run allomorph train 30in_emg_mmtw:precision_active --engine native
uv run allomorph train pack:34in_standard_p --epochs 120 --min-epochs 100 --patience 15
# 7. Run low-level WAV SPICE circuit simulation directly
uv run allomorph-sim --voice precision_active --instrument 30in_emg_mmtw| Document | Scope & Contents |
|---|---|
docs/architectural_guardrails.md |
Master invariant index, cinf_smoothstep, alg4, fsqrt), and fail-fast contracts. |
docs/aperture_math.md |
Spatial aperture kernels (2D rod vs 1D blade), 24-point wave-speed continuum, inharmonicity RBF, saddle stiffness, and 34" placement physics. |
docs/circuit_theory.md |
Passive RLC networks, active preamps, Foster/Jordan/skin dispersion, Cole-Davidson dielectrics, coupled |
docs/dsp_simulation_engine.md |
Native Virtual Analog SIMD execution pipeline, 2x/4x oversampling, stage fusion, Numba @njit ODE kernels, and allomorph-sim CLI reference. |
docs/dsp_synthesis_engine.md |
Master excitation (audio/input.wav), 2D modal plucks, string tilt laws, pure real-FFT homomorphic cepstrum FIRs, and BS.1770-4 LUFS leveling. |
docs/trainer/README.md |
NAM A2 pairing theory, non-linear harmonic restoration, Native vs Stock training engines, hyperparameter defaults, and allomorph train / audit. |
docs/voice_catalog.md |
Engineering catalog of all 24 target pickup voicings, RLC component values, and control harnesses. |
docs/configuration_reference.md |
Declarative TOML schema reference for config/instruments/, config/packs/, preamps.toml, scales.toml, and strings.toml. |
docs/tone_packs/naming.md |
Normative bassist tone naming grammar, taxonomy dictionary, and zero-scroll character budgets ( |
docs/tone_packs/ranking.md & catalog.md |
Storefront voicing ranking architecture and Tone3000 pack catalog. |
docs/anagram_workflow.md |
Darkglass Anagram Block 1 signal routing, input gain calibration, and stage bank organization. |
docs/clamp_and_limit_registry.md |
Catalog-wide registry of empirically verified clamps, limiters, and regularization floors. |
We welcome contributions! All commits must be signed off (git commit -s) under our Contributor License Agreement (CLA.md). See CONTRIBUTING.md for development setup, strict pyrefly / ruff checks, and test standards, and AGENTS.md for AI agent discovery guidelines.
Licensed under the PolyForm Noncommercial License 1.0.0. For commercial licensing inquiries, contact Peter Nguyen (peter@phn.dev).