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:
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:- Stereo Input
- Mono Input
- Multiple Inputs
- Specific Channels
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:Multichannel Output
Route to multiple outputs:Multichannel Patches
Configuring Channels
Set up multichannel I/O:Multichannel Processing
Process multiple channels efficiently:Matrix Routing
Create flexible routing matrix:Channel Configuration
Standalone Channel Setup
Input Configuration
Input Configuration
Settings > Audio > Input Channels
- Enable needed input channels
- Disable unused channels to save CPU
- Test with
[adc~]and[env~] - Check physical connections
Output Configuration
Output Configuration
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:- Set track channel count in DAW
- Insert plugdata on multichannel track
- Configure routing in patch with
[adc~]and[dac~] - Enable channels as needed in DAW mixer
- 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:- Note Messages
- Control Change
- Pitch Bend
- Program Change
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:- ADC latency - Analog to digital conversion
- Buffer latency - Processing buffer size
- DAC latency - Digital to analog conversion
- Plugin latency - Additional processing delay
Buffer Size Selection
Choose based on your needs:- Low Latency
- Balanced
- High Stability
Buffer: 64-128 samplesPros:
- Minimal delay (1.5-3ms at 48kHz)
- Good for live performance
- Real-time MIDI input feels responsive
- Higher CPU usage
- Risk of audio dropouts
- May not work on slower systems
- Live instrument playing
- MIDI controllers
- Real-time effects
Latency Monitoring
Check current latency:- Statusbar - Displays current latency in ms
- Settings - Audio panel shows buffer size
- DAW - Check plugin delay compensation settings
Reducing Latency
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
No Audio Output
No Audio Output
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)
Audio Crackling
Audio Crackling
Solutions:
- Increase buffer size
- Close other applications
- Simplify patch
- Check CPU meter
- Update audio drivers
Wrong Channels
Wrong Channels
Verify:
- Channel numbers in
[adc~]and[dac~] - Physical cable connections
- Audio interface channel mapping
- DAW routing (plugin mode)
High Latency
High Latency
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:- Creating Patches - Build patches with proper audio routing
- Using Objects - Learn more audio processing objects
- Performance Optimization - Optimize patches for low latency
