Skip to content

Audio routing ​

The Routing page is a patch bay for the audio devices and processing nodes currently available to AudioX. A route connects one node's output channel to another node's input channel. Saved routes take effect immediately and are restored when AudioX restarts.

Build a route ​

  1. Open Routing. AudioX loads the current audio devices, effects, and saved connections. If the list is empty, check that the audio subsystem has started and reload the page.
  2. Find a source such as From computer (USB), From Phone (Bluetooth), or Soundboard. Find a destination such as To computer (USB) or To Headphones (Bluetooth). Other audio devices use From [device] and To [device]. Names describe the signal's direction relative to AudioX.
  3. Drag from an output socket on the source node to an input socket on the destination. Even-channel sides appear as stereo pairs, and a stereo wire saves both channel routes (see Stereo wires and Advanced mode). Single-channel nodes use Mono; odd-channel sides use individual channels. Internal file channels remain zero-based.
  4. To remove a connection, click near its wire. Device nodes cannot be deleted. Remove effects from Effects; remove a routing helper or a Split/Merge Channels node from its node menu.
  5. Choose Save Routing. AudioX writes the connections and reloads the graph; the new routing is live without a reboot.

Use Undo / Redo (Ctrl/Cmd+Z and Ctrl/Cmd+Shift+Z, or Ctrl+Y) to reverse wire edits before saving. The toolbar indicates whether the current wires match the last successful save. History retains up to 100 versions in the browser session; loading routing or recalling a scene starts a new history. It does not undo effect creation/deletion, effect parameters, volumes, or node positions. Save again to apply an undone edit to live audio. Leaving Routing with pending wire edits asks for confirmation; leaving does not discard them. Browser close/reload protection also remains enabled.

The graph renders at the display's pixel density, including browser zoom and moving between monitors. Graph zoom and pointer coordinates remain in CSS pixels, so higher rendering resolution does not change node sizes or dragging. Nodes outside the initial view remain editable after panning or using Fit; the canvas has no LiteGraph debug border.

Open the collapsed Scenes menu below the graph to capture and recall named routing, effect inventories/settings, and gains; see Setup scenes. Scenes are hidden in graph fullscreen. If MIDI recalls a scene while you have wire edits, automatic topology/effect refresh pauses to preserve the draft. Download Wire Draft retains a copy; Load Active Routing asks before discarding edits and loads the current device setup. Saving a stale draft is blocked until you load the active setup.

Routing uses the full-width graph, without an overview or technical route-list sidebar. For advanced inspection, read /api/rootfs/config/routing.txt or use config.read("routing.txt") inside a script callback. Long files may need to be split into bounded log messages. The graph canvas itself does not show live per-node level meters. AudioX's device display has a separate meters view; its display mode can be switched from the Soundboard page.

Stereo wires and Advanced mode ​

By default the graph groups even-channel sides into stereo sockets: for example, a four-channel side has Stereo 1/2 and Stereo 3/4. A thicker purple wire between two stereo sockets connects their first and second channels; thin blue wires carry a single channel. One-channel and odd-channel sides are shown per channel.

AudioX itself only stores single-channel routes, so any route that is not a matched left/right pair (for example, a mono microphone on channel 1 sent to both sides of an effect) is drawn through browser-only Split Channels and Merge Channels nodes. A split turns one stereo output into Left and Right outputs; a merge collects Left and Right inputs into one stereo input. AudioX adds these automatically when it loads such routes.

To build a custom channel route yourself, right-click empty graph space and add Split Channels or Merge Channels from the utility category. Connect a stereo wire from the source to the split (or from the merge to the destination) first, then wire its Left/Right sockets. Each stereo source pair can have one split and each stereo destination pair one merge. Removing a split/merge node, or the stereo wire attached to it, removes every channel route that passes through it. Split and merge nodes are not saved; an unconnected one disappears when the graph reloads.

Turn on Advanced in the routing toolbar to show a separate socket and wire for every channel instead. The browser remembers this choice. Both modes save the same edge= lines.

Channel paths and saved syntax ​

A route is directed. Its channels are written as edge=source,destination,source-channel,destination-channel. For example:

text
# Bluetooth input, through effect fx_1, to the USB audio host
edge=bt_A4C6F0A57AA7_in,fx_1,0,0
edge=fx_1,usb_gadget_out,0,0

In the UI, connect the matching output and input sockets; you do not need to edit this file. The example uses channel 0 at each step. For stereo, make a separate route for channel 1:

text
edge=bt_A4C6F0A57AA7_in,fx_1,1,1
edge=fx_1,usb_gadget_out,1,1

Common graph IDs ​

Graph IDDirection in RoutingWhat it represents
usb_gadget_inSource (outputs)USB host/computer playback entering AudioX.
usb_gadget_outDestination (inputs)AudioX playback sent to the USB host/computer.
soundboard_outSource (outputs)Soundboard audio.
bt_<MAC>_inSource (outputs)Audio received from one paired Bluetooth device, such as a phone.
bt_<MAC>_outDestination (inputs)Audio sent to one paired Bluetooth headphone or speaker.
routing_helperTwo inputs and two outputsOptional two-channel pass-through node.
fx_1, fx_2, …Processing nodeEffect IDs assigned when effects are created.
alsa_<stable-card-id>_devN_inSource (outputs)Capture channels from a detected ALSA device.
alsa_<stable-card-id>_devN_outDestination (inputs)Playback channels to a detected ALSA device.

Each paired Bluetooth device gets its own nodes. <MAC> is the device address as 12 uppercase hex digits without separators, so the phone A4:C6:F0:A5:7A:A7 appears as bt_A4C6F0A57AA7_in. Devices that only send audio, such as phones, get only an _in node. Devices that only receive audio get only an _out node. A device that AudioX has not yet identified gets both. A Bluetooth node passes audio only while that device is connected; otherwise its input node is silent and its output node discards audio.

Routes to a Bluetooth device that is not paired (for example after Forget) are not shown in the graph. Save Routing keeps them in the file untouched, and they return when the device is paired again.

The ALSA ID pattern is illustrative; the card ID and device number depend on the connected hardware. IDs are hidden from ordinary controls. For scripts or manual file edits, find them in Volume's Advanced disclosure or query /api/routing/things. Effect IDs also appear under Effects > Advanced and delete; do not assume an effect's ID is fx_1. Saved effect names appear consistently in the graph.

The Config channel labels use AudioX's playback/capture stream direction, which is the reverse of how a USB host describes those same streams:

  • USB Playback Channels is audio played by AudioX to the host. On the host this is a capture input; the route leaves AudioX through the usb_gadget_out destination.
  • USB Capture Channels is audio captured by AudioX from the host. On the host this is playback output; the route enters AudioX at the usb_gadget_in source.

For example, to listen to host playback through an ALSA device, route from usb_gadget_in to that device's …_out node. To record Bluetooth input on the host, route from From [device] (Bluetooth) to To computer (USB). Friendly labels do not change the underlying routing IDs.

Multiple routes can leave a source or feed an input. Inputs receiving several routes are summed. The Audio Mixer (internally routing_helper) is a two-channel pass-through node; it forwards each input channel to the matching output channel. It is useful for organizing a patch, but it does not mix channels or add gain. Its configuration is represented by a separate line:

text
node=routing_helper
edge=bt_A4C6F0A57AA7_in,routing_helper,0,0
edge=routing_helper,fx_1,0,0
edge=fx_1,usb_gadget_out,0,0

Create a helper by adding Audio Mixer from the utility category of the graph's Add menu. Saving the graph saves both its enabled state and its edges. Removing the helper removes the node; review and save any remaining routes that you want to keep.

The recommended use for the mixer is as an output bus. Wire everything you want to hear (computer playback, the soundboard, a mic monitor) into the mixer, then one stereo wire from the mixer to each listening device, such as your interface's headphones and a Bluetooth speaker. Adding another output then takes one more wire instead of re-routing every source. Keep the line that feeds To computer (USB) separate, so computer playback cannot loop back into the computer.

Arrange and navigate the graph ​

  • Arrange follows the current routes, folding serial effect pairs vertically instead of stretching every effect into another column. Short branches sit near their destinations, and branches are reordered to reduce wire crossings. Separate routed groups occupy separate rows. Cycles stay together in a layer; unused nodes are grouped below the routed graph. With no routes, nodes are grouped by source/helper/effect/destination. Crossing reduction is a heuristic, not a guarantee of a crossing-free graph. Spacing is compact, with room for headers and wires. Drag node headers to place them manually.
  • Wires use smooth, direct curves at 45% opacity, so controls remain visible where routes cross panels. Selecting a node highlights all of its incoming and outgoing routes at 85% opacity; selecting multiple nodes highlights routes connected to any of them. Curves follow their sockets without jumping around other panels as you move nodes.
  • Fit scales and centers all nodes in the current graph area. The +, −, and percentage buttons zoom; scrolling over the canvas also zooms.
  • Fullscreen expands the graph area.

Layout and zoom are presentation controls, not routes. Save Routing saves connections and helper presence; it does not save node positions.

Effects, limits, and rejected connections ​

Add built-in effects (effects category) or installed plugins (plugin category) from the graph Add menu. The effect is created as an fx_N node; connect it like any other channel-preserving processing node. Effect parameters and bypass are managed on its node and on Effects. See Effects.

The graph is rebuilt against the devices and channel counts currently detected by AudioX. A saved edge is skipped when its endpoint is unavailable, its channel is out of range, its text is malformed, or the graph has reached its edge capacity. If no saved edge is valid, AudioX rejects the routing update; if only some are invalid, the valid edges can still load while invalid ones are skipped. A route that used to work can therefore become inactive after unplugging a device or changing a Cut effect's channel count. Reconnect the device or correct the affected channels, then save again.

There is a limit of 128 active runtime paths, including paths expanded through the routing helper. Direct wires take priority, followed by helper paths in saved incoming/outgoing wire order. If helper fan-out exceeds the limit, AudioX loads the first 128 paths and reports the skipped count in the reload response and a web UI warning. The saved wires remain intact, so reducing fan-out can restore previously skipped paths. The API's edges count is the expanded active-path count; skippedEdges includes both invalid saved wires and excess helper paths.

Keep signal flow one-way from inputs through processing to outputs. AudioX orders processing nodes for chained effects, but it does not provide a feedback-loop design or a cycle-warning workflow. Avoid connecting a path back into an earlier node.

Runtime optimizations ​

  • An enabled Mute (Cut) is a graph disconnection: AudioX does not mix audio into it or run its DSP to fill an output buffer with zeroes. Unmute is a direct channel connection.
  • Bypass forwards the same input buffer through the graph, including for native plugins. No effect processing, copy, clipping or extra block delay is added. The node's Volume gain still applies to outgoing routes; a buffer is needed only when applying non-unity gain or summing multiple inputs.
  • Built-in channels with exactly silent input and no pending audio or control release are skipped immediately, independently of the five-second idle timer. For example, a Cut ahead of five fresh built-ins prevents all five from running, even while another branch is playing. Other inputs to the chain still work. Exact cancellation and zero source volume also avoid silent DSP.
  • Existing reverb/delay/filter tails continue after an upstream mute until they settle. Detector release and coefficient transitions are not frozen. A mute placed after an effect blocks its tail from reaching that output. Silent built-in paths share a zero buffer; unused effect buffers are not cleared or written every block.

This is not a gate: very quiet nonzero audio still runs DSP while the graph is awake. Source I/O and meters keep running. Enabled native plugins remain conservative because their DSP may generate sound even from zero input; their bypass still uses the direct path.

Troubleshooting ​

  • No devices or missing ALSA node: check that the interface is connected and supported, then reopen Routing so the current topology is discovered. Device names and channel counts come from detected hardware.
  • A wire will not connect: start at an output socket and finish at an input socket. Verify that the source has outputs, the destination has inputs, and the desired channel numbers exist on both.
  • A saved connection is missing or silent: verify the device is present and the channel indices are valid. A disconnected device's route is unavailable until the device returns. A changed Cut channel count can also invalidate downstream edges.
  • The whole graph fails to reload: remove malformed, unavailable, or out-of-range routes; reconnect nodes in a simple forward path and use Save Routing again.
  • No level appears in the graph: the browser graph is not a meter display. Use the device display's meters view, or check the System and Troubleshooting guides for audio health and logs.

Related guides: Getting started, Soundboard, MIDI, Scripts, Configuration, Hardware, and Development. See the HTTP reference for API endpoints and persistent files.

AudioX is open source and under active development.