DPF

DISTRHO Plugin Framework
Log | Files | Refs | Submodules | README | LICENSE

DistrhoPluginInfo.h (5286B)


      1 /*
      2  * DISTRHO Plugin Framework (DPF)
      3  * Copyright (C) 2012-2024 Filipe Coelho <falktx@falktx.com>
      4  *
      5  * Permission to use, copy, modify, and/or distribute this software for any purpose with
      6  * or without fee is hereby granted, provided that the above copyright notice and this
      7  * permission notice appear in all copies.
      8  *
      9  * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD
     10  * TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN
     11  * NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
     12  * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER
     13  * IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN
     14  * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
     15  */
     16 
     17 /**
     18    The plugin name.@n
     19    This is used to identify your plugin before a Plugin instance can be created.
     20    @note This macro is required.
     21  */
     22 #define DISTRHO_PLUGIN_NAME "CairoUI"
     23 
     24 /**
     25    Number of audio inputs the plugin has.
     26    @note This macro is required.
     27  */
     28 #define DISTRHO_PLUGIN_NUM_INPUTS 1
     29 
     30 /**
     31    Number of audio outputs the plugin has.
     32    @note This macro is required.
     33  */
     34 #define DISTRHO_PLUGIN_NUM_OUTPUTS 1
     35 
     36 /**
     37    The plugin URI when exporting in LV2 format.
     38    @note This macro is required.
     39  */
     40 #define DISTRHO_PLUGIN_URI "http://distrho.sf.net/examples/CairoUI"
     41 
     42 /**
     43    The AudioUnit manufacturer for a plugin.
     44    This is a 4-character symbol with at least one non-lower case character.
     45    Plugins from the same brand/maker should use the same symbol.
     46    @note This macro is required when building AU plugins
     47  */
     48 #define DISTRHO_PLUGIN_BRAND_ID Dstr
     49 
     50 /**
     51    The AudioUnit subtype for a plugin.
     52    This is a 4-character symbol which identifies a plugin.
     53    It must be unique within a manufacturer's plugins, but different manufacturers can use the same subtype.
     54    @note This macro is required when building AU plugins
     55  */
     56 #define DISTRHO_PLUGIN_UNIQUE_ID dCai
     57 
     58 /**
     59    The plugin id when exporting in CLAP format, in reverse URI form.
     60    @note This macro is required when building CLAP plugins
     61 */
     62 #define DISTRHO_PLUGIN_CLAP_ID "studio.kx.distrho.examples.cairo-ui"
     63 
     64 /**
     65    Wherever the plugin has a custom %UI.
     66    @see DISTRHO_UI_USE_NANOVG
     67    @see UI
     68  */
     69 #define DISTRHO_PLUGIN_HAS_UI 1
     70 
     71 /**
     72    Wherever the plugin processing is realtime-safe.@n
     73    TODO - list rtsafe requirements
     74  */
     75 #define DISTRHO_PLUGIN_IS_RT_SAFE 1
     76 
     77 /**
     78    Wherever the plugin is a synth.@n
     79    @ref DISTRHO_PLUGIN_WANT_MIDI_INPUT is automatically enabled when this is too.
     80    @see DISTRHO_PLUGIN_WANT_MIDI_INPUT
     81  */
     82 #define DISTRHO_PLUGIN_IS_SYNTH 0
     83 
     84 /**
     85    Enable direct access between the %UI and plugin code.
     86    @see UI::getPluginInstancePointer()
     87    @note DO NOT USE THIS UNLESS STRICTLY NECESSARY!!
     88          Try to avoid it at all costs!
     89  */
     90 #define DISTRHO_PLUGIN_WANT_DIRECT_ACCESS 0
     91 
     92 /**
     93    Wherever the plugin introduces latency during audio or midi processing.
     94    @see Plugin::setLatency(uint32_t)
     95  */
     96 #define DISTRHO_PLUGIN_WANT_LATENCY 0
     97 
     98 /**
     99    Wherever the plugin wants MIDI input.@n
    100    This is automatically enabled if @ref DISTRHO_PLUGIN_IS_SYNTH is true.
    101  */
    102 #define DISTRHO_PLUGIN_WANT_MIDI_INPUT 0
    103 
    104 /**
    105    Wherever the plugin wants MIDI output.
    106    @see Plugin::writeMidiEvent(const MidiEvent&)
    107  */
    108 #define DISTRHO_PLUGIN_WANT_MIDI_OUTPUT 0
    109 
    110 /**
    111    Wherever the plugin provides its own internal programs.
    112    @see Plugin::initProgramName(uint32_t, String&)
    113    @see Plugin::loadProgram(uint32_t)
    114  */
    115 #define DISTRHO_PLUGIN_WANT_PROGRAMS 0
    116 
    117 /**
    118    Wherever the plugin uses internal non-parameter data.
    119    @see Plugin::initState(uint32_t, String&, String&)
    120    @see Plugin::setState(const char*, const char*)
    121  */
    122 #define DISTRHO_PLUGIN_WANT_STATE 0
    123 
    124 /**
    125    Wherever the plugin wants time position information from the host.
    126    @see Plugin::getTimePosition()
    127  */
    128 #define DISTRHO_PLUGIN_WANT_TIMEPOS 0
    129 
    130 /**
    131    Wherever the %UI uses NanoVG for drawing instead of the default raw OpenGL calls.@n
    132    When enabled your %UI instance will subclass @ref NanoWidget instead of @ref Widget.
    133  */
    134 #define DISTRHO_UI_USE_NANOVG 0
    135 
    136 /**
    137    Default UI width to use when creating initial and temporary windows.@n
    138    Setting this macro allows to skip a temporary UI from being created in certain VST2 and VST3 hosts.
    139    (which would normally be done for knowing the UI size before host creates a window for it)
    140 
    141    Value must match 1x scale factor.
    142 
    143    When this macro is defined, the companion DISTRHO_UI_DEFAULT_HEIGHT macro must be defined as well.
    144  */
    145 #define DISTRHO_UI_DEFAULT_WIDTH 200
    146 
    147 /**
    148    Default UI height to use when creating initial and temporary windows.@n
    149    Setting this macro allows to skip a temporary UI from being created in certain VST2 and VST3 hosts.
    150    (which would normally be done for knowing the UI size before host creates a window for it)
    151 
    152    Value must match 1x scale factor.
    153 
    154    When this macro is defined, the companion DISTRHO_UI_DEFAULT_WIDTH macro must be defined as well.
    155  */
    156 #define DISTRHO_UI_DEFAULT_HEIGHT 200
    157 
    158 // TODO document this
    159 #define DISTRHO_UI_USE_CAIRO 1
    160 
    161 // TODO document this
    162 #define DISTRHO_UI_FILE_BROWSER 0
    163 
    164 enum Parameters {
    165    kParameterKnob,
    166    kParameterTriState,
    167    kParameterButton,
    168    kParameterCount
    169 };