|
Dusk Audio Framework
|
C Macros that describe your plugin. (defined in the "DafPluginInfo.h" file)
With these macros you can tell the host what features your plugin requires.
Depending on which macros you enable, new functions will be available to call and/or override.
All values are either integer or strings.
For boolean-like values 1 means 'on' and 0 means 'off'.
The values defined in this group are for documentation purposes only.
All macros are disabled by default.
Only 4 macros are required, they are:
Additionally, DAF_PLUGIN_CLAP_ID is required if building CLAP plugins.
| #define DAF_PLUGIN_NAME "Plugin Name" |
The plugin name.
This is used to identify your plugin before a Plugin instance can be created.
| #define DAF_PLUGIN_NUM_INPUTS 2 |
Number of audio inputs the plugin has.
| #define DAF_PLUGIN_NUM_OUTPUTS 2 |
Number of audio outputs the plugin has.
| #define DAF_PLUGIN_URI "urn:daf:name" |
The plugin URI when exporting in LV2 format.
| #define DAF_PLUGIN_HAS_UI 1 |
Whether the plugin has a custom UI.
| #define DAF_PLUGIN_IS_RT_SAFE 1 |
Whether the plugin processing is realtime-safe.
TODO - list rtsafe requirements
| #define DAF_PLUGIN_IS_SYNTH 1 |
Whether the plugin is a synth.
DAF_PLUGIN_WANT_MIDI_INPUT is automatically enabled when this is too.
| #define DAF_PLUGIN_MINIMUM_BUFFER_SIZE 2048 |
Request the minimum buffer size for the input and output event ports.
Currently only used in LV2, with a default value of 2048 if unset.
| #define DAF_PLUGIN_USES_MODGUI 0 |
Whether the plugin has an LV2 modgui.
This will simply add a "rdfs:seeAlso <modgui.ttl>" on the LV2 manifest.
It is up to you to create this file.
| #define DAF_PLUGIN_WANT_DIRECT_ACCESS 0 |
Enable direct access between the UI and plugin code.
| #define DAF_PLUGIN_WANT_LATENCY 1 |
Whether the plugin introduces latency during audio or midi processing.
| #define DAF_PLUGIN_WANT_TAIL 1 |
Whether the plugin keeps producing output after its input goes silent (reverbs, delays, anything with a decay). The tail is reported to VST3, AU and CLAP hosts.
| #define DAF_PLUGIN_WANT_MIDI_AS_MPE 0 |
Whether the plugin wants MPE for MIDI input and/or output.
| #define DAF_PLUGIN_WANT_MIDI_INPUT 1 |
Whether the plugin wants MIDI input.
This is automatically enabled if DAF_PLUGIN_IS_SYNTH is true.
| #define DAF_PLUGIN_WANT_MIDI_OUTPUT 1 |
Whether the plugin wants MIDI output.
| #define DAF_PLUGIN_WANT_PARAMETER_VALUE_CHANGE_REQUEST 1 |
Whether the plugin wants to change its own parameter inputs.
Not all hosts or plugin formats support this, so Plugin::canRequestParameterValueChanges() can be used to query support at runtime.
| #define DAF_PLUGIN_WANT_PROGRAMS 1 |
Whether the plugin provides its own internal programs.
| #define DAF_PLUGIN_WANT_STATE 1 |
Whether the plugin uses internal non-parameter data.
| #define DAF_PLUGIN_WANT_FULL_STATE 1 |
Whether the plugin implements the full state API. When this macro is enabled, the plugin must implement a new getState(const char* key) function, which the host calls when saving its session/project. This is useful for plugins that have custom internal values not exposed to the host as key-value state pairs or parameters. Most simple effects and synths will not need this.
| #define DAF_PLUGIN_WANT_TIMEPOS 1 |
Whether the plugin wants time position information from the host.
| #define DAF_UI_USE_CAIRO 1 |
Whether the UI uses Cairo for drawing instead of the default OpenGL mode.
When enabled your UI instance will subclass CairoTopLevelWidget instead of TopLevelWidget.
| #define DAF_UI_USE_CUSTOM 1 |
Whether the UI uses a custom toolkit implementation based on OpenGL.
When enabled, the macros DAF_UI_CUSTOM_INCLUDE_PATH and DAF_UI_CUSTOM_WIDGET_TYPE are required.
| #define DAF_UI_CUSTOM_INCLUDE_PATH |
The include path to the header file used by the custom toolkit implementation. This path must be relative to dpf/daf/DafUI.hpp
| #define DAF_UI_USE_NANOVG 1 |
Whether the UI uses NanoVG for drawing instead of the default raw OpenGL mode.
When enabled your UI instance will subclass NanoTopLevelWidget instead of TopLevelWidget.
| #define DAF_UI_CUSTOM_WIDGET_TYPE |
The top-level-widget typedef to use for the custom toolkit. This widget class MUST be a subclass of DGL TopLevelWindow class. It is recommended that you keep this widget class inside the DGL namespace, and define widget type as e.g. DGL_NAMESPACE::MyCustomTopLevelWidget.
| #define DAF_UI_DEFAULT_WIDTH 300 |
Default UI width to use when creating initial and temporary windows.
Setting this macro allows to skip a temporary UI from being created in certain VST2 and VST3 hosts. (which would normally be done for knowing the UI size before host creates a window for it)
Value must match 1x scale factor.
When this macro is defined, the companion DAF_UI_DEFAULT_HEIGHT macro must be defined as well.
| #define DAF_UI_DEFAULT_HEIGHT 300 |
Default UI height to use when creating initial and temporary windows.
Setting this macro allows to skip a temporary UI from being created in certain VST2 and VST3 hosts. (which would normally be done for knowing the UI size before host creates a window for it)
Value must match 1x scale factor.
When this macro is defined, the companion DAF_UI_DEFAULT_WIDTH macro must be defined as well.
| #define DAF_UI_USER_RESIZABLE 1 |
Whether the UI is resizable to any size by the user and OS.
By default this is false, with resizing only allowed when coded from the the plugin UI side.
Enabling this options makes it possible for the user to resize the plugin UI at anytime.
| #define DAF_UI_FILE_BROWSER 1 |
Whether to UI is going to use file browser dialogs.
By default this is false, with the file browser APIs not available for use.
| #define DAF_UI_WEB_VIEW 1 |
Whether to UI is going to use web browser views.
By default this is false, with the web browser APIs not available for use.
| #define DAF_UI_URI DAF_PLUGIN_URI "#UI" |
The UI URI when exporting in LV2 format.
By default this is set to DAF_PLUGIN_URI with "#UI" as suffix.
| #define DAF_PLUGIN_AU_TYPE aufx |
The AudioUnit type for a plugin.
This is a 4-character symbol, automatically set by DAF based on other plugin macros. See https://developer.apple.com/documentation/audiotoolbox/1584142-audio_unit_types for more information.
| #define DAF_PLUGIN_BRAND_ID Dstr |
A 4-character symbol that identifies a brand or manufacturer, with at least one non-lower case character.
Plugins from the same brand should use the same symbol.
| #define DAF_PLUGIN_UNIQUE_ID test |
A 4-character symbol which identifies a plugin.
It must be unique within at least a set of plugins from the brand.
| #define DAF_PLUGIN_LV2_CATEGORY "lv2:Plugin" |
Custom LV2 category for the plugin.
This is a single string, and can be one of the following values:
See http://lv2plug.in/ns/lv2core for more information.
| #define DAF_PLUGIN_VST3_CATEGORIES "Fx|Stereo" |
Custom VST3 categories for the plugin.
This is a single concatenated string of categories, separated by a |.
Each effect category can be one of the following values:
Each instrument category can be one of the following values:
And extra categories possible for any plugin type:
| #define DAF_PLUGIN_CLAP_FEATURES "audio-effect", "stereo" |
Custom CLAP features for the plugin.
This is a list of features defined as a string array body, without the terminating , or nullptr.
A top-level category can be set as feature and be one of the following values:
The following sub-categories can also be set:
And finally the following audio capabilities can be set:
| #define DAF_PLUGIN_CLAP_ID "studio.kx.daf.effect" |
The plugin id when exporting in CLAP format, in reverse URI form.
| #define DAF_PLUGIN_ABBREVIATION "DFX" |
Plugin name abbreviation consisting of 2 or 3 characters in uppercase.
| #define DAF_PLUGIN_ANAGRAM_BLOCK_IMAGE_OFF "anagram-block-off.png" |
Path to a in-bundle/local 200x200 PNG image file to be used as the plugin's block image asset when OFF.
| #define DAF_PLUGIN_ANAGRAM_BLOCK_IMAGE_ON "anagram-block-on.png" |
Path to a in-bundle/local 200x200 PNG image file to be used as the plugin's block image asset when ON.