Skip to content

Proposal: in-browser tone engine (live guitar input + NAM amp sim) #339

Description

@mogul

Restored from slopsmith/slopsmith#8 — original issue, opened by @vulngraph-ai on 2026-04-12.
[restored-from: slopsmith/slopsmith#8]

Summary

Proposal to add a software tone path to Slopsmith so users can plug a guitar into any USB audio interface (Real Tone Cable, Focusrite, etc.) and hear it through the song's tone chain in-browser — no external hardware modeler required.

This is intended to complement, not replace, the existing tone ecosystem:

  • slopsmith-plugin-tones already parses the [redacted] tone_*.json manifests and renders the signal chain. Reusable as-is.
  • slopsmith-plugin-midi already drives external hardware modelers via MIDI program change on tone switches. Users with a Helix/Kemper/Axe-FX are covered.
  • Gap: users without external hardware currently have no way to hear their guitar through the song's tone. This proposal fills that gap entirely in the browser, keeping Slopsmith Linux-native and dependency-light.

Scope (plugin-first)

I'd build this as a standalone plugin (slopsmith-plugin-tone-engine or similar), following the same pattern as slopsmith-plugin-3dhighway — opt-in, no core bloat, no new server-side dependencies beyond what the plugin ships itself. If it proves itself, core integration can be discussed later.

Technical approach

All browser-side, all WASM, no native code:

  1. Input capturegetUserMedia({ audio: { echoCancellation: false, noiseSuppression: false, autoGainControl: false, latency: 0 } })MediaStreamAudioSourceNode into the existing AudioContext.
  2. DSP in an AudioWorklet so processing runs on the audio thread (~5–10 ms round-trip on Linux/PipeWire with a decent interface).
  3. Amp stage: Neural Amp Modeler (NAM) via its WASM runtime. Users load .nam capture files (thousands available free on ToneHunt, including high-gain captures that match common CDLC tones). Optionally also support AIDA-X / Proteus for lighter models.
  4. Cab stage: ConvolverNode with user-supplied IR .wav files. Standard, cheap, sounds great.
  5. Pedals / utility DSP (noise gate, TS-style boost, EQ, delay, plate reverb) reimplemented as small Worklet nodes — well-trodden open-source DSP.
  6. Tone auto-selection: read the parsed tone_*.json (via the existing tones plugin's parser, or a shared lib) and map each song's amp/cab/pedal IDs to a user-configured NAM capture + IR + pedal chain. Falls back to a default ''clean / crunch / lead'' set when no mapping exists.
  7. Guitar stem ducking: when the [redacted] has multitrack stems, mute the guitar bus so the user's live signal sits in the mix. When it doesn't, support an optional preprocessed stem-separated backing track (Demucs one-shot) as a per-song asset.
  8. Latency compensation: expose the measured input→output latency and offset the note highway timing so hits line up visually with what the user hears.

Why NAM specifically

Modern neural amp captures are effectively indistinguishable from the source amp/plugin in a null test at a fixed knob setting. The ''tone quality'' problem is solved; what's left is integration work. This keeps the project fully open-source and legally clean — users bring their own captures (their own files, their own license to make them).

What I'm asking

I'm willing to build this end-to-end — plugin scaffolding, WASM NAM integration, AudioWorklet DSP chain, tone-mapping UI, latency calibration, the lot. I don't need help with the implementation; I just want to confirm direction before investing the time:

  1. Does a plugin-first approach sound right to you, or would you prefer this land somewhere else (core, or a separate fork)?
  2. Any constraints I should know about — e.g., plans for .sloppak (feature: integrate per-stem volume sliders into the mixer popover #7) that might affect where tone metadata lives, or conventions for plugins that need audio-graph access rather than just UI hooks?
  3. Would you be open to a small core PR later that exposes a stable hook for plugins to tap into the AudioContext / insert nodes into the playback graph? That's the one piece I can't cleanly do from a plugin today without patching static/app.js, and it'd benefit any future audio-processing plugin, not just this one.

Happy to open a draft PR with the plugin scaffolding as soon as there's a green light on direction. Thanks for building Slopsmith — this project is genuinely exciting and I'd love to contribute something substantial to it.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions