Skip to content

Potential feature: external audio passthrough + Surge FX processing #4

Description

@MitchSchwartz

Summary

Explore line-in audio passthrough through Surge XT’s FX chain on the MPE Sound Module — potentially concurrent with MPE synth playback and existing footswitch MIDI → FX modulation.

This is not implemented today. The reference build is a one-way instrument appliance: MPE controller → Surge synth → audio out. Effects on the synth path are already handled via programmed footswitches sending MIDI CC into Surge; this issue covers adding external audio into that same FX ecosystem.

Status: potential / parked — not required for current validation or core positioning (dedicated MPE instrument vs multi-engine FX workstation).


Current behavior

  • surge-xt-cli runs headless with MPE enabled at boot (--mpe-enable, --all-midi-inputs, etc.).
  • Signal flow: Roli (or other MPE controller) → Surge voices → USB audio out (Sound Blaster Play! 3).
  • Footswitches (see docs/FOOT_PEDAL.md, config/pedal-config.json, pedal scripts) send MIDI CC to modulate Surge FX parameters — already working on the synth path.
  • Startup scripts configure audio output only (--audio-interface); line-in is not routed.
  • Default patches and boot flow assume synth-only operation.

Why this might be useful

  • Process an external source (mic, guitar, second instrument) through Surge’s built-in reverb/delay/filter FX using the same footswitch mappings.
  • Layer MPE synth + processed external audio in one box without a laptop.
  • Demonstrates Surge XT headless flexibility on ARM Linux beyond pure synthesis.

Out of scope for this issue: hosting third-party VSTs (e.g. Valhalla) — no native Linux builds; Wine/yabridge is impractical on Pi.


Surge XT capabilities (engine support)

Surge can do this in a single instance:

Mechanism Role
Scene A MPE synth (current use)
Scene B Audio Input oscillator → filters → scene insert FX
Master FX Process combined mix; footswitch CC targets apply here if mapped
Dual / split scene modes Layer synth + external path
Sidechain inputs Stereo line-in (same as Zynthian’s Surge sidechain routing)
Surge FX plugin FX-only path (separate binary; alternative architecture)

Known Surge quirk: Audio Input in poly/mono modes may require a gate (MIDI note, latch mode, or purpose-built patch) for continuous passthrough — not true always-on hardware-pedal behavior without patch design.

References:


Proposed behavior (if built)

  1. Hardware: route line-in on the USB audio interface (Play! 3 has 3.5 mm input) or a stereo in/out interface.
  2. Software: configure Surge to capture input on the same ALSA device as output.
  3. Patch(es): dual-path layout — MPE synth on one scene, external audio through FX on the other (or master FX on mix).
  4. Footswitches: existing CC mappings modulate FX affecting passthrough, synth, or both (patch-dependent).
  5. Optional: dry/wet or bypass via footswitch CC or dedicated patch macros.

Concurrent operation target:

External line-in ──→ Surge (Scene B / master FX) ──┐
                                                    ├──→ audio out
MPE controller ──→ Surge (Scene A / MPE voices) ──┘
Footswitches ──→ MIDI CC ──→ Surge FX params

Implementation sketch

Phase 0 — Feasibility spike (manual, not headless)

  • On reference Pi, test Surge XT standalone (GUI or VNC) with Play! 3 line-in → Audio Input patch → FX → out.
  • Confirm always-on passthrough patch strategy (latch / held note / master routing).
  • Measure CPU % and xruns at 512 and 256 buffer with MPE + passthrough simultaneously.

Phase 1 — Headless routing

  • Extend detect-audio-device.sh / start-surge-cli.sh to select input + output on the same ALSA device (verify surge-xt-cli --list-devices input flags).
  • Ship one or more template patches (e.g. Templates/Audio In style) tuned for dual MPE + line-in.
  • Document footswitch CC mapping for passthrough FX in docs/FOOT_PEDAL.md.

Phase 2 — Product UX (optional)

  • Boot mode or patch category for “FX processor” vs “MPE synth only.”
  • OLED/encoder indication when passthrough path is active (if applicable).

Architecture note: current stack uses direct ALSA, no JACK. Prefer single Surge instance over Carla/JACK pipeline unless ALSA routing proves insufficient.


Hardware / performance notes

Concern Guidance
Pi 4 vs Pi 5* Current stack (MPE + footswitch FX) needs no upgrade if stable today. Passthrough adds DSP load — Pi 5 = headroom, Pi 4 = try conservative patches first.
RAM 4 GB sufficient — Surge + Lite OS + patch browser are well under 4 GB; 8 GB not expected to help unless swapping (bad for audio).
Latency (MPE path) ~512-sample buffer ≈ ~11 ms buffer term (~13–18 ms touch-to-sound total at 44.1 kHz). Unchanged by footswitches.
Latency (passthrough path) Adds input buffer — often ~2× buffer term for external signal; fine for time-based FX, poor for tight dry monitoring.
CPU Footswitch MIDI = negligible. Passthrough + FX = moderate; bloated 3rd-party synth patches + heavy reverb on both paths = xrun risk.

Acceptance criteria (if pursued)

  • External stereo line-in audible through Surge FX chain to module audio out
  • MPE synth playable simultaneously without dropouts on reference Pi (patch TBD)
  • Existing footswitch CC mappings modulate at least one FX parameter on the passthrough path
  • Documented signal flow, patch setup, and latency expectations in repo docs
  • No Wine / third-party VST dependency

Priority

Low / parked — core product is a dedicated MPE instrument appliance. Pursue only if validation signal or personal performance needs justify the scope (different job than Zynthian-style FX workstation, but narrower than full DAWless mixer).


Related

  • Footswitch FX modulation: docs/FOOT_PEDAL.md, pedal scripts, config/pedal-config.json
  • Positioning: single-purpose instrument (Roli → Surge → out) — see README / product narrative
  • Community context: users asking about Linux FX alternatives (Valhalla etc.) — native Surge/LV2 path only on Pi

Opened: 2026-07-24 (America/Toronto)

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions