97 changes: 91 additions & 6 deletions dpf/dgl/src/NanoVG.cpp
Expand Up @@ -327,6 +327,14 @@ NanoVG::NanoVG(int flags)
DISTRHO_CUSTOM_SAFE_ASSERT("Failed to create NanoVG context, expect a black screen", fContext != nullptr);
}

NanoVG::NanoVG(NVGcontext* const context)
: fContext(context),
fInFrame(false),
fIsSubWidget(true)
{
DISTRHO_CUSTOM_SAFE_ASSERT("Failed to create NanoVG context, expect a black screen", fContext != nullptr);
}

NanoVG::~NanoVG()
{
DISTRHO_CUSTOM_SAFE_ASSERT("Destroying NanoVG context with still active frame", ! fInFrame);
Expand Down Expand Up @@ -1057,17 +1065,73 @@ bool NanoVG::loadSharedResources()
}
#endif

// -----------------------------------------------------------------------

template <class BaseWidget>
void NanoBaseWidget<BaseWidget>::displayChildren()
{
std::list<SubWidget*> children(BaseWidget::getChildren());

for (std::list<SubWidget*>::iterator it = children.begin(); it != children.end(); ++it)
{
if (NanoSubWidget* const subwidget = dynamic_cast<NanoSubWidget*>(*it))
{
if (subwidget->fUsingParentContext && subwidget->isVisible())
subwidget->onDisplay();
}
}
}

// -----------------------------------------------------------------------
// NanoSubWidget

template <>
NanoBaseWidget<SubWidget>::NanoBaseWidget(Widget* const parent, int flags)
: SubWidget(parent),
NanoVG(flags)
NanoBaseWidget<SubWidget>::NanoBaseWidget(Widget* const parentWidget, int flags)
: SubWidget(parentWidget),
NanoVG(flags),
fUsingParentContext(false)
{
setNeedsViewportScaling();
}

template <>
NanoBaseWidget<SubWidget>::NanoBaseWidget(NanoSubWidget* const parentWidget)
: SubWidget(parentWidget),
NanoVG(parentWidget->getContext()),
fUsingParentContext(true)
{
setSkipDrawing();
}

template <>
NanoBaseWidget<SubWidget>::NanoBaseWidget(NanoTopLevelWidget* const parentWidget)
: SubWidget(parentWidget),
NanoVG(parentWidget->getContext()),
fUsingParentContext(true)
{
setSkipDrawing();
}

template <>
inline void NanoBaseWidget<SubWidget>::onDisplay()
{
if (fUsingParentContext)
{
NanoVG::save();
translate(SubWidget::getAbsoluteX(), SubWidget::getAbsoluteY());
onNanoDisplay();
NanoVG::restore();
displayChildren();
}
else
{
NanoVG::beginFrame(SubWidget::getWidth(), SubWidget::getHeight());
onNanoDisplay();
displayChildren();
NanoVG::endFrame();
}
}

template class NanoBaseWidget<SubWidget>;

// -----------------------------------------------------------------------
Expand All @@ -1076,7 +1140,17 @@ template class NanoBaseWidget<SubWidget>;
template <>
NanoBaseWidget<TopLevelWidget>::NanoBaseWidget(Window& windowToMapTo, int flags)
: TopLevelWidget(windowToMapTo),
NanoVG(flags) {}
NanoVG(flags),
fUsingParentContext(false) {}

template <>
inline void NanoBaseWidget<TopLevelWidget>::onDisplay()
{
NanoVG::beginFrame(TopLevelWidget::getWidth(), TopLevelWidget::getHeight());
onNanoDisplay();
displayChildren();
NanoVG::endFrame();
}

template class NanoBaseWidget<TopLevelWidget>;

Expand All @@ -1086,12 +1160,23 @@ template class NanoBaseWidget<TopLevelWidget>;
template <>
NanoBaseWidget<StandaloneWindow>::NanoBaseWidget(Application& app, int flags)
: StandaloneWindow(app),
NanoVG(flags) {}
NanoVG(flags),
fUsingParentContext(false) {}

template <>
NanoBaseWidget<StandaloneWindow>::NanoBaseWidget(Application& app, Window& parentWindow, int flags)
: StandaloneWindow(app, parentWindow),
NanoVG(flags) {}
NanoVG(flags),
fUsingParentContext(false) {}

template <>
inline void NanoBaseWidget<StandaloneWindow>::onDisplay()
{
NanoVG::beginFrame(Window::getWidth(), Window::getHeight());
onNanoDisplay();
displayChildren();
NanoVG::endFrame();
}

template class NanoBaseWidget<StandaloneWindow>;

Expand Down
4 changes: 2 additions & 2 deletions dpf/dgl/src/WindowPrivateData.cpp
Expand Up @@ -184,7 +184,7 @@ Window::PrivateData::PrivateData(Application& a, Window* const s,
Window::PrivateData::PrivateData(Application& a, Window* const s,
const uintptr_t parentWindowHandle,
const uint width, const uint height,
const double scale, const bool resizable, const bool isVST3)
const double scale, const bool resizable, const bool usesSizeRequest_)
: app(a),
appData(a.pData),
self(s),
Expand All @@ -193,7 +193,7 @@ Window::PrivateData::PrivateData(Application& a, Window* const s,
isClosed(parentWindowHandle == 0),
isVisible(parentWindowHandle != 0 && view != nullptr),
isEmbed(parentWindowHandle != 0),
usesSizeRequest(isVST3),
usesSizeRequest(usesSizeRequest_),
scaleFactor(scale != 0.0 ? scale : getScaleFactorFromParent(view)),
autoScaling(false),
autoScaleFactor(1.0),
Expand Down
39 changes: 21 additions & 18 deletions dpf/distrho/DistrhoInfo.hpp
Expand Up @@ -31,7 +31,7 @@ START_NAMESPACE_DISTRHO
It allows developers to create plugins with custom UIs using a simple C++ API.@n
The framework facilitates exporting various different plugin formats from the same code-base.
DPF can build for LADSPA, DSSI, LV2, VST2 and VST3 formats.@n
DPF can build for LADSPA, DSSI, LV2, VST2, VST3 and CLAP formats.@n
A JACK/Standalone mode is also available, allowing you to quickly test plugins.
@section Macros
Expand Down Expand Up @@ -341,11 +341,11 @@ START_NAMESPACE_DISTRHO

switch (index)
{
case 0;
case 0:
parameter.name = "Gain Right";
parameter.symbol = "gainR";
break;
case 1;
case 1:
parameter.name = "Gain Left";
parameter.symbol = "gainL";
break;
Expand Down Expand Up @@ -373,12 +373,12 @@ START_NAMESPACE_DISTRHO
{
switch (index)
{
case 0;
case 0:
return fGainL;
case 1;
case 1:
return fGainR;
default:
return 0.f;
default:
return 0.f;
}
}

Expand All @@ -389,10 +389,10 @@ START_NAMESPACE_DISTRHO
{
switch (index)
{
case 0;
case 0:
fGainL = value;
break;
case 1;
case 1:
fGainR = value;
break;
}
Expand Down Expand Up @@ -475,6 +475,8 @@ START_NAMESPACE_DISTRHO
- @ref DISTRHO_PLUGIN_NUM_INPUTS
- @ref DISTRHO_PLUGIN_NUM_OUTPUTS
- @ref DISTRHO_PLUGIN_URI
Additionally, @ref DISTRHO_PLUGIN_CLAP_ID is required if building CLAP plugins.
@{
*/

Expand Down Expand Up @@ -628,6 +630,8 @@ START_NAMESPACE_DISTRHO
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 DISTRHO_UI_DEFAULT_HEIGHT macro must be defined as well.
*/
#define DISTRHO_UI_DEFAULT_WIDTH 300
Expand All @@ -637,6 +641,8 @@ START_NAMESPACE_DISTRHO
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 DISTRHO_UI_DEFAULT_WIDTH macro must be defined as well.
*/
#define DISTRHO_UI_DEFAULT_HEIGHT 300
Expand Down Expand Up @@ -810,6 +816,12 @@ START_NAMESPACE_DISTRHO
*/
#define DISTRHO_PLUGIN_CLAP_FEATURES "audio-effect", "stereo"

/**
The plugin id when exporting in CLAP format, in reverse URI form.
@note This macro is required when building CLAP plugins
*/
#define DISTRHO_PLUGIN_CLAP_ID "studio.kx.distrho.effect"

/** @} */

/* ------------------------------------------------------------------------------------------------------------
Expand Down Expand Up @@ -864,15 +876,6 @@ START_NAMESPACE_DISTRHO
*/
#define DGL_USE_OPENGL3

/**
Whether to use the GPLv2+ vestige header instead of the official Steinberg VST2 SDK.@n
This is a boolean, and enabled (set to 1) by default.@n
Set this to 0 in order to create non-GPL binaries.
(but then at your own discretion in regards to Steinberg licensing)@n
When set to 0, DPF will import the VST2 definitions from `"vst/aeffectx.h"` (not shipped with DPF).
*/
#define VESTIGE_HEADER 1

/** @} */

/* ------------------------------------------------------------------------------------------------------------
Expand Down
3 changes: 3 additions & 0 deletions dpf/distrho/DistrhoUI.hpp
Expand Up @@ -51,6 +51,9 @@ typedef DGL_NAMESPACE::TopLevelWidget UIWidget;
#if DISTRHO_UI_FILE_BROWSER
# include "extra/FileBrowserDialog.hpp"
#endif
#if !DISTRHO_PLUGIN_HAS_EXTERNAL_UI
# include <vector>
#endif

START_NAMESPACE_DISTRHO

Expand Down
2 changes: 1 addition & 1 deletion dpf/distrho/src/DistrhoPlugin.cpp
Expand Up @@ -125,7 +125,7 @@ const TimePosition& Plugin::getTimePosition() const noexcept
#endif

#if DISTRHO_PLUGIN_WANT_LATENCY
void Plugin::setLatency(uint32_t frames) noexcept
void Plugin::setLatency(const uint32_t frames) noexcept
{
pData->latency = frames;
}
Expand Down
1,510 changes: 1,330 additions & 180 deletions dpf/distrho/src/DistrhoPluginCLAP.cpp

Large diffs are not rendered by default.

27 changes: 26 additions & 1 deletion dpf/distrho/src/DistrhoPluginJACK.cpp
Expand Up @@ -49,6 +49,10 @@
# include <unistd.h>
#endif

#ifdef __SSE2_MATH__
# include <xmmintrin.h>
#endif

#ifndef JACK_METADATA_ORDER
# define JACK_METADATA_ORDER "http://jackaudio.org/metadata/order"
#endif
Expand Down Expand Up @@ -216,6 +220,7 @@ class PluginJack
#endif
}

jackbridge_set_thread_init_callback(fClient, jackThreadInitCallback, this);
jackbridge_set_buffer_size_callback(fClient, jackBufferSizeCallback, this);
jackbridge_set_sample_rate_callback(fClient, jackSampleRateCallback, this);
jackbridge_set_process_callback(fClient, jackProcessCallback, this);
Expand Down Expand Up @@ -687,6 +692,26 @@ class PluginJack

#define thisPtr ((PluginJack*)ptr)

static void jackThreadInitCallback(void*)
{
#if defined(__SSE2_MATH__)
_mm_setcsr(_mm_getcsr() | 0x8040);
#elif defined(__aarch64__)
uint64_t c;
__asm__ __volatile__("mrs %0, fpcr \n"
"orr %0, %0, #0x1000000\n"
"msr fpcr, %0 \n"
"isb \n"
: "=r"(c) :: "memory");
#elif defined(__arm__)
uint32_t c;
__asm__ __volatile__("vmrs %0, fpscr \n"
"orr %0, %0, #0x1000000\n"
"vmsr fpscr, %0 \n"
: "=r"(c) :: "memory");
#endif
}

static int jackBufferSizeCallback(jack_nframes_t nframes, void* ptr)
{
thisPtr->jackBufferSize(nframes);
Expand Down Expand Up @@ -841,7 +866,7 @@ bool runSelfTests()
plugin.setSampleRate(48000);
plugin.activate();

float buffer[128];
float buffer[128] = {};
const float* inputs[DISTRHO_PLUGIN_NUM_INPUTS > 0 ? DISTRHO_PLUGIN_NUM_INPUTS : 1];
float* outputs[DISTRHO_PLUGIN_NUM_OUTPUTS > 0 ? DISTRHO_PLUGIN_NUM_OUTPUTS : 1];
for (int i=0; i<DISTRHO_PLUGIN_NUM_INPUTS; ++i)
Expand Down
596 changes: 330 additions & 266 deletions dpf/distrho/src/DistrhoPluginVST2.cpp

Large diffs are not rendered by default.

50 changes: 38 additions & 12 deletions dpf/distrho/src/DistrhoUI.cpp
Expand Up @@ -174,28 +174,44 @@ ExternalWindow::PrivateData
#else
PluginWindow&
#endif
UI::PrivateData::createNextWindow(UI* const ui, const uint width, const uint height)
UI::PrivateData::createNextWindow(UI* const ui, uint width, uint height, const bool adjustForScaleFactor)
{
UI::PrivateData* const pData = s_nextPrivateData;
#if DISTRHO_PLUGIN_HAS_EXTERNAL_UI
#if DISTRHO_PLUGIN_HAS_EXTERNAL_UI
const double scaleFactor = d_isNotZero(pData->scaleFactor) ? pData->scaleFactor : getDesktopScaleFactor(pData->winId);

if (adjustForScaleFactor && d_isNotZero(scaleFactor) && d_isNotEqual(scaleFactor, 1.0))
{
width *= scaleFactor;
height *= scaleFactor;
}

pData->window = new PluginWindow(ui, pData->app);
ExternalWindow::PrivateData ewData;
ewData.parentWindowHandle = pData->winId;
ewData.width = width;
ewData.height = height;
ewData.scaleFactor = pData->scaleFactor != 0.0 ? pData->scaleFactor : getDesktopScaleFactor(pData->winId);
ewData.scaleFactor = scaleFactor;
ewData.title = DISTRHO_PLUGIN_NAME;
ewData.isStandalone = DISTRHO_UI_IS_STANDALONE;
return ewData;
#else
pData->window = new PluginWindow(ui, pData->app, pData->winId, width, height, pData->scaleFactor);
#else
const double scaleFactor = pData->scaleFactor;

if (adjustForScaleFactor && d_isNotZero(scaleFactor) && d_isNotEqual(scaleFactor, 1.0))
{
width *= scaleFactor;
height *= scaleFactor;
}

pData->window = new PluginWindow(ui, pData->app, pData->winId, width, height, scaleFactor);

// If there are no callbacks, this is most likely a temporary window, so ignore idle callbacks
if (pData->callbacksPtr == nullptr)
pData->window->setIgnoreIdleCallbacks();

return pData->window.getObject();
#endif
#endif
}

/* ------------------------------------------------------------------------------------------------------------
Expand All @@ -207,22 +223,32 @@ UI::UI(const uint width, const uint height, const bool automaticallyScaleAndSetA
width == 0 ? DISTRHO_UI_DEFAULT_WIDTH :
#endif
width,
#ifdef DISTRHO_UI_DEFAULT_HEIGHT
height == 0 ? DISTRHO_UI_DEFAULT_HEIGHT :
#endif
height,
#ifdef DISTRHO_UI_DEFAULT_WIDTH
height == 0 ? DISTRHO_UI_DEFAULT_WIDTH :
width == 0
#else
false
#endif
height)),
)),
uiData(UI::PrivateData::s_nextPrivateData)
{
#if !DISTRHO_PLUGIN_HAS_EXTERNAL_UI
if (width != 0 && height != 0)
{
#ifndef DISTRHO_UI_DEFAULT_WIDTH
Widget::setSize(width, height);
#endif

if (automaticallyScaleAndSetAsMinimumSize)
setGeometryConstraints(width, height, true, true, true);
}
#ifdef DISTRHO_UI_DEFAULT_WIDTH
else
{
Widget::setSize(DISTRHO_UI_DEFAULT_WIDTH, DISTRHO_UI_DEFAULT_HEIGHT);
}
#endif
#else
// unused
(void)automaticallyScaleAndSetAsMinimumSize;
Expand Down Expand Up @@ -405,14 +431,14 @@ void UI::onResize(const ResizeEvent& ev)
{
UIWidget::onResize(ev);

#ifndef DISTRHO_PLUGIN_TARGET_VST3
#if !(defined(DISTRHO_PLUGIN_TARGET_VST3) || defined(DISTRHO_PLUGIN_TARGET_CLAP))
if (uiData->initializing)
return;

const uint width = ev.size.getWidth();
const uint height = ev.size.getHeight();
uiData->setSizeCallback(width, height);
#endif
#endif
}

// NOTE: only used for VST3 and CLAP
Expand Down
18 changes: 9 additions & 9 deletions dpf/distrho/src/DistrhoUIInternal.hpp
Expand Up @@ -193,16 +193,16 @@ class UIExporter
ui->parameterChanged(index, value);
}

#if DISTRHO_PLUGIN_WANT_PROGRAMS
#if DISTRHO_PLUGIN_WANT_PROGRAMS
void programLoaded(const uint32_t index)
{
DISTRHO_SAFE_ASSERT_RETURN(ui != nullptr,);

ui->programLoaded(index);
}
#endif
#endif

#if DISTRHO_PLUGIN_WANT_STATE
#if DISTRHO_PLUGIN_WANT_STATE
void stateChanged(const char* const key, const char* const value)
{
DISTRHO_SAFE_ASSERT_RETURN(ui != nullptr,);
Expand All @@ -211,11 +211,11 @@ class UIExporter

ui->stateChanged(key, value);
}
#endif
#endif

// -------------------------------------------------------------------

#if DISTRHO_UI_IS_STANDALONE
#if DISTRHO_UI_IS_STANDALONE
void exec(DGL_NAMESPACE::IdleCallback* const cb)
{
DISTRHO_SAFE_ASSERT_RETURN(cb != nullptr,);
Expand All @@ -238,7 +238,7 @@ class UIExporter
uiData->window->show();
uiData->window->focus();
}
#endif
#endif

bool plugin_idle()
{
Expand All @@ -263,7 +263,7 @@ class UIExporter
// -------------------------------------------------------------------

#if defined(DISTRHO_OS_MAC) || defined(DISTRHO_OS_WINDOWS)
void idleForVST3()
void idleFromNativeIdle()
{
DISTRHO_SAFE_ASSERT_RETURN(ui != nullptr,);

Expand All @@ -272,12 +272,12 @@ class UIExporter
}

#if !DISTRHO_PLUGIN_HAS_EXTERNAL_UI
void addIdleCallbackForVST3(IdleCallback* const cb, const uint timerFrequencyInMs)
void addIdleCallbackForNativeIdle(IdleCallback* const cb, const uint timerFrequencyInMs)
{
uiData->window->addIdleCallback(cb, timerFrequencyInMs);
}

void removeIdleCallbackForVST3(IdleCallback* const cb)
void removeIdleCallbackForNativeIdle(IdleCallback* const cb)
{
uiData->window->removeIdleCallback(cb);
}
Expand Down
20 changes: 12 additions & 8 deletions dpf/distrho/src/DistrhoUILV2.cpp
Expand Up @@ -556,7 +556,7 @@ static LV2UI_Handle lv2ui_instantiate(const LV2UI_Descriptor*,

const intptr_t winId = (intptr_t)parentId;
float sampleRate = 0.0f;
float scaleFactor = 1.0f;
float scaleFactor = 0.0f;
uint32_t bgColor = 0;
uint32_t fgColor = 0xffffffff;

Expand All @@ -567,7 +567,9 @@ static LV2UI_Handle lv2ui_instantiate(const LV2UI_Descriptor*,
const LV2_URID uridSampleRate = uridMap->map(uridMap->handle, LV2_PARAMETERS__sampleRate);
const LV2_URID uridBgColor = uridMap->map(uridMap->handle, LV2_UI__backgroundColor);
const LV2_URID uridFgColor = uridMap->map(uridMap->handle, LV2_UI__foregroundColor);
#ifndef DISTRHO_OS_MAC
const LV2_URID uridScaleFactor = uridMap->map(uridMap->handle, LV2_UI__scaleFactor);
#endif

for (int i=0; options[i].key != 0; ++i)
{
Expand All @@ -578,13 +580,6 @@ static LV2UI_Handle lv2ui_instantiate(const LV2UI_Descriptor*,
else
d_stderr("Host provides UI sample-rate but has wrong value type");
}
else if (options[i].key == uridScaleFactor)
{
if (options[i].type == uridAtomFloat)
scaleFactor = *(const float*)options[i].value;
else
d_stderr("Host provides UI scale factor but has wrong value type");
}
else if (options[i].key == uridBgColor)
{
if (options[i].type == uridAtomInt)
Expand All @@ -599,6 +594,15 @@ static LV2UI_Handle lv2ui_instantiate(const LV2UI_Descriptor*,
else
d_stderr("Host provides UI foreground color but has wrong value type");
}
#ifndef DISTRHO_OS_MAC
else if (options[i].key == uridScaleFactor)
{
if (options[i].type == uridAtomFloat)
scaleFactor = *(const float*)options[i].value;
else
d_stderr("Host provides UI scale factor but has wrong value type");
}
#endif
}
}

Expand Down
12 changes: 6 additions & 6 deletions dpf/distrho/src/DistrhoUIPrivateData.hpp
Expand Up @@ -38,10 +38,10 @@
# define DISTRHO_UI_IS_STANDALONE 0
#endif

#ifdef DISTRHO_PLUGIN_TARGET_VST3
# define DISTRHO_UI_IS_VST3 1
#if defined(DISTRHO_PLUGIN_TARGET_VST3) || defined(DISTRHO_PLUGIN_TARGET_CLAP)
# define DISTRHO_UI_USES_SIZE_REQUEST true
#else
# define DISTRHO_UI_IS_VST3 0
# define DISTRHO_UI_USES_SIZE_REQUEST false
#endif

#ifdef DISTRHO_PLUGIN_TARGET_VST2
Expand Down Expand Up @@ -183,7 +183,7 @@ class PluginWindow : public DGL_NAMESPACE::Window
const uint height,
const double scaleFactor)
: Window(app, parentWindowHandle, width, height, scaleFactor,
DISTRHO_UI_USER_RESIZABLE, DISTRHO_UI_IS_VST3, false),
DISTRHO_UI_USER_RESIZABLE, DISTRHO_UI_USES_SIZE_REQUEST, false),
ui(uiPtr),
initializing(true),
receivedReshapeDuringInit(false)
Expand Down Expand Up @@ -424,9 +424,9 @@ struct UI::PrivateData {

static UI::PrivateData* s_nextPrivateData;
#if DISTRHO_PLUGIN_HAS_EXTERNAL_UI
static ExternalWindow::PrivateData createNextWindow(UI* ui, uint width, uint height);
static ExternalWindow::PrivateData createNextWindow(UI* ui, uint width, uint height, bool adjustForScaleFactor);
#else
static PluginWindow& createNextWindow(UI* ui, uint width, uint height);
static PluginWindow& createNextWindow(UI* ui, uint width, uint height, bool adjustForScaleFactor);
#endif
};

Expand Down
6 changes: 3 additions & 3 deletions dpf/distrho/src/DistrhoUIVST3.cpp
Expand Up @@ -270,7 +270,7 @@ class NativeIdleCallback : public IdleCallback
#if DISTRHO_PLUGIN_HAS_EXTERNAL_UI
fIdleHelper.registerNativeIdleCallback();
#else
fUI.addIdleCallbackForVST3(this, DPF_VST3_TIMER_INTERVAL);
fUI.addIdleCallbackForNativeIdle(this, DPF_VST3_TIMER_INTERVAL);
#endif
}

Expand All @@ -282,7 +282,7 @@ class NativeIdleCallback : public IdleCallback
#if DISTRHO_PLUGIN_HAS_EXTERNAL_UI
fIdleHelper.unregisterNativeIdleCallback();
#else
fUI.removeIdleCallbackForVST3(this);
fUI.removeIdleCallbackForNativeIdle(this);
#endif
}

Expand Down Expand Up @@ -694,7 +694,7 @@ class UIVst3

void idleCallback() override
{
fUI.idleForVST3();
fUI.idleFromNativeIdle();
doIdleStuff();
}
#endif
Expand Down
6 changes: 3 additions & 3 deletions dpf/distrho/src/clap/entry.h
Expand Up @@ -48,16 +48,16 @@ typedef struct clap_plugin_entry {
//
// If init() returns false, then the host must not call deinit() nor any other clap
// related symbols from the DSO.
bool (*init)(const char *plugin_path);
bool(CLAP_ABI *init)(const char *plugin_path);

// No more calls into the DSO must be made after calling deinit().
void (*deinit)(void);
void(CLAP_ABI *deinit)(void);

// Get the pointer to a factory. See plugin-factory.h for an example.
//
// Returns null if the factory is not provided.
// The returned pointer must *not* be freed by the caller.
const void *(*get_factory)(const char *factory_id);
const void *(CLAP_ABI *get_factory)(const char *factory_id);
} clap_plugin_entry_t;

/* Entry point */
Expand Down
8 changes: 5 additions & 3 deletions dpf/distrho/src/clap/events.h
Expand Up @@ -263,10 +263,11 @@ typedef struct clap_event_midi2 {
typedef struct clap_input_events {
void *ctx; // reserved pointer for the list

uint32_t (*size)(const struct clap_input_events *list);
// returns the number of events in the list
uint32_t(CLAP_ABI *size)(const struct clap_input_events *list);

// Don't free the returned event, it belongs to the list
const clap_event_header_t *(*get)(const struct clap_input_events *list, uint32_t index);
const clap_event_header_t *(CLAP_ABI *get)(const struct clap_input_events *list, uint32_t index);
} clap_input_events_t;

// Output event list, events must be sorted by time.
Expand All @@ -275,7 +276,8 @@ typedef struct clap_output_events {

// Pushes a copy of the event
// returns false if the event could not be pushed to the queue (out of memory?)
bool (*try_push)(const struct clap_output_events *list, const clap_event_header_t *event);
bool(CLAP_ABI *try_push)(const struct clap_output_events *list,
const clap_event_header_t *event);
} clap_output_events_t;

#ifdef __cplusplus
Expand Down
14 changes: 7 additions & 7 deletions dpf/distrho/src/clap/ext/audio-ports.h
Expand Up @@ -69,14 +69,14 @@ typedef struct clap_audio_port_info {
typedef struct clap_plugin_audio_ports {
// number of ports, for either input or output
// [main-thread]
uint32_t (*count)(const clap_plugin_t *plugin, bool is_input);
uint32_t(CLAP_ABI *count)(const clap_plugin_t *plugin, bool is_input);

// get info about about an audio port.
// [main-thread]
bool (*get)(const clap_plugin_t *plugin,
uint32_t index,
bool is_input,
clap_audio_port_info_t *info);
bool(CLAP_ABI *get)(const clap_plugin_t *plugin,
uint32_t index,
bool is_input,
clap_audio_port_info_t *info);
} clap_plugin_audio_ports_t;

enum {
Expand All @@ -102,13 +102,13 @@ enum {
typedef struct clap_host_audio_ports {
// Checks if the host allows a plugin to change a given aspect of the audio ports definition.
// [main-thread]
bool (*is_rescan_flag_supported)(const clap_host_t *host, uint32_t flag);
bool(CLAP_ABI *is_rescan_flag_supported)(const clap_host_t *host, uint32_t flag);

// Rescan the full list of audio ports according to the flags.
// It is illegal to ask the host to rescan with a flag that is not supported.
// Certain flags require the plugin to be de-activated.
// [main-thread]
void (*rescan)(const clap_host_t *host, uint32_t flags);
void(CLAP_ABI *rescan)(const clap_host_t *host, uint32_t flags);
} clap_host_audio_ports_t;

#ifdef __cplusplus
Expand Down
44 changes: 24 additions & 20 deletions dpf/distrho/src/clap/ext/gui.h
Expand Up @@ -97,12 +97,16 @@ typedef struct clap_gui_resize_hints {
typedef struct clap_plugin_gui {
// Returns true if the requested gui api is supported
// [main-thread]
bool (*is_api_supported)(const clap_plugin_t *plugin, const char *api, bool is_floating);
bool(CLAP_ABI *is_api_supported)(const clap_plugin_t *plugin, const char *api, bool is_floating);

// Returns true if the plugin has a preferred api.
// The host has no obligation to honor the plugin preferrence, this is just a hint.
// The const char **api variable should be explicitly assigned as a pointer to
// one of the CLAP_WINDOW_API_ constants defined above, not strcopied.
// [main-thread]
bool (*get_preferred_api)(const clap_plugin_t *plugin, const char **api, bool *is_floating);
bool(CLAP_ABI *get_preferred_api)(const clap_plugin_t *plugin,
const char **api,
bool *is_floating);

// Create and allocate all resources necessary for the gui.
//
Expand All @@ -115,11 +119,11 @@ typedef struct clap_plugin_gui {
//
// After this call, the GUI may not be visible yet; don't forget to call show().
// [main-thread]
bool (*create)(const clap_plugin_t *plugin, const char *api, bool is_floating);
bool(CLAP_ABI *create)(const clap_plugin_t *plugin, const char *api, bool is_floating);

// Free all resources associated with the gui.
// [main-thread]
void (*destroy)(const clap_plugin_t *plugin);
void(CLAP_ABI *destroy)(const clap_plugin_t *plugin);

// Set the absolute GUI scaling factor, and override any OS info.
// Should not be used if the windowing api relies upon logical pixels.
Expand All @@ -130,60 +134,60 @@ typedef struct clap_plugin_gui {
// Returns true if the scaling could be applied
// Returns false if the call was ignored, or the scaling could not be applied.
// [main-thread]
bool (*set_scale)(const clap_plugin_t *plugin, double scale);
bool(CLAP_ABI *set_scale)(const clap_plugin_t *plugin, double scale);

// Get the current size of the plugin UI.
// clap_plugin_gui->create() must have been called prior to asking the size.
// [main-thread]
bool (*get_size)(const clap_plugin_t *plugin, uint32_t *width, uint32_t *height);
bool(CLAP_ABI *get_size)(const clap_plugin_t *plugin, uint32_t *width, uint32_t *height);

// Returns true if the window is resizeable (mouse drag).
// Only for embedded windows.
// [main-thread]
bool (*can_resize)(const clap_plugin_t *plugin);
bool(CLAP_ABI *can_resize)(const clap_plugin_t *plugin);

// Returns true if the plugin can provide hints on how to resize the window.
// [main-thread]
bool (*get_resize_hints)(const clap_plugin_t *plugin, clap_gui_resize_hints_t *hints);
bool(CLAP_ABI *get_resize_hints)(const clap_plugin_t *plugin, clap_gui_resize_hints_t *hints);

// If the plugin gui is resizable, then the plugin will calculate the closest
// usable size which fits in the given size.
// This method does not change the size.
//
// Only for embedded windows.
// [main-thread]
bool (*adjust_size)(const clap_plugin_t *plugin, uint32_t *width, uint32_t *height);
bool(CLAP_ABI *adjust_size)(const clap_plugin_t *plugin, uint32_t *width, uint32_t *height);

// Sets the window size. Only for embedded windows.
// [main-thread]
bool (*set_size)(const clap_plugin_t *plugin, uint32_t width, uint32_t height);
bool(CLAP_ABI *set_size)(const clap_plugin_t *plugin, uint32_t width, uint32_t height);

// Embbeds the plugin window into the given window.
// [main-thread & !floating]
bool (*set_parent)(const clap_plugin_t *plugin, const clap_window_t *window);
bool(CLAP_ABI *set_parent)(const clap_plugin_t *plugin, const clap_window_t *window);

// Set the plugin floating window to stay above the given window.
// [main-thread & floating]
bool (*set_transient)(const clap_plugin_t *plugin, const clap_window_t *window);
bool(CLAP_ABI *set_transient)(const clap_plugin_t *plugin, const clap_window_t *window);

// Suggests a window title. Only for floating windows.
// [main-thread & floating]
void (*suggest_title)(const clap_plugin_t *plugin, const char *title);
void(CLAP_ABI *suggest_title)(const clap_plugin_t *plugin, const char *title);

// Show the window.
// [main-thread]
bool (*show)(const clap_plugin_t *plugin);
bool(CLAP_ABI *show)(const clap_plugin_t *plugin);

// Hide the window, this method does not free the resources, it just hides
// the window content. Yet it may be a good idea to stop painting timers.
// [main-thread]
bool (*hide)(const clap_plugin_t *plugin);
bool(CLAP_ABI *hide)(const clap_plugin_t *plugin);
} clap_plugin_gui_t;

typedef struct clap_host_gui {
// The host should call get_resize_hints() again.
// [thread-safe]
void (*resize_hints_changed)(const clap_host_t *host);
void(CLAP_ABI *resize_hints_changed)(const clap_host_t *host);

/* Request the host to resize the client area to width, height.
* Return true if the new size is accepted, false otherwise.
Expand All @@ -194,24 +198,24 @@ typedef struct clap_host_gui {
* satisfied then the host will call set_size() to revert the operation.
*
* [thread-safe] */
bool (*request_resize)(const clap_host_t *host, uint32_t width, uint32_t height);
bool(CLAP_ABI *request_resize)(const clap_host_t *host, uint32_t width, uint32_t height);

/* Request the host to show the plugin gui.
* Return true on success, false otherwise.
* [thread-safe] */
bool (*request_show)(const clap_host_t *host);
bool(CLAP_ABI *request_show)(const clap_host_t *host);

/* Request the host to hide the plugin gui.
* Return true on success, false otherwise.
* [thread-safe] */
bool (*request_hide)(const clap_host_t *host);
bool(CLAP_ABI *request_hide)(const clap_host_t *host);

// The floating window has been closed, or the connection to the gui has been lost.
//
// If was_destroyed is true, then the host must call clap_plugin_gui->destroy() to acknowledge
// the gui destruction.
// [thread-safe]
void (*closed)(const clap_host_t *host, bool was_destroyed);
void(CLAP_ABI *closed)(const clap_host_t *host, bool was_destroyed);
} clap_host_gui_t;

#ifdef __cplusplus
Expand Down
28 changes: 28 additions & 0 deletions dpf/distrho/src/clap/ext/latency.h
@@ -0,0 +1,28 @@
#pragma once

#include "../plugin.h"

static CLAP_CONSTEXPR const char CLAP_EXT_LATENCY[] = "clap.latency";

#ifdef __cplusplus
extern "C" {
#endif

// The audio ports scan has to be done while the plugin is deactivated.
typedef struct clap_plugin_latency {
// Returns the plugin latency.
// [main-thread]
uint32_t(CLAP_ABI *get)(const clap_plugin_t *plugin);
} clap_plugin_latency_t;

typedef struct clap_host_latency {
// Tell the host that the latency changed.
// The latency is only allowed to change if the plugin is deactivated.
// If the plugin is activated, call host->request_restart()
// [main-thread]
void(CLAP_ABI *changed)(const clap_host_t *host);
} clap_host_latency_t;

#ifdef __cplusplus
}
#endif
78 changes: 78 additions & 0 deletions dpf/distrho/src/clap/ext/note-ports.h
@@ -0,0 +1,78 @@
#pragma once

#include "../plugin.h"
#include "../string-sizes.h"

/// @page Note Ports
///
/// This extension provides a way for the plugin to describe its current note ports.
/// If the plugin does not implement this extension, it won't have note input or output.
/// The plugin is only allowed to change its note ports configuration while it is deactivated.

static CLAP_CONSTEXPR const char CLAP_EXT_NOTE_PORTS[] = "clap.note-ports";

#ifdef __cplusplus
extern "C" {
#endif

enum clap_note_dialect {
// Uses clap_event_note and clap_event_note_expression.
CLAP_NOTE_DIALECT_CLAP = 1 << 0,

// Uses clap_event_midi, no polyphonic expression
CLAP_NOTE_DIALECT_MIDI = 1 << 1,

// Uses clap_event_midi, with polyphonic expression (MPE)
CLAP_NOTE_DIALECT_MIDI_MPE = 1 << 2,

// Uses clap_event_midi2
CLAP_NOTE_DIALECT_MIDI2 = 1 << 3,
};

typedef struct clap_note_port_info {
// id identifies a port and must be stable.
// id may overlap between input and output ports.
clap_id id;
uint32_t supported_dialects; // bitfield, see clap_note_dialect
uint32_t preferred_dialect; // one value of clap_note_dialect
char name[CLAP_NAME_SIZE]; // displayable name, i18n?
} clap_note_port_info_t;

// The note ports scan has to be done while the plugin is deactivated.
typedef struct clap_plugin_note_ports {
// number of ports, for either input or output
// [main-thread]
uint32_t(CLAP_ABI *count)(const clap_plugin_t *plugin, bool is_input);

// get info about about a note port.
// [main-thread]
bool(CLAP_ABI *get)(const clap_plugin_t *plugin,
uint32_t index,
bool is_input,
clap_note_port_info_t *info);
} clap_plugin_note_ports_t;

enum {
// The ports have changed, the host shall perform a full scan of the ports.
// This flag can only be used if the plugin is not active.
// If the plugin active, call host->request_restart() and then call rescan()
// when the host calls deactivate()
CLAP_NOTE_PORTS_RESCAN_ALL = 1 << 0,

// The ports name did change, the host can scan them right away.
CLAP_NOTE_PORTS_RESCAN_NAMES = 1 << 1,
};

typedef struct clap_host_note_ports {
// Query which dialects the host supports
// [main-thread]
uint32_t(CLAP_ABI *supported_dialects)(const clap_host_t *host);

// Rescan the full list of note ports according to the flags.
// [main-thread]
void(CLAP_ABI *rescan)(const clap_host_t *host, uint32_t flags);
} clap_host_note_ports_t;

#ifdef __cplusplus
}
#endif
76 changes: 54 additions & 22 deletions dpf/distrho/src/clap/ext/params.h
Expand Up @@ -155,16 +155,43 @@ typedef struct clap_param_info {

clap_param_info_flags flags;

// This value is optional and set by the plugin.
// Its purpose is to provide a fast access to the plugin parameter:
// This value is optional and set by the plugin. The host will
// set it on all subsequent events regarding this param_id
// or set the cookie to nullptr if the host chooses to
// not implement cookies.
//
// The plugin must gracefully handle the case of a cookie
// which is nullptr, but can safely assume any cookie
// which is not nullptr is the value it issued.
//
// It is very strongly recommended that the host implement
// cookies. Some plugins may have noticably reduced
// performance when addressing params in hosts without cookies.
//
// The cookie's purpose is to provide a fast access to the
// plugin parameter objects. For instance:
//
// in clap_plugin_params.get_info
// Parameter *p = findParameter(param_id);
// param_info->cookie = p;
//
// /* and later on */
// Parameter *p = (Parameter *)cookie;
// later, in clap_plugin.process:
//
// Parameter *p{nullptr};
// if (evt->cookie) [[likely]]
// p = (Parameter *)evt->cookie;
// else
// p = -- alternate mechanism --
//
// It is invalidated on clap_host_params->rescan(CLAP_PARAM_RESCAN_ALL) and when the plugin is
// where "alternate mechanism" is a mechanism the plugin implements
// to map parameter ids to internal objects.
//
// The host should make no assumption about the
// value of the cookie other than passing it back to the plugin or
// replacing it with nullptr.
//
// Once set, the cookie is valid until invalidated by a call to
// clap_host_params->rescan(CLAP_PARAM_RESCAN_ALL) or when the plugin is
// destroyed.
void *cookie;

Expand All @@ -183,39 +210,44 @@ typedef struct clap_param_info {
typedef struct clap_plugin_params {
// Returns the number of parameters.
// [main-thread]
uint32_t (*count)(const clap_plugin_t *plugin);
uint32_t(CLAP_ABI *count)(const clap_plugin_t *plugin);

// Copies the parameter's info to param_info and returns true on success.
// [main-thread]
bool (*get_info)(const clap_plugin_t *plugin,
uint32_t param_index,
clap_param_info_t *param_info);
bool(CLAP_ABI *get_info)(const clap_plugin_t *plugin,
uint32_t param_index,
clap_param_info_t *param_info);

// Gets the parameter plain value.
// [main-thread]
bool (*get_value)(const clap_plugin_t *plugin, clap_id param_id, double *value);
bool(CLAP_ABI *get_value)(const clap_plugin_t *plugin, clap_id param_id, double *value);

// Formats the display text for the given parameter value.
// The host should always format the parameter value to text using this function
// before displaying it to the user.
// [main-thread]
bool (*value_to_text)(
bool(CLAP_ABI *value_to_text)(
const clap_plugin_t *plugin, clap_id param_id, double value, char *display, uint32_t size);

// Converts the display text to a parameter value.
// [main-thread]
bool (*text_to_value)(const clap_plugin_t *plugin,
clap_id param_id,
const char *display,
double *value);
bool(CLAP_ABI *text_to_value)(const clap_plugin_t *plugin,
clap_id param_id,
const char *display,
double *value);

// Flushes a set of parameter changes.
// This method must not be called concurrently to clap_plugin->process().
//
// Note: if the plugin is processing, then the process() call will already achieve the
// parameter update (bi-directionnal), so a call to flush isn't required, also be aware
// that the plugin may use the sample offset in process(), while this information would be
// lost within flush().
//
// [active ? audio-thread : main-thread]
void (*flush)(const clap_plugin_t *plugin,
const clap_input_events_t *in,
const clap_output_events_t *out);
void(CLAP_ABI *flush)(const clap_plugin_t *plugin,
const clap_input_events_t *in,
const clap_output_events_t *out);
} clap_plugin_params_t;

enum {
Expand Down Expand Up @@ -272,23 +304,23 @@ typedef uint32_t clap_param_clear_flags;
typedef struct clap_host_params {
// Rescan the full list of parameters according to the flags.
// [main-thread]
void (*rescan)(const clap_host_t *host, clap_param_rescan_flags flags);
void(CLAP_ABI *rescan)(const clap_host_t *host, clap_param_rescan_flags flags);

// Clears references to a parameter.
// [main-thread]
void (*clear)(const clap_host_t *host, clap_id param_id, clap_param_clear_flags flags);
void(CLAP_ABI *clear)(const clap_host_t *host, clap_id param_id, clap_param_clear_flags flags);

// Request a parameter flush.
//
// The host will then schedule a call to either:
// - clap_plugin.process()
// - clap_plugin_params->flush()
// - clap_plugin_params.flush()
//
// This function is always safe to use and should not be called from an [audio-thread] as the
// plugin would already be within process() or flush().
//
// [thread-safe,!audio-thread]
void (*request_flush)(const clap_host_t *host);
void(CLAP_ABI *request_flush)(const clap_host_t *host);
} clap_host_params_t;

#ifdef __cplusplus
Expand Down
33 changes: 33 additions & 0 deletions dpf/distrho/src/clap/ext/state.h
@@ -0,0 +1,33 @@
#pragma once

#include "../plugin.h"
#include "../stream.h"

static CLAP_CONSTEXPR const char CLAP_EXT_STATE[] = "clap.state";

#ifdef __cplusplus
extern "C" {
#endif

typedef struct clap_plugin_state {
// Saves the plugin state into stream.
// Returns true if the state was correctly saved.
// [main-thread]
bool(CLAP_ABI *save)(const clap_plugin_t *plugin, const clap_ostream_t *stream);

// Loads the plugin state from stream.
// Returns true if the state was correctly restored.
// [main-thread]
bool(CLAP_ABI *load)(const clap_plugin_t *plugin, const clap_istream_t *stream);
} clap_plugin_state_t;

typedef struct clap_host_state {
// Tell the host that the plugin state has changed and should be saved again.
// If a parameter value changes, then it is implicit that the state is dirty.
// [main-thread]
void(CLAP_ABI *mark_dirty)(const clap_host_t *host);
} clap_host_state_t;

#ifdef __cplusplus
}
#endif
51 changes: 51 additions & 0 deletions dpf/distrho/src/clap/ext/thread-check.h
@@ -0,0 +1,51 @@
#pragma once

#include "../plugin.h"

static CLAP_CONSTEXPR const char CLAP_EXT_THREAD_CHECK[] = "clap.thread-check";

#ifdef __cplusplus
extern "C" {
#endif

/// @page thread-check
///
/// CLAP defines two symbolic threads:
///
/// main-thread:
/// This is the thread in which most of the interaction between the plugin and host happens.
/// It is usually the thread on which the GUI receives its events.
/// It isn't a realtime thread, yet this thread needs to respond fast enough to user interaction,
/// so it is recommended to run long and expensive tasks such as preset indexing or asset loading
/// in dedicated background threads.
///
/// audio-thread:
/// This thread is used for realtime audio processing. Its execution should be as deterministic
/// as possible to meet the audio interface's deadline (can be <1ms). In other words, there is a
/// known set of operations that should be avoided: malloc() and free(), mutexes (spin mutexes
/// are worse), I/O, waiting, ...
/// The audio-thread is something symbolic, there isn't one OS thread that remains the
/// audio-thread for the plugin lifetime. As you may guess, the host is likely to have a
/// thread pool and the plugin.process() call may be scheduled on different OS threads over time.
/// The most important thing is that there can't be two audio-threads at the same time. All the
/// functions marked with [audio-thread] **ARE NOT CONCURRENT**. The host may mark any OS thread,
/// including the main-thread as the audio-thread, as long as it can guarentee that only one OS
/// thread is the audio-thread at a time. The audio-thread can be seen as a concurrency guard for
/// all functions marked with [audio-thread].

// This interface is useful to do runtime checks and make
// sure that the functions are called on the correct threads.
// It is highly recommended that hosts implement this extension.
typedef struct clap_host_thread_check {
// Returns true if "this" thread is the main thread.
// [thread-safe]
bool(CLAP_ABI *is_main_thread)(const clap_host_t *host);

// Returns true if "this" thread is one of the audio threads.
// [thread-safe]
bool(CLAP_ABI *is_audio_thread)(const clap_host_t *host);
} clap_host_thread_check_t;

#ifdef __cplusplus
}
#endif
29 changes: 29 additions & 0 deletions dpf/distrho/src/clap/ext/timer-support.h
@@ -0,0 +1,29 @@
#pragma once

#include "../plugin.h"

static CLAP_CONSTEXPR const char CLAP_EXT_TIMER_SUPPORT[] = "clap.timer-support";

#ifdef __cplusplus
extern "C" {
#endif

typedef struct clap_plugin_timer_support {
// [main-thread]
void(CLAP_ABI *on_timer)(const clap_plugin_t *plugin, clap_id timer_id);
} clap_plugin_timer_support_t;

typedef struct clap_host_timer_support {
// Registers a periodic timer.
// The host may adjust the period if it is under a certain threshold.
// 30 Hz should be allowed.
// [main-thread]
bool(CLAP_ABI *register_timer)(const clap_host_t *host, uint32_t period_ms, clap_id *timer_id);

// [main-thread]
bool(CLAP_ABI *unregister_timer)(const clap_host_t *host, clap_id timer_id);
} clap_host_timer_support_t;

#ifdef __cplusplus
}
#endif
8 changes: 4 additions & 4 deletions dpf/distrho/src/clap/host.h
Expand Up @@ -19,21 +19,21 @@ typedef struct clap_host {

// Query an extension.
// [thread-safe]
const void *(*get_extension)(const struct clap_host *host, const char *extension_id);
const void *(CLAP_ABI *get_extension)(const struct clap_host *host, const char *extension_id);

// Request the host to deactivate and then reactivate the plugin.
// The operation may be delayed by the host.
// [thread-safe]
void (*request_restart)(const struct clap_host *host);
void(CLAP_ABI *request_restart)(const struct clap_host *host);

// Request the host to activate and start processing the plugin.
// This is useful if you have external IO and need to wake up the plugin from "sleep".
// [thread-safe]
void (*request_process)(const struct clap_host *host);
void(CLAP_ABI *request_process)(const struct clap_host *host);

// Request the host to schedule a call to plugin->on_main_thread(plugin) on the main thread.
// [thread-safe]
void (*request_callback)(const struct clap_host *host);
void(CLAP_ABI *request_callback)(const struct clap_host *host);
} clap_host_t;

#ifdef __cplusplus
Expand Down
13 changes: 7 additions & 6 deletions dpf/distrho/src/clap/plugin-factory.h
Expand Up @@ -11,27 +11,28 @@ extern "C" {
// Every method must be thread-safe.
// It is very important to be able to scan the plugin as quickly as possible.
//
// If the content of the factory may change due to external events, like the user installed
// The host may use clap_plugin_invalidation_factory to detect filesystem changes
// which may change the factory's content.
typedef struct clap_plugin_factory {
// Get the number of plugins available.
// [thread-safe]
uint32_t (*get_plugin_count)(const struct clap_plugin_factory *factory);
uint32_t(CLAP_ABI *get_plugin_count)(const struct clap_plugin_factory *factory);

// Retrieves a plugin descriptor by its index.
// Returns null in case of error.
// The descriptor must not be freed.
// [thread-safe]
const clap_plugin_descriptor_t *(*get_plugin_descriptor)(
const clap_plugin_descriptor_t *(CLAP_ABI *get_plugin_descriptor)(
const struct clap_plugin_factory *factory, uint32_t index);

// Create a clap_plugin by its plugin_id.
// The returned pointer must be freed by calling plugin->destroy(plugin);
// The plugin is not allowed to use the host callbacks in the create method.
// Returns null in case of error.
// [thread-safe]
const clap_plugin_t *(*create_plugin)(const struct clap_plugin_factory *factory,
const clap_host_t *host,
const char *plugin_id);
const clap_plugin_t *(CLAP_ABI *create_plugin)(const struct clap_plugin_factory *factory,
const clap_host_t *host,
const char *plugin_id);
} clap_plugin_factory_t;

#ifdef __cplusplus
Expand Down
28 changes: 14 additions & 14 deletions dpf/distrho/src/clap/plugin.h
Expand Up @@ -38,12 +38,12 @@ typedef struct clap_plugin {
// Must be called after creating the plugin.
// If init returns false, the host must destroy the plugin instance.
// [main-thread]
bool (*init)(const struct clap_plugin *plugin);
bool(CLAP_ABI *init)(const struct clap_plugin *plugin);

// Free the plugin and its resources.
// It is required to deactivate the plugin prior to this call.
// [main-thread & !active]
void (*destroy)(const struct clap_plugin *plugin);
void(CLAP_ABI *destroy)(const struct clap_plugin *plugin);

// Activate and deactivate the plugin.
// In this call the plugin may allocate memory and prepare everything needed for the process
Expand All @@ -52,43 +52,43 @@ typedef struct clap_plugin {
// Once activated the latency and port configuration must remain constant, until deactivation.
//
// [main-thread & !active_state]
bool (*activate)(const struct clap_plugin *plugin,
double sample_rate,
uint32_t min_frames_count,
uint32_t max_frames_count);

bool(CLAP_ABI *activate)(const struct clap_plugin *plugin,
double sample_rate,
uint32_t min_frames_count,
uint32_t max_frames_count);
// [main-thread & active_state]
void (*deactivate)(const struct clap_plugin *plugin);
void(CLAP_ABI *deactivate)(const struct clap_plugin *plugin);

// Call start processing before processing.
// [audio-thread & active_state & !processing_state]
bool (*start_processing)(const struct clap_plugin *plugin);
bool(CLAP_ABI *start_processing)(const struct clap_plugin *plugin);

// Call stop processing before sending the plugin to sleep.
// [audio-thread & active_state & processing_state]
void (*stop_processing)(const struct clap_plugin *plugin);
void(CLAP_ABI *stop_processing)(const struct clap_plugin *plugin);

// - Clears all buffers, performs a full reset of the processing state (filters, oscillators,
// enveloppes, lfo, ...) and kills all voices.
// - The parameter's value remain unchanged.
// - clap_process.steady_time may jump backward.
//
// [audio-thread & active_state]
void (*reset)(const struct clap_plugin *plugin);
void(CLAP_ABI *reset)(const struct clap_plugin *plugin);

// process audio, events, ...
// [audio-thread & active_state & processing_state]
clap_process_status (*process)(const struct clap_plugin *plugin, const clap_process_t *process);
clap_process_status(CLAP_ABI *process)(const struct clap_plugin *plugin,
const clap_process_t *process);

// Query an extension.
// The returned pointer is owned by the plugin.
// [thread-safe]
const void *(*get_extension)(const struct clap_plugin *plugin, const char *id);
const void *(CLAP_ABI *get_extension)(const struct clap_plugin *plugin, const char *id);

// Called by the host on the main thread in response to a previous call to:
// host->request_callback(host);
// [main-thread]
void (*on_main_thread)(const struct clap_plugin *plugin);
void(CLAP_ABI *on_main_thread)(const struct clap_plugin *plugin);
} clap_plugin_t;

#ifdef __cplusplus
Expand Down
8 changes: 8 additions & 0 deletions dpf/distrho/src/clap/private/macros.h
Expand Up @@ -17,6 +17,14 @@
# endif
#endif

#if !defined(CLAP_ABI)
# if defined _WIN32 || defined __CYGWIN__
# define CLAP_ABI __cdecl
# else
# define CLAP_ABI
# endif
#endif

#if defined(__cplusplus) && __cplusplus >= 201103L
# define CLAP_HAS_CXX11
# define CLAP_CONSTEXPR constexpr
Expand Down
5 changes: 3 additions & 2 deletions dpf/distrho/src/clap/process.h
Expand Up @@ -45,8 +45,9 @@ typedef struct clap_process {
const clap_event_transport_t *transport;

// Audio buffers, they must have the same count as specified
// by clap_plugin_audio_ports->get_count().
// The index maps to clap_plugin_audio_ports->get_info().
// by clap_plugin_audio_ports->count().
// The index maps to clap_plugin_audio_ports->get().
// Input buffer and its contents are read-only.
const clap_audio_buffer_t *audio_inputs;
clap_audio_buffer_t *audio_outputs;
uint32_t audio_inputs_count;
Expand Down
26 changes: 26 additions & 0 deletions dpf/distrho/src/clap/stream.h
@@ -0,0 +1,26 @@
#pragma once

#include "private/std.h"
#include "private/macros.h"

#ifdef __cplusplus
extern "C" {
#endif

typedef struct clap_istream {
void *ctx; // reserved pointer for the stream

// returns the number of bytes read; 0 indicates end of file and -1 a read error
int64_t(CLAP_ABI *read)(const struct clap_istream *stream, void *buffer, uint64_t size);
} clap_istream_t;

typedef struct clap_ostream {
void *ctx; // reserved pointer for the stream

// returns the number of bytes written; -1 on write error
int64_t(CLAP_ABI *write)(const struct clap_ostream *stream, const void *buffer, uint64_t size);
} clap_ostream_t;

#ifdef __cplusplus
}
#endif
5 changes: 3 additions & 2 deletions dpf/distrho/src/jackbridge/RtAudioBridge.hpp
Expand Up @@ -29,17 +29,18 @@
# define RTMIDI_API_TYPE MACOSX_CORE
#elif defined(DISTRHO_OS_WINDOWS) && !defined(_MSC_VER)
# define __WINDOWS_DS__
# define __WINDOWS_MM__
# define RTAUDIO_API_TYPE WINDOWS_DS
# define RTMIDI_API_TYPE WINDOWS_MM
#else
# if defined(HAVE_PULSEAUDIO)
# define __LINUX_PULSE__
# define RTAUDIO_API_TYPE LINUX_PULSE
# elif defined(HAVE_ALSA)
# define __LINUX_ALSA__
# define RTAUDIO_API_TYPE LINUX_ALSA
# define RTAUDIO_API_TYPE LINUX_ALSA
# endif
# ifdef HAVE_ALSA
# define __LINUX_ALSA__
# define RTMIDI_API_TYPE LINUX_ALSA
# endif
#endif
Expand Down
336 changes: 0 additions & 336 deletions dpf/distrho/src/vestige/vestige.h

This file was deleted.

11 changes: 11 additions & 0 deletions dpf/distrho/src/xaymar-vst2/LICENSE
@@ -0,0 +1,11 @@
Copyright 2020 Michael Fabian 'Xaymar' Dirks <info@xaymar.com>

Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:

1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.

2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.

3. Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
21 changes: 21 additions & 0 deletions dpf/distrho/src/xaymar-vst2/README.md
@@ -0,0 +1,21 @@
# About the Project
This is a completely "clean room" untainted reverse engineered "SDK" for the VST 2.x interface. It was reverse engineered from binaries where no license restricting the reverse engineering was attached, or where the legal system explicitly allowed reverse engineering for the purpose of interoperability.

# Frequently Asked Questions
## Is this legal? Can I use this in my own product?
**Disclaimer:** I am not a lawyer. The information presented below is purely from available copyright laws that I could find about this topic. You should always consult with a lawyer first before including this in your product.

As this only enables interoperability with existing VST 2.x programs and addons, it is considered to be reverse engineering in the name of interoperability. In most of the developed world, this is considered completely legal and is fine to be used by anyone, as long as it is not the only function of the product.

Note that this does not grant any patent licenses, nor does it grant you any right to use trademarks in the names. That could mean that you can't advertise your product as having support for VST, and can't use VST in the name or presentation of the product at all unless you have permission to do so.

## Why recreate an SDK for something officially abandoned by the creators?
There is a ton of software that is only capable of loading VST2.x audio effects, and Steinberg has made no effort to create a VST3-to-VST2-adapter for that software. Notable software includes Audacity and OBS Studio, which both likely felt restricted by the license additions Steinberg added to the GPL license.

## How did you reverse engineer this?
The reverse engineering was done with various tools (mostly disassemblers to x86 assembly code), hooking into system APIs, attempting to mimic functionality through observation and testing, and other methods. Primarily Visual Studio Code was used to write the header files, and Visual Studio 2019 Express was used to create fake VST plugins/hosts to figure out actual behavior.

### Which binaries were disassembled?
* A fake VST2 host (using this header) was created to verify against existing plugins.
* A fake VST2 plugin (using this header) was created to verify against existing hosts.
* OBS Studio and Audacity were used to verify compatability between closed source and open source VST hosts.
1,012 changes: 1,012 additions & 0 deletions dpf/distrho/src/xaymar-vst2/vst.h

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dpf/dpf.doxygen
Expand Up @@ -141,7 +141,7 @@ HTML_EXTRA_FILES =
HTML_COLORSTYLE_HUE = 220
HTML_COLORSTYLE_SAT = 100
HTML_COLORSTYLE_GAMMA = 80
HTML_TIMESTAMP = YES
HTML_TIMESTAMP = NO
HTML_ALIGN_MEMBERS = YES
HTML_DYNAMIC_SECTIONS = NO
GENERATE_DOCSET = NO
Expand Down
13 changes: 11 additions & 2 deletions dpf/utils/package-osx-bundles.sh
Expand Up @@ -15,12 +15,14 @@ SNAME="$(echo ${NAME} | tr -d ' ' | tr '/' '-')"
rm -rf lv2
rm -rf vst2
rm -rf vst3
rm -rf clap

mkdir lv2 vst2 vst3
mkdir lv2 vst2 vst3 clap
cp -RL *.lv2 lv2/
cp -RL *.vst vst2/
cp -RL *.vst3 vst3/
rm -rf *.lv2 *.vst *.vst3
cp -RL *.clap clap/
rm -rf *.lv2 *.vst *.vst3 *.clap

pkgbuild \
--identifier "studio.kx.distrho.plugins.${SNAME}.lv2bundles" \
Expand All @@ -40,6 +42,12 @@ pkgbuild \
--root "${PWD}/vst3/" \
../dpf-${SNAME}-vst3bundles.pkg

pkgbuild \
--identifier "studio.kx.distrho.plugins.${SNAME}.clapbundles" \
--install-location "/Library/Audio/Plug-Ins/CLAP/" \
--root "${PWD}/clap/" \
../dpf-${SNAME}-clapbundles.pkg

cd ..

DPF_UTILS_DIR=$(dirname ${0})
Expand All @@ -52,6 +60,7 @@ sed -e "s|@builddir@|${PWD}/build|" \
-e "s|@lv2bundleref@|dpf-${SNAME}-lv2bundles.pkg|" \
-e "s|@vst2bundleref@|dpf-${SNAME}-vst2bundles.pkg|" \
-e "s|@vst3bundleref@|dpf-${SNAME}-vst3bundles.pkg|" \
-e "s|@clapbundleref@|dpf-${SNAME}-clapbundles.pkg|" \
-e "s|@name@|${NAME}|g" \
-e "s|@sname@|${SNAME}|g" \
${DPF_UTILS_DIR}/plugin.pkg/package.xml.in > build/package.xml
Expand Down
4 changes: 4 additions & 0 deletions dpf/utils/plugin.pkg/package.xml.in
Expand Up @@ -14,9 +14,13 @@
<choice id="studio.kx.distrho.@sname@-vst3" title="VST3" description="Install VST3 plugins" visible="true">
<pkg-ref id="studio.kx.distrho.@sname@-vst3bundles" version="0">@vst3bundleref@</pkg-ref>
</choice>
<choice id="studio.kx.distrho.@sname@-clap" title="CLAP" description="Install CLAP plugins" visible="true">
<pkg-ref id="studio.kx.distrho.@sname@-clapbundles" version="0">@clapbundleref@</pkg-ref>
</choice>
<choices-outline>
<line choice="studio.kx.distrho.@sname@-lv2"/>
<line choice="studio.kx.distrho.@sname@-vst2"/>
<line choice="studio.kx.distrho.@sname@-vst3"/>
<line choice="studio.kx.distrho.@sname@-clap"/>
</choices-outline>
</installer-gui-script>
10 changes: 6 additions & 4 deletions plugins/3BandEQ/DistrhoPluginInfo.h
Expand Up @@ -17,17 +17,19 @@
#ifndef DISTRHO_PLUGIN_INFO_H_INCLUDED
#define DISTRHO_PLUGIN_INFO_H_INCLUDED

#define DISTRHO_PLUGIN_BRAND "DISTRHO"
#define DISTRHO_PLUGIN_NAME "3 Band EQ"
#define DISTRHO_PLUGIN_URI "http://distrho.sf.net/plugins/3BandEQ"
#define DISTRHO_PLUGIN_BRAND "DISTRHO"
#define DISTRHO_PLUGIN_NAME "3 Band EQ"
#define DISTRHO_PLUGIN_URI "http://distrho.sf.net/plugins/3BandEQ"
#define DISTRHO_PLUGIN_CLAP_ID "studio.kx.distrho.MVerb"

#define DISTRHO_PLUGIN_HAS_UI 1
#define DISTRHO_PLUGIN_IS_RT_SAFE 1
#define DISTRHO_PLUGIN_NUM_INPUTS 2
#define DISTRHO_PLUGIN_NUM_OUTPUTS 2
#define DISTRHO_PLUGIN_WANT_PROGRAMS 1

#define DISTRHO_PLUGIN_LV2_CATEGORY "lv2:EQPlugin"
#define DISTRHO_PLUGIN_CLAP_FEATURES "audio-effect", "equalizer", "stereo"
#define DISTRHO_PLUGIN_LV2_CATEGORY "lv2:EQPlugin"
#define DISTRHO_PLUGIN_VST3_CATEGORIES "Fx|EQ"

#endif // DISTRHO_PLUGIN_INFO_H_INCLUDED
11 changes: 1 addition & 10 deletions plugins/3BandEQ/Makefile
Expand Up @@ -29,23 +29,14 @@ include ../../dpf/Makefile.plugins.mk
# --------------------------------------------------------------
# Enable all possible plugin types

TARGETS += jack
TARGETS += ladspa
TARGETS += vst2
TARGETS += vst3
TARGETS = jack ladspa lv2_sep vst2 vst3 clap

ifeq ($(HAVE_CAIRO_OR_OPENGL),true)
ifeq ($(HAVE_LIBLO),true)
TARGETS += dssi
endif
endif

ifeq ($(HAVE_CAIRO_OR_OPENGL),true)
TARGETS += lv2_sep
else
TARGETS += lv2_dsp
endif

all: $(TARGETS)

# --------------------------------------------------------------
10 changes: 6 additions & 4 deletions plugins/3BandSplitter/DistrhoPluginInfo.h
Expand Up @@ -17,17 +17,19 @@
#ifndef DISTRHO_PLUGIN_INFO_H_INCLUDED
#define DISTRHO_PLUGIN_INFO_H_INCLUDED

#define DISTRHO_PLUGIN_BRAND "DISTRHO"
#define DISTRHO_PLUGIN_NAME "3 Band Splitter"
#define DISTRHO_PLUGIN_URI "http://distrho.sf.net/plugins/3BandSplitter"
#define DISTRHO_PLUGIN_BRAND "DISTRHO"
#define DISTRHO_PLUGIN_NAME "3 Band Splitter"
#define DISTRHO_PLUGIN_URI "http://distrho.sf.net/plugins/3BandSplitter"
#define DISTRHO_PLUGIN_CLAP_ID "studio.kx.distrho.MVerb"

#define DISTRHO_PLUGIN_HAS_UI 1
#define DISTRHO_PLUGIN_IS_RT_SAFE 1
#define DISTRHO_PLUGIN_NUM_INPUTS 2
#define DISTRHO_PLUGIN_NUM_OUTPUTS 6
#define DISTRHO_PLUGIN_WANT_PROGRAMS 1

#define DISTRHO_PLUGIN_LV2_CATEGORY "lv2:EQPlugin"
#define DISTRHO_PLUGIN_CLAP_FEATURES "audio-effect", "equalizer", "stereo"
#define DISTRHO_PLUGIN_LV2_CATEGORY "lv2:EQPlugin"
#define DISTRHO_PLUGIN_VST3_CATEGORIES "Fx|EQ"

#endif // DISTRHO_PLUGIN_INFO_H_INCLUDED
11 changes: 1 addition & 10 deletions plugins/3BandSplitter/Makefile
Expand Up @@ -29,23 +29,14 @@ include ../../dpf/Makefile.plugins.mk
# --------------------------------------------------------------
# Enable all possible plugin types

TARGETS += jack
TARGETS += ladspa
TARGETS += vst2
TARGETS += vst3
TARGETS = jack ladspa lv2_sep vst2 vst3 clap

ifeq ($(HAVE_CAIRO_OR_OPENGL),true)
ifeq ($(HAVE_LIBLO),true)
TARGETS += dssi
endif
endif

ifeq ($(HAVE_CAIRO_OR_OPENGL),true)
TARGETS += lv2_sep
else
TARGETS += lv2_dsp
endif

all: $(TARGETS)

# --------------------------------------------------------------
54 changes: 25 additions & 29 deletions plugins/AmplitudeImposer/DistrhoPluginAmplitudeImposer.cpp
Expand Up @@ -57,27 +57,27 @@ void DistrhoPluginAmplitudeImposer::initAudioPort(bool input, uint32_t index, Au
switch (index)
{
case 0:
port.name = "Input Left (Audio)";
port.symbol = "in_left_audio";
port.groupId = kPortGroupStereo;
break;
case 1:
port.name = "Input Right (Audio)";
port.symbol = "in_right_audio";
port.groupId = kPortGroupStereo;
break;
case 2:
port.name = "Input Left (Amp Env)";
port.symbol = "in_left_amp";
port.groupId = kPortGroupAmpEnv;
port.hints = kAudioPortIsSidechain;
break;
case 1:
case 3:
port.name = "Input Right (Amp Env)";
port.symbol = "in_right_amp";
port.groupId = kPortGroupAmpEnv;
port.hints = kAudioPortIsSidechain;
break;
case 2:
port.name = "Input Left (Audio)";
port.symbol = "in_left_audio";
port.groupId = kPortGroupAudio;
break;
case 3:
port.name = "Input Right (Audio)";
port.symbol = "in_right_audio";
port.groupId = kPortGroupAudio;
break;
}
}
else
Expand Down Expand Up @@ -127,10 +127,6 @@ void DistrhoPluginAmplitudeImposer::initPortGroup(uint32_t groupId, PortGroup& p
portGroup.name = "Amp Env";
portGroup.symbol = "amp_env";
break;
case kPortGroupAudio:
portGroup.name = "Audio";
portGroup.symbol = "audio";
break;
}
}

Expand Down Expand Up @@ -194,10 +190,10 @@ void DistrhoPluginAmplitudeImposer::activate()

void DistrhoPluginAmplitudeImposer::run(const float** inputs, float** outputs, uint32_t frames)
{
const float* const in1 = inputs[0];
const float* const in2 = inputs[1];
const float* const in3 = inputs[2];
const float* const in4 = inputs[3];
const float* const in1 = inputs[0];
const float* const in2 = inputs[1];
const float* const env1 = inputs[2];
const float* const env2 = inputs[3];
/* */ float* const out1 = outputs[0];
/* */ float* const out2 = outputs[1];

Expand All @@ -208,26 +204,26 @@ void DistrhoPluginAmplitudeImposer::run(const float** inputs, float** outputs, u
for (uint32_t i=0; i<frames; ++i)
{
// calculate envelope from 1st two inputs
tmp = std::abs(in1[i]);
tmp = std::abs(env1[i]);
/**/ if (tmp > ampEnvelope_l)
ampEnvelope_l = tmp;
else if (tmp < ampEnvelope_l)
ampEnvelope_l -= envDecay;

tmp = std::abs(in2[i]);
tmp = std::abs(env2[i]);
/**/ if (tmp > ampEnvelope_r)
ampEnvelope_r = tmp;
else if (tmp < ampEnvelope_r)
ampEnvelope_r -= envDecay;

// calculate envelope from 2nd two inputs
tmp = std::abs(in3[i]);
tmp = std::abs(in1[i]);
/**/ if (tmp > audioEnvelope_l)
audioEnvelope_l = tmp;
else if (tmp < audioEnvelope_l)
audioEnvelope_l -= envDecay;

tmp = std::abs(in4[i]);
tmp = std::abs(in2[i]);
/**/ if (tmp > audioEnvelope_r)
audioEnvelope_r = tmp;
else if (tmp < audioEnvelope_r)
Expand All @@ -246,26 +242,26 @@ void DistrhoPluginAmplitudeImposer::run(const float** inputs, float** outputs, u
// work out whether we need to multiply audio input
if (audioEnvelope_l > fThreshold)
{
tempin.left = in3[i];
tempin.left = in1[i];
}
else
{
if (audioEnvelope_l > 0.001f)
tempin.left = in3[i] * (fThreshold/audioEnvelope_l);
tempin.left = in1[i] * (fThreshold/audioEnvelope_l);
else
tempin.left = in3[i] * (fThreshold/0.001f); //so it'll decay away smoothly
tempin.left = in1[i] * (fThreshold/0.001f); //so it'll decay away smoothly
}

if (audioEnvelope_r > fThreshold)
{
tempin.right = in4[i];
tempin.right = in2[i];
}
else
{
if (audioEnvelope_r > 0.001f)
tempin.right = in4[i] * (fThreshold/audioEnvelope_r);
tempin.right = in2[i] * (fThreshold/audioEnvelope_r);
else
tempin.right = in4[i] * (fThreshold/0.001f);
tempin.right = in2[i] * (fThreshold/0.001f);
}

// calculate output
Expand Down
1 change: 0 additions & 1 deletion plugins/AmplitudeImposer/DistrhoPluginAmplitudeImposer.hpp
Expand Up @@ -42,7 +42,6 @@ class DistrhoPluginAmplitudeImposer : public Plugin

enum PortGroups {
kPortGroupAmpEnv,
kPortGroupAudio,
kPortGroupCount
};

Expand Down
10 changes: 6 additions & 4 deletions plugins/AmplitudeImposer/DistrhoPluginInfo.h
Expand Up @@ -25,17 +25,19 @@
#ifndef DISTRHO_PLUGIN_INFO_H_INCLUDED
#define DISTRHO_PLUGIN_INFO_H_INCLUDED

#define DISTRHO_PLUGIN_BRAND "DISTRHO"
#define DISTRHO_PLUGIN_NAME "Amplitude Imposr"
#define DISTRHO_PLUGIN_URI "http://www.niallmoody.com/ndcplugs/ampimposer.htm"
#define DISTRHO_PLUGIN_BRAND "DISTRHO"
#define DISTRHO_PLUGIN_NAME "Amplitude Imposr"
#define DISTRHO_PLUGIN_URI "http://www.niallmoody.com/ndcplugs/ampimposer.htm"
#define DISTRHO_PLUGIN_CLAP_ID "niallmoody.ndcplugs.ampimposer"

#define DISTRHO_PLUGIN_HAS_UI 1
#define DISTRHO_PLUGIN_IS_RT_SAFE 1
#define DISTRHO_PLUGIN_NUM_INPUTS 4
#define DISTRHO_PLUGIN_NUM_OUTPUTS 2
#define DISTRHO_PLUGIN_WANT_PROGRAMS 1

#define DISTRHO_PLUGIN_CLAP_FEATURES "audio-effect", "utility", "stereo"
#define DISTRHO_PLUGIN_LV2_CATEGORY "lv2:AmplifierPlugin"
#define DISTRHO_PLUGIN_VST3_CATEGORIES "Fx|Dynamics"
#define DISTRHO_PLUGIN_VST3_CATEGORIES "Fx|Dynamics|Stereo"

#endif // DISTRHO_PLUGIN_INFO_H_INCLUDED
8 changes: 2 additions & 6 deletions plugins/AmplitudeImposer/Makefile
Expand Up @@ -29,8 +29,10 @@ include ../../dpf/Makefile.plugins.mk
# --------------------------------------------------------------
# Enable all possible plugin types

TARGETS += clap
TARGETS += jack
TARGETS += ladspa
TARGETS += lv2_sep
TARGETS += vst2
TARGETS += vst3

Expand All @@ -40,12 +42,6 @@ TARGETS += dssi
endif
endif

ifeq ($(HAVE_CAIRO_OR_OPENGL),true)
TARGETS += lv2_sep
else
TARGETS += lv2_dsp
endif

all: $(TARGETS)

# --------------------------------------------------------------
10 changes: 7 additions & 3 deletions plugins/CycleShifter/DistrhoPluginInfo.h
Expand Up @@ -25,14 +25,18 @@
#ifndef DISTRHO_PLUGIN_INFO_H_INCLUDED
#define DISTRHO_PLUGIN_INFO_H_INCLUDED

#define DISTRHO_PLUGIN_BRAND "DISTRHO"
#define DISTRHO_PLUGIN_NAME "Cycle Shifter"
#define DISTRHO_PLUGIN_URI "http://www.niallmoody.com/ndcplugs/cycleshifter.htm"
#define DISTRHO_PLUGIN_BRAND "DISTRHO"
#define DISTRHO_PLUGIN_NAME "Cycle Shifter"
#define DISTRHO_PLUGIN_URI "http://www.niallmoody.com/ndcplugs/cycleshifter.htm"
#define DISTRHO_PLUGIN_CLAP_ID "niallmoody.ndcplugs.cycleshifter"

#define DISTRHO_PLUGIN_HAS_UI 1
#define DISTRHO_PLUGIN_IS_RT_SAFE 1
#define DISTRHO_PLUGIN_NUM_INPUTS 1
#define DISTRHO_PLUGIN_NUM_OUTPUTS 1
#define DISTRHO_PLUGIN_WANT_PROGRAMS 1

#define DISTRHO_PLUGIN_CLAP_FEATURES "audio-effect", "stereo"
#define DISTRHO_PLUGIN_VST3_CATEGORIES "Fx|Stereo"

#endif // DISTRHO_PLUGIN_INFO_H_INCLUDED
8 changes: 2 additions & 6 deletions plugins/CycleShifter/Makefile
Expand Up @@ -29,8 +29,10 @@ include ../../dpf/Makefile.plugins.mk
# --------------------------------------------------------------
# Enable all possible plugin types

TARGETS += clap
TARGETS += jack
TARGETS += ladspa
TARGETS += lv2_sep
TARGETS += vst2
TARGETS += vst3

Expand All @@ -40,12 +42,6 @@ TARGETS += dssi
endif
endif

ifeq ($(HAVE_CAIRO_OR_OPENGL),true)
TARGETS += lv2_sep
else
TARGETS += lv2_dsp
endif

all: $(TARGETS)

# --------------------------------------------------------------
7 changes: 4 additions & 3 deletions plugins/Kars/DistrhoPluginInfo.h
Expand Up @@ -17,9 +17,10 @@
#ifndef DISTRHO_PLUGIN_INFO_H_INCLUDED
#define DISTRHO_PLUGIN_INFO_H_INCLUDED

#define DISTRHO_PLUGIN_BRAND "DISTRHO"
#define DISTRHO_PLUGIN_NAME "Kars"
#define DISTRHO_PLUGIN_URI "http://distrho.sf.net/plugins/Kars"
#define DISTRHO_PLUGIN_BRAND "DISTRHO"
#define DISTRHO_PLUGIN_NAME "Kars"
#define DISTRHO_PLUGIN_URI "http://distrho.sf.net/plugins/Kars"
#define DISTRHO_PLUGIN_CLAP_ID "studio.kx.distrho.Kars"

#define DISTRHO_PLUGIN_HAS_UI 0
#define DISTRHO_PLUGIN_IS_RT_SAFE 1
Expand Down
2 changes: 1 addition & 1 deletion plugins/Kars/Makefile
Expand Up @@ -23,6 +23,6 @@ include ../../dpf/Makefile.plugins.mk
# --------------------------------------------------------------
# Enable all possible plugin types

all: jack dssi_dsp lv2_dsp vst2 vst3
all: jack dssi_dsp lv2_dsp vst2 vst3 clap

# --------------------------------------------------------------
10 changes: 6 additions & 4 deletions plugins/MVerb/DistrhoPluginInfo.h
@@ -1,7 +1,7 @@
/*
* DISTRHO MVerb, a DPF'ied MVerb.
* Copyright (c) 2010 Martin Eastwood
* Copyright (C) 2015 Filipe Coelho <falktx@falktx.com>
* Copyright (C) 2015-2022 Filipe Coelho <falktx@falktx.com>
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License as
Expand All @@ -19,16 +19,18 @@
#ifndef DISTRHO_PLUGIN_INFO_H_INCLUDED
#define DISTRHO_PLUGIN_INFO_H_INCLUDED

#define DISTRHO_PLUGIN_BRAND "DISTRHO"
#define DISTRHO_PLUGIN_NAME "MVerb"
#define DISTRHO_PLUGIN_URI "http://distrho.sf.net/plugins/MVerb"
#define DISTRHO_PLUGIN_BRAND "DISTRHO"
#define DISTRHO_PLUGIN_NAME "MVerb"
#define DISTRHO_PLUGIN_URI "http://distrho.sf.net/plugins/MVerb"
#define DISTRHO_PLUGIN_CLAP_ID "studio.kx.distrho.MVerb"

#define DISTRHO_PLUGIN_HAS_UI 1
#define DISTRHO_PLUGIN_IS_RT_SAFE 1
#define DISTRHO_PLUGIN_NUM_INPUTS 2
#define DISTRHO_PLUGIN_NUM_OUTPUTS 2
#define DISTRHO_PLUGIN_WANT_PROGRAMS 1

#define DISTRHO_PLUGIN_CLAP_FEATURES "audio-effect", "reverb", "stereo"
#define DISTRHO_PLUGIN_LV2_CATEGORY "lv2:ReverbPlugin"
#define DISTRHO_PLUGIN_VST3_CATEGORIES "Fx|Reverb"

Expand Down
6 changes: 1 addition & 5 deletions plugins/MVerb/Makefile
Expand Up @@ -28,11 +28,7 @@ include ../../dpf/Makefile.plugins.mk
# --------------------------------------------------------------
# Enable all possible plugin types

TARGETS += jack
TARGETS += ladspa
TARGETS += lv2_sep
TARGETS += vst2
TARGETS += vst3
TARGETS = jack ladspa lv2_sep vst2 vst3 clap

ifeq ($(HAVE_DGL),true)
ifeq ($(HAVE_LIBLO),true)
Expand Down
7 changes: 4 additions & 3 deletions plugins/Nekobi/DistrhoPluginInfo.h
Expand Up @@ -18,9 +18,10 @@
#ifndef DISTRHO_PLUGIN_INFO_H_INCLUDED
#define DISTRHO_PLUGIN_INFO_H_INCLUDED

#define DISTRHO_PLUGIN_BRAND "DISTRHO"
#define DISTRHO_PLUGIN_NAME "Nekobi"
#define DISTRHO_PLUGIN_URI "http://distrho.sf.net/plugins/Nekobi"
#define DISTRHO_PLUGIN_BRAND "DISTRHO"
#define DISTRHO_PLUGIN_NAME "Nekobi"
#define DISTRHO_PLUGIN_URI "http://distrho.sf.net/plugins/Nekobi"
#define DISTRHO_PLUGIN_CLAP_ID "studio.kx.distrho.Nekobi"

#define DISTRHO_PLUGIN_HAS_UI 1
#define DISTRHO_PLUGIN_IS_RT_SAFE 1
Expand Down
20 changes: 1 addition & 19 deletions plugins/Nekobi/Makefile
Expand Up @@ -35,24 +35,6 @@ LINK_FLAGS += -pthread
# --------------------------------------------------------------
# Enable all possible plugin types

TARGETS += jack
TARGETS += dssi_dsp

ifeq ($(HAVE_CAIRO_OR_OPENGL),true)
ifeq ($(HAVE_LIBLO),true)
TARGETS += dssi_ui
endif
endif

ifeq ($(HAVE_CAIRO_OR_OPENGL),true)
TARGETS += lv2_sep
else
TARGETS += lv2_dsp
endif

TARGETS += vst2
TARGETS += vst3

all: $(TARGETS)
all: jack dssi lv2_sep vst2 vst3 clap

# --------------------------------------------------------------
12 changes: 7 additions & 5 deletions plugins/PingPongPan/DistrhoPluginInfo.h
Expand Up @@ -17,17 +17,19 @@
#ifndef DISTRHO_PLUGIN_INFO_H_INCLUDED
#define DISTRHO_PLUGIN_INFO_H_INCLUDED

#define DISTRHO_PLUGIN_BRAND "DISTRHO"
#define DISTRHO_PLUGIN_NAME "Ping Pong Pan"
#define DISTRHO_PLUGIN_URI "http://distrho.sf.net/plugins/PingPongPan"
#define DISTRHO_PLUGIN_BRAND "DISTRHO"
#define DISTRHO_PLUGIN_NAME "Ping Pong Pan"
#define DISTRHO_PLUGIN_URI "http://distrho.sf.net/plugins/PingPongPan"
#define DISTRHO_PLUGIN_CLAP_ID "studio.kx.distrho.MVerb"

#define DISTRHO_PLUGIN_HAS_UI 1
#define DISTRHO_PLUGIN_IS_RT_SAFE 1
#define DISTRHO_PLUGIN_NUM_INPUTS 2
#define DISTRHO_PLUGIN_NUM_OUTPUTS 2
#define DISTRHO_PLUGIN_WANT_PROGRAMS 1

#define DISTRHO_PLUGIN_LV2_CATEGORY "lv2:SpatialPlugin"
#define DISTRHO_PLUGIN_VST3_CATEGORIES "Fx|EQ"
#define DISTRHO_PLUGIN_CLAP_FEATURES "audio-effect", "stereo"
#define DISTRHO_PLUGIN_LV2_CATEGORY "lv2:SpatialPlugin"
#define DISTRHO_PLUGIN_VST3_CATEGORIES "Fx|Spatial"

#endif // DISTRHO_PLUGIN_INFO_H_INCLUDED
11 changes: 1 addition & 10 deletions plugins/PingPongPan/Makefile
Expand Up @@ -29,23 +29,14 @@ include ../../dpf/Makefile.plugins.mk
# --------------------------------------------------------------
# Enable all possible plugin types

TARGETS += jack
TARGETS += ladspa
TARGETS += vst2
TARGETS += vst3
TARGETS = jack ladspa lv2_sep vst2 vst3 clap

ifeq ($(HAVE_CAIRO_OR_OPENGL),true)
ifeq ($(HAVE_LIBLO),true)
TARGETS += dssi
endif
endif

ifeq ($(HAVE_CAIRO_OR_OPENGL),true)
TARGETS += lv2_sep
else
TARGETS += lv2_dsp
endif

all: $(TARGETS)

# --------------------------------------------------------------
10 changes: 6 additions & 4 deletions plugins/ProM/DistrhoPluginInfo.h
Expand Up @@ -17,9 +17,10 @@
#ifndef DISTRHO_PLUGIN_INFO_H_INCLUDED
#define DISTRHO_PLUGIN_INFO_H_INCLUDED

#define DISTRHO_PLUGIN_BRAND "DISTRHO"
#define DISTRHO_PLUGIN_NAME "ProM"
#define DISTRHO_PLUGIN_URI "http://distrho.sf.net/plugins/ProM"
#define DISTRHO_PLUGIN_BRAND "DISTRHO"
#define DISTRHO_PLUGIN_NAME "ProM"
#define DISTRHO_PLUGIN_URI "http://distrho.sf.net/plugins/ProM"
#define DISTRHO_PLUGIN_CLAP_ID "studio.kx.distrho.ProM"

#define DISTRHO_PLUGIN_HAS_UI 1
#define DISTRHO_PLUGIN_NUM_INPUTS 2
Expand All @@ -29,7 +30,8 @@
// required by projectM
#define DISTRHO_PLUGIN_WANT_DIRECT_ACCESS 1

#define DISTRHO_PLUGIN_LV2_CATEGORY "lv2:AnalyserPlugin"
#define DISTRHO_PLUGIN_CLAP_FEATURES "analyzer", "stereo"
#define DISTRHO_PLUGIN_LV2_CATEGORY "lv2:AnalyserPlugin"
#define DISTRHO_PLUGIN_VST3_CATEGORIES "Fx|Analyzer"

#endif // DISTRHO_PLUGIN_INFO_H_INCLUDED
3 changes: 2 additions & 1 deletion plugins/ProM/Makefile
Expand Up @@ -107,6 +107,7 @@ endif # !HAVE_PROJECTM
# Do some magic

UI_TYPE = opengl3
USE_CLAP_BUNDLE = true
USE_VST2_BUNDLE = true
include ../../dpf/Makefile.plugins.mk

Expand Down Expand Up @@ -205,7 +206,7 @@ LINK_FLAGS += -lpthread
# --------------------------------------------------------------
# Enable all possible plugin types

TARGETS = lv2 vst2 vst3
TARGETS = lv2 vst2 vst3 clap

all: $(TARGETS)

Expand Down
10 changes: 6 additions & 4 deletions plugins/SoulForce/DistrhoPluginInfo.h
Expand Up @@ -25,17 +25,19 @@
#ifndef DISTRHO_PLUGIN_INFO_H_INCLUDED
#define DISTRHO_PLUGIN_INFO_H_INCLUDED

#define DISTRHO_PLUGIN_BRAND "DISTRHO"
#define DISTRHO_PLUGIN_NAME "Soul Force"
#define DISTRHO_PLUGIN_URI "http://www.niallmoody.com/ndcplugs/soulforce.htm"
#define DISTRHO_PLUGIN_BRAND "DISTRHO"
#define DISTRHO_PLUGIN_NAME "Soul Force"
#define DISTRHO_PLUGIN_URI "http://www.niallmoody.com/ndcplugs/soulforce.htm"
#define DISTRHO_PLUGIN_CLAP_ID "niallmoody.ndcplugs.soulforce"

#define DISTRHO_PLUGIN_HAS_UI 1
#define DISTRHO_PLUGIN_IS_RT_SAFE 1
#define DISTRHO_PLUGIN_NUM_INPUTS 2
#define DISTRHO_PLUGIN_NUM_OUTPUTS 2
#define DISTRHO_PLUGIN_WANT_PROGRAMS 1

#define DISTRHO_PLUGIN_CLAP_FEATURES "audio-effect", "distortion", "stereo"
#define DISTRHO_PLUGIN_LV2_CATEGORY "lv2:WaveshaperPlugin"
#define DISTRHO_PLUGIN_VST3_CATEGORIES "Fx|Distortion"
#define DISTRHO_PLUGIN_VST3_CATEGORIES "Fx|Distortion|Stereo"

#endif // DISTRHO_PLUGIN_INFO_H_INCLUDED
8 changes: 2 additions & 6 deletions plugins/SoulForce/Makefile
Expand Up @@ -29,8 +29,10 @@ include ../../dpf/Makefile.plugins.mk
# --------------------------------------------------------------
# Enable all possible plugin types

TARGETS += clap
TARGETS += jack
TARGETS += ladspa
TARGETS += lv2_sep
TARGETS += vst2
TARGETS += vst3

Expand All @@ -40,12 +42,6 @@ TARGETS += dssi
endif
endif

ifeq ($(HAVE_CAIRO_OR_OPENGL),true)
TARGETS += lv2_sep
else
TARGETS += lv2_dsp
endif

all: $(TARGETS)

# --------------------------------------------------------------
10 changes: 6 additions & 4 deletions plugins/bitcrush/DistrhoPluginInfo.h
Expand Up @@ -17,16 +17,18 @@
#ifndef DISTRHO_PLUGIN_INFO_H_INCLUDED
#define DISTRHO_PLUGIN_INFO_H_INCLUDED

#define DISTRHO_PLUGIN_BRAND "DISTRHO"
#define DISTRHO_PLUGIN_NAME "MaBitcrush"
#define DISTRHO_PLUGIN_URI "http://distrho.sf.net/plugins/MaBitcrush"
#define DISTRHO_PLUGIN_BRAND "DISTRHO"
#define DISTRHO_PLUGIN_NAME "MaBitcrush"
#define DISTRHO_PLUGIN_URI "http://distrho.sf.net/plugins/MaBitcrush"
#define DISTRHO_PLUGIN_CLAP_ID "studio.kx.distrho.MaBitcrush"

#define DISTRHO_PLUGIN_HAS_UI 0
#define DISTRHO_PLUGIN_IS_RT_SAFE 0
#define DISTRHO_PLUGIN_NUM_INPUTS 1
#define DISTRHO_PLUGIN_NUM_OUTPUTS 2

#define DISTRHO_PLUGIN_LV2_CATEGORY "lv2:DistortionPlugin"
#define DISTRHO_PLUGIN_CLAP_FEATURES "audio-effect", "distortion", "stereo"
#define DISTRHO_PLUGIN_LV2_CATEGORY "lv2:DistortionPlugin"
#define DISTRHO_PLUGIN_VST3_CATEGORIES "Fx|Distortion"

#define DISTRHO_PLUGIN_DESCRIPTION "Max Gen Bitcrush example."
Expand Down
8 changes: 1 addition & 7 deletions plugins/bitcrush/Makefile
Expand Up @@ -29,12 +29,6 @@ BUILD_CXX_FLAGS += -Wno-unused-parameter
# --------------------------------------------------------------
# Enable all possible plugin types

TARGETS += jack
TARGETS += ladspa
TARGETS += lv2_dsp
TARGETS += vst2
TARGETS += vst3

all: $(TARGETS)
all: jack ladspa lv2_dsp vst2 vst3 clap

# --------------------------------------------------------------
10 changes: 6 additions & 4 deletions plugins/freeverb/DistrhoPluginInfo.h
Expand Up @@ -17,16 +17,18 @@
#ifndef DISTRHO_PLUGIN_INFO_H_INCLUDED
#define DISTRHO_PLUGIN_INFO_H_INCLUDED

#define DISTRHO_PLUGIN_BRAND "DISTRHO"
#define DISTRHO_PLUGIN_NAME "MaFreeverb"
#define DISTRHO_PLUGIN_URI "http://distrho.sf.net/plugins/MaFreeverb"
#define DISTRHO_PLUGIN_BRAND "DISTRHO"
#define DISTRHO_PLUGIN_NAME "MaFreeverb"
#define DISTRHO_PLUGIN_URI "http://distrho.sf.net/plugins/MaFreeverb"
#define DISTRHO_PLUGIN_CLAP_ID "studio.kx.distrho.MaFreeverb"

#define DISTRHO_PLUGIN_HAS_UI 0
#define DISTRHO_PLUGIN_IS_RT_SAFE 0
#define DISTRHO_PLUGIN_NUM_INPUTS 1
#define DISTRHO_PLUGIN_NUM_OUTPUTS 1

#define DISTRHO_PLUGIN_LV2_CATEGORY "lv2:ReverbPlugin"
#define DISTRHO_PLUGIN_CLAP_FEATURES "audio-effect", "reverb", "stereo"
#define DISTRHO_PLUGIN_LV2_CATEGORY "lv2:ReverbPlugin"
#define DISTRHO_PLUGIN_VST3_CATEGORIES "Fx|Reverb"

#define DISTRHO_PLUGIN_DESCRIPTION "Max Gen Freeverb example."
Expand Down
8 changes: 1 addition & 7 deletions plugins/freeverb/Makefile
Expand Up @@ -29,12 +29,6 @@ BUILD_CXX_FLAGS += -Wno-unused-parameter
# --------------------------------------------------------------
# Enable all possible plugin types

TARGETS += jack
TARGETS += ladspa
TARGETS += lv2_dsp
TARGETS += vst2
TARGETS += vst3

all: $(TARGETS)
all: jack ladspa lv2_dsp vst2 vst3 clap

# --------------------------------------------------------------
10 changes: 6 additions & 4 deletions plugins/gigaverb/DistrhoPluginInfo.h
Expand Up @@ -17,16 +17,18 @@
#ifndef DISTRHO_PLUGIN_INFO_H_INCLUDED
#define DISTRHO_PLUGIN_INFO_H_INCLUDED

#define DISTRHO_PLUGIN_BRAND "DISTRHO"
#define DISTRHO_PLUGIN_NAME "MaGigaverb"
#define DISTRHO_PLUGIN_URI "http://distrho.sf.net/plugins/MaGigaverb"
#define DISTRHO_PLUGIN_BRAND "DISTRHO"
#define DISTRHO_PLUGIN_NAME "MaGigaverb"
#define DISTRHO_PLUGIN_URI "http://distrho.sf.net/plugins/MaGigaverb"
#define DISTRHO_PLUGIN_CLAP_ID "studio.kx.distrho.MaGigaverb"

#define DISTRHO_PLUGIN_HAS_UI 0
#define DISTRHO_PLUGIN_IS_RT_SAFE 0
#define DISTRHO_PLUGIN_NUM_INPUTS 2
#define DISTRHO_PLUGIN_NUM_OUTPUTS 2

#define DISTRHO_PLUGIN_LV2_CATEGORY "lv2:ReverbPlugin"
#define DISTRHO_PLUGIN_CLAP_FEATURES "audio-effect", "reverb", "stereo"
#define DISTRHO_PLUGIN_LV2_CATEGORY "lv2:ReverbPlugin"
#define DISTRHO_PLUGIN_VST3_CATEGORIES "Fx|Reverb"

#define DISTRHO_PLUGIN_DESCRIPTION "Max Gen Gigaverb example."
Expand Down
8 changes: 1 addition & 7 deletions plugins/gigaverb/Makefile
Expand Up @@ -29,12 +29,6 @@ BUILD_CXX_FLAGS += -Wno-unused-parameter
# --------------------------------------------------------------
# Enable all possible plugin types

TARGETS += jack
TARGETS += ladspa
TARGETS += lv2_dsp
TARGETS += vst2
TARGETS += vst3

all: $(TARGETS)
all: jack ladspa lv2_dsp vst2 vst3 clap

# --------------------------------------------------------------
8 changes: 5 additions & 3 deletions plugins/glBars/DistrhoPluginInfo.h
Expand Up @@ -21,14 +21,16 @@
#ifndef DISTRHO_PLUGIN_INFO_H_INCLUDED
#define DISTRHO_PLUGIN_INFO_H_INCLUDED

#define DISTRHO_PLUGIN_BRAND "DISTRHO"
#define DISTRHO_PLUGIN_NAME "glBars"
#define DISTRHO_PLUGIN_URI "http://distrho.sf.net/plugins/glBars"
#define DISTRHO_PLUGIN_BRAND "DISTRHO"
#define DISTRHO_PLUGIN_NAME "glBars"
#define DISTRHO_PLUGIN_URI "http://distrho.sf.net/plugins/glBars"
#define DISTRHO_PLUGIN_CLAP_ID "studio.kx.distrho.glBars"

#define DISTRHO_PLUGIN_HAS_UI 1
#define DISTRHO_PLUGIN_NUM_INPUTS 1
#define DISTRHO_PLUGIN_NUM_OUTPUTS 1
#define DISTRHO_PLUGIN_WANT_DIRECT_ACCESS 1
#define DISTRHO_PLUGIN_CLAP_FEATURES "analyzer", "stereo"
#define DISTRHO_PLUGIN_LV2_CATEGORY "lv2:AnalyserPlugin"
#define DISTRHO_PLUGIN_VST3_CATEGORIES "Fx|Analyzer"
#define DISTRHO_UI_USER_RESIZABLE 1
Expand Down
2 changes: 1 addition & 1 deletion plugins/glBars/Makefile
Expand Up @@ -32,7 +32,7 @@ LINK_FLAGS += -lpthread
# --------------------------------------------------------------
# Enable all possible plugin types

TARGETS = jack lv2 vst2 vst3
TARGETS = jack lv2 vst2 vst3 clap

all: $(TARGETS)

Expand Down
10 changes: 6 additions & 4 deletions plugins/pitchshift/DistrhoPluginInfo.h
Expand Up @@ -17,16 +17,18 @@
#ifndef DISTRHO_PLUGIN_INFO_H_INCLUDED
#define DISTRHO_PLUGIN_INFO_H_INCLUDED

#define DISTRHO_PLUGIN_BRAND "DISTRHO"
#define DISTRHO_PLUGIN_NAME "MaPitchshift"
#define DISTRHO_PLUGIN_URI "http://distrho.sf.net/plugins/MaPitchshift"
#define DISTRHO_PLUGIN_BRAND "DISTRHO"
#define DISTRHO_PLUGIN_NAME "MaPitchshift"
#define DISTRHO_PLUGIN_URI "http://distrho.sf.net/plugins/MaPitchshift"
#define DISTRHO_PLUGIN_CLAP_ID "studio.kx.distrho.MaPitchshift"

#define DISTRHO_PLUGIN_HAS_UI 0
#define DISTRHO_PLUGIN_IS_RT_SAFE 0
#define DISTRHO_PLUGIN_NUM_INPUTS 1
#define DISTRHO_PLUGIN_NUM_OUTPUTS 2

#define DISTRHO_PLUGIN_LV2_CATEGORY "lv2:PitchPlugin"
#define DISTRHO_PLUGIN_CLAP_FEATURES "audio-effect", "pitch-shifter", "stereo"
#define DISTRHO_PLUGIN_LV2_CATEGORY "lv2:PitchPlugin"
#define DISTRHO_PLUGIN_VST3_CATEGORIES "Fx|Pitch Shift"

#define DISTRHO_PLUGIN_DESCRIPTION "Max Gen Pitchshifter example."
Expand Down
8 changes: 1 addition & 7 deletions plugins/pitchshift/Makefile
Expand Up @@ -29,12 +29,6 @@ BUILD_CXX_FLAGS += -Wno-unused-parameter
# --------------------------------------------------------------
# Enable all possible plugin types

TARGETS += jack
TARGETS += ladspa
TARGETS += lv2_dsp
TARGETS += vst2
TARGETS += vst3

all: $(TARGETS)
all: jack ladspa lv2_dsp vst2 vst3 clap

# --------------------------------------------------------------