Compilation and Integration with HVCC Compiler
plugdata provides the additional functionality to compile your patches for various targets. The supported targets include:
- C++ Code: Generates C/C++ source code for use in other DSP projects.
- Electro-Smith Daisy: Compiles and flashes code onto a Daisy microcontroller board.
- DPF Audio Plugin: Creates an audio plugin for use in various plugin hosts.
- Pd External: Compiles your patch into a Pure Data external object, optimizing its performance.
WARNING: Ensure that the destination path for exporting code or plugin binaries does not contain any spaces.
In the main plugdata menu, you'll find a toggle box labeled Compiled Mode. This mode checks your patch for compliance with plugdata compilation tools. It uses the Heavy hvcc compiler, which is limited to a subset of Pure Data Vanilla objects.
Compiled Mode identifies unsupported objects in your patch, posting a message to the console and providing auto-completion only for compatible objects.
By downloading the compilation toolchain, the Heavy hvcc compiler maintained by Wasted Audio will be installed, along with additional compilation utilities. hvcc can only generate code for a portion of the objects included with plugdata, which are a subset of the Pure Data Vanilla set of objects.
Compiled Mode indicates if there are objects in your patch that cannot be used in a compiled patch by posting a message to the console, and outlining the object in question. The auto-completion in plugdata will also only provide compatible objects when this mode is activated.
Object error indication when using an unsupported object in Compilation Mode
Console error warning when using an unsupported object in Compilation Mode
Compiling in plugdata
Compile... opens a window with compilation options for different modes, each with common and mode-specific configurations.
Common fields in this section include:
- Patch to export: Choose the patch you wish to export.
- Project Name (Optional): Autofills with the patch's name.
- Project Copyright (Optional): Specify under one of the common source licenses.
In C++ Code mode, your plugdata patch is transpiled to generic C/C++ code. Adapt the raw code for specific applications. Learn more in the official documentation.
Daisy mode allows running your patch on an embedded hardware device based on an STM32 microcontroller. Options include choosing a target board, export types (Source Code, Binary, Flash), enabling USB MIDI, and configuring patch size.
DPF Audio Plugin
DPF mode exports self-contained versions of your patch in various formats (VST2, VST3, LV2, CLAP, JACK). Choose export type (Source Code, Binary) and plugin type (Effect, Instrument, Custom). Select plugin formats in the provided list.
Export your patch as a Pd external for optimized performance. Choose export type (Binary or Source Code) and enable copying to the externals path.
Refer to the official documentation for more details on each export option.