Skip to main content

Audio Routing

This guide covers everything you need to know about routing audio and MIDI in plugdata, from basic stereo I/O to complex multichannel configurations.

Understanding Audio in Plugdata

Signal Flow

Audio flows through plugdata in this order:
1

Audio Input

Physical inputs or DAW tracks enter via [adc~] objects
2

Signal Processing

Audio-rate objects (marked with ~) process signals
3

Audio Output

Processed audio exits via [dac~] to physical outputs or DAW
Key Concepts:
  • Sample Rate - Samples per second (44100, 48000, 96000 Hz)
  • Block Size - Samples processed per cycle (affects latency)
  • Channels - Separate audio streams (mono=1, stereo=2, etc.)
  • Signal vs Message - Audio runs at sample rate, messages at block rate

Audio Input with [adc~]

Basic Input

The [adc~] object receives audio from external sources:

Channel Selection

Specify which input channels to use:
Receive left and right channels:
Channel numbers start at 1. Available channels depend on your audio interface configuration.

Monitoring Input Levels

Visualize input levels:

Audio Output with [dac~]

Basic Output

The [dac~] object sends audio to external destinations:

Stereo Output

Most common configuration:

Panning

Distribute mono signal across stereo field:
Or use the ELSE library:

Multichannel Output

Route to multiple outputs:

Multichannel Patches

Configuring Channels

Set up multichannel I/O:
1

Standalone Mode

Settings > Audio > Select input/output channels to enable
2

Plugin Mode

Configure in your DAW:
  • Set track input/output channel count
  • Route hardware or virtual channels
  • Check plugin I/O configuration

Multichannel Processing

Process multiple channels efficiently:

Matrix Routing

Create flexible routing matrix:
Use abstractions to create reusable multichannel processors. Pass channel count as argument.

Channel Configuration

Standalone Channel Setup

Settings > Audio > Input Channels
  • Enable needed input channels
  • Disable unused channels to save CPU
  • Test with [adc~] and [env~]
  • Check physical connections
Settings > Audio > Output Channels
  • Enable output channels for your setup
  • Match your speaker/monitor configuration
  • Test with [osc~] to each output

Plugin Channel Setup

In DAW mode:
  1. Set track channel count in DAW
  2. Insert plugdata on multichannel track
  3. Configure routing in patch with [adc~] and [dac~]
  4. Enable channels as needed in DAW mixer
Common Configurations:
  • Mono - 1 in, 1 out (single instruments)
  • Stereo - 2 in, 2 out (most common)
  • Quad - 4 in, 4 out (surround)
  • Multi - Any configuration for stems/busses

MIDI Routing

MIDI Input

Receive MIDI messages:
Receive note on/off:
Or for specific channel:

MIDI Output

Send MIDI messages:

MIDI to Audio

Convert MIDI to audio signals:
Use [mtof] to convert MIDI note numbers to frequency in Hz.

Managing Latency

Understanding Latency

Total latency comes from:
  1. ADC latency - Analog to digital conversion
  2. Buffer latency - Processing buffer size
  3. DAC latency - Digital to analog conversion
  4. Plugin latency - Additional processing delay
Formula:

Buffer Size Selection

Choose based on your needs:
Buffer: 64-128 samplesPros:
  • Minimal delay (1.5-3ms at 48kHz)
  • Good for live performance
  • Real-time MIDI input feels responsive
Cons:
  • Higher CPU usage
  • Risk of audio dropouts
  • May not work on slower systems
Best for:
  • Live instrument playing
  • MIDI controllers
  • Real-time effects

Latency Monitoring

Check current latency:
  1. Statusbar - Displays current latency in ms
  2. Settings - Audio panel shows buffer size
  3. DAW - Check plugin delay compensation settings

Reducing Latency

1

Decrease Buffer Size

Settings > Audio > Reduce buffer size (if system can handle it)
2

Optimize Patch

  • Remove unnecessary processing
  • Disable unused GUI updates
  • Use efficient objects
3

Adjust Sample Rate

Lower sample rate = less CPU, but less frequency response
4

Use ASIO (Windows)

ASIO drivers typically offer lower latency than DirectSound
Very small buffer sizes may cause audio crackling or dropouts. Increase buffer if you hear glitches.

Advanced Routing Techniques

Send/Return Buses

Create effect sends:

Sidechain Routing

Use one signal to control another:

Multi-Effect Chains

Route signal through multiple effects:

Troubleshooting Audio

Check:
  • DSP enabled (power button in statusbar)
  • Volume not at zero
  • Correct output device selected
  • [dac~] connected properly
  • Audio not muted in DAW (plugin mode)
Solutions:
  • Increase buffer size
  • Close other applications
  • Simplify patch
  • Check CPU meter
  • Update audio drivers
Verify:
  • Channel numbers in [adc~] and [dac~]
  • Physical cable connections
  • Audio interface channel mapping
  • DAW routing (plugin mode)
Fixes:
  • Reduce buffer size
  • Use ASIO drivers (Windows)
  • Close unnecessary programs
  • Check DAW delay compensation settings

Next Steps

You now understand audio routing in plugdata: