Overview
plugindata provides deep integration with digital audio workstations (DAWs) through industry-standard plugin formats. This allows Pure Data patches to work seamlessly within modern music production workflows.Plugin Formats
plugindata is available in multiple plugin formats:- VST3 - Steinberg’s cross-platform format (Windows, macOS, Linux)
- AU - Apple Audio Units (macOS only)
- LV2 - Open-source format (Linux primarily)
- CLAP - Modern open plugin standard (all platforms)
Transport Synchronization
Playhead Information
FromPluginProcessor.cpp:1055-1128, plugdata receives comprehensive transport data:
Accessing Transport Data in Pd
Use receive objects to access playhead information:Tempo Sync Example
Position-Based Triggering
Automation
Parameter System
FromPluginProcessor.cpp:120-131, plugdata exposes automation parameters:
- 1 volume parameter (param0/volume)
- 64 general automation parameters (param1-param64)
- Range: 0.0 to 1.0 (normalized)
- Saved with DAW project
Parameter Sending
FromPluginProcessor.cpp:1149-1159, parameters are efficiently updated:
Using Automation in Pd
Receive Parameter Values:Parameter Mapping
Linear Scaling:MIDI Routing
MIDI Input Processing
FromPluginProcessor.cpp:1166-1201, MIDI is processed and sent to Pd:
MIDI in Pure Data
Note Messages:MIDI Output
Send MIDI from Pd back to the DAW:Multi-Timbral Setup
DAW MIDI can address 16 channels per device:Sample Rate Handling
Sample Rate Adaptation
FromPluginProcessor.cpp:699-759, plugdata adapts to DAW sample rate:
- 44.1 kHz (CD quality)
- 48 kHz (standard digital)
- 88.2 kHz (2x oversample of 44.1)
- 96 kHz (2x oversample of 48)
- 176.4 kHz (4x oversample of 44.1)
- 192 kHz (4x oversample of 48)
- Any DAW-specified rate
Sample Rate in Pd
Access current sample rate:Buffer Size Handling
Block Size Adaptation
Pure Data processes in fixed 64-sample blocks, but DAWs use variable buffer sizes. FromPluginProcessor.cpp:724-758:
Processing Modes
Constant Block Size (optimized):- DAW buffer is multiple of 64 samples
- Direct processing without buffering
- Lower latency
- Used in standalone mode when possible
- DAW buffer is arbitrary size
- FIFO buffering required
- Slightly higher latency
- Always used in plugin mode
PluginProcessor.cpp:941-989:
Latency Compensation
FromPluginProcessor.cpp:192:
- Delaying other tracks
- Adjusting playback timing
- Maintaining phase alignment
Session Management
State Saving
FromPluginProcessor.cpp:1224-1308, complete state is saved:
- Complete patch content (embedded)
- Parameter values
- Oversampling settings
- Editor size and position
- Connection paths (segmented)
- Custom state data
- Plugin version
State Loading
State is restored when DAW project opens:Performance Optimization
CPU Load Management
FromPluginProcessor.cpp:744:
Audio Thread Safety
FromPluginProcessor.cpp:825-938, processing is thread-safe:
Best Practices
Optimizing for DAW Use
Minimize CPU Usage:- Use efficient algorithms
- Disable unused signal paths
- Consider oversampling cost
- Monitor CPU meter
- MIDI is processed per-block (64 samples)
- For tighter timing, reduce DAW buffer size
- Consider MIDI->audio jitter in timing-critical applications
Testing in DAW
- Test automation recording and playback
- Verify tempo sync at different BPMs
- Check MIDI routing and channel handling
- Test state recall (save/load project)
- Monitor CPU usage under load
- Test multiple instances for efficiency
- Verify latency compensation with other tracks
Troubleshooting
Common Issues
No Sound- Check DAW routing to plugin
- Verify
[dac~]connections in patch - Check output channel configuration
- Ensure DSP is enabled (should be automatic)
- Verify parameter receivers:
[r param1] - Check DAW automation is enabled
- Test with simple patch first
- Look for parameter conflicts
- Check receivers:
[r __playhead ...] - Test with simple tempo display
- Verify DAW is sending transport
- Check if transport is playing
- Disable oversampling if not needed
- Optimize Pd patch efficiency
- Check for unnecessary computations
- Use
[block~]for lower rates where possible
- Verify MIDI track routes to plugin
- Check MIDI channel filtering
- Test with
[notein]+[print] - Ensure DAW MIDI output is enabled
Next Steps
Plugin vs Standalone
Understand the differences between operating modes
Patching Basics
Master Pure Data patching fundamentals
