Browse Source

Update all plugins, enable clap

Signed-off-by: falkTX <falktx@falktx.com>
tags/v1.6
falkTX 2 years ago
parent
commit
39c6c214c8
Signed by: falkTX <falktx@falktx.com> GPG Key ID: CDBAA37ABC74FBA0
75 changed files with 3541 additions and 1152 deletions
  1. +14
    -4
      Makefile
  2. +6
    -9
      dpf/LICENSING.md
  3. +58
    -2
      dpf/Makefile.base.mk
  4. +2
    -1
      dpf/README.md
  5. +20
    -11
      dpf/dgl/NanoVG.hpp
  6. +1
    -1
      dpf/dgl/Window.hpp
  7. +91
    -6
      dpf/dgl/src/NanoVG.cpp
  8. +2
    -2
      dpf/dgl/src/WindowPrivateData.cpp
  9. +21
    -18
      dpf/distrho/DistrhoInfo.hpp
  10. +3
    -0
      dpf/distrho/DistrhoUI.hpp
  11. +1
    -1
      dpf/distrho/src/DistrhoPlugin.cpp
  12. +1330
    -180
      dpf/distrho/src/DistrhoPluginCLAP.cpp
  13. +26
    -1
      dpf/distrho/src/DistrhoPluginJACK.cpp
  14. +330
    -266
      dpf/distrho/src/DistrhoPluginVST2.cpp
  15. +38
    -12
      dpf/distrho/src/DistrhoUI.cpp
  16. +9
    -9
      dpf/distrho/src/DistrhoUIInternal.hpp
  17. +12
    -8
      dpf/distrho/src/DistrhoUILV2.cpp
  18. +6
    -6
      dpf/distrho/src/DistrhoUIPrivateData.hpp
  19. +3
    -3
      dpf/distrho/src/DistrhoUIVST3.cpp
  20. +3
    -3
      dpf/distrho/src/clap/entry.h
  21. +5
    -3
      dpf/distrho/src/clap/events.h
  22. +7
    -7
      dpf/distrho/src/clap/ext/audio-ports.h
  23. +24
    -20
      dpf/distrho/src/clap/ext/gui.h
  24. +28
    -0
      dpf/distrho/src/clap/ext/latency.h
  25. +78
    -0
      dpf/distrho/src/clap/ext/note-ports.h
  26. +54
    -22
      dpf/distrho/src/clap/ext/params.h
  27. +33
    -0
      dpf/distrho/src/clap/ext/state.h
  28. +51
    -0
      dpf/distrho/src/clap/ext/thread-check.h
  29. +29
    -0
      dpf/distrho/src/clap/ext/timer-support.h
  30. +4
    -4
      dpf/distrho/src/clap/host.h
  31. +7
    -6
      dpf/distrho/src/clap/plugin-factory.h
  32. +14
    -14
      dpf/distrho/src/clap/plugin.h
  33. +8
    -0
      dpf/distrho/src/clap/private/macros.h
  34. +3
    -2
      dpf/distrho/src/clap/process.h
  35. +26
    -0
      dpf/distrho/src/clap/stream.h
  36. +3
    -2
      dpf/distrho/src/jackbridge/RtAudioBridge.hpp
  37. +0
    -336
      dpf/distrho/src/vestige/vestige.h
  38. +11
    -0
      dpf/distrho/src/xaymar-vst2/LICENSE
  39. +21
    -0
      dpf/distrho/src/xaymar-vst2/README.md
  40. +1012
    -0
      dpf/distrho/src/xaymar-vst2/vst.h
  41. +1
    -1
      dpf/dpf.doxygen
  42. +11
    -2
      dpf/utils/package-osx-bundles.sh
  43. +4
    -0
      dpf/utils/plugin.pkg/package.xml.in
  44. +6
    -4
      plugins/3BandEQ/DistrhoPluginInfo.h
  45. +1
    -10
      plugins/3BandEQ/Makefile
  46. +6
    -4
      plugins/3BandSplitter/DistrhoPluginInfo.h
  47. +1
    -10
      plugins/3BandSplitter/Makefile
  48. +25
    -29
      plugins/AmplitudeImposer/DistrhoPluginAmplitudeImposer.cpp
  49. +0
    -1
      plugins/AmplitudeImposer/DistrhoPluginAmplitudeImposer.hpp
  50. +6
    -4
      plugins/AmplitudeImposer/DistrhoPluginInfo.h
  51. +2
    -6
      plugins/AmplitudeImposer/Makefile
  52. +7
    -3
      plugins/CycleShifter/DistrhoPluginInfo.h
  53. +2
    -6
      plugins/CycleShifter/Makefile
  54. +4
    -3
      plugins/Kars/DistrhoPluginInfo.h
  55. +1
    -1
      plugins/Kars/Makefile
  56. +6
    -4
      plugins/MVerb/DistrhoPluginInfo.h
  57. +1
    -5
      plugins/MVerb/Makefile
  58. +4
    -3
      plugins/Nekobi/DistrhoPluginInfo.h
  59. +1
    -19
      plugins/Nekobi/Makefile
  60. +7
    -5
      plugins/PingPongPan/DistrhoPluginInfo.h
  61. +1
    -10
      plugins/PingPongPan/Makefile
  62. +6
    -4
      plugins/ProM/DistrhoPluginInfo.h
  63. +2
    -1
      plugins/ProM/Makefile
  64. +6
    -4
      plugins/SoulForce/DistrhoPluginInfo.h
  65. +2
    -6
      plugins/SoulForce/Makefile
  66. +6
    -4
      plugins/bitcrush/DistrhoPluginInfo.h
  67. +1
    -7
      plugins/bitcrush/Makefile
  68. +6
    -4
      plugins/freeverb/DistrhoPluginInfo.h
  69. +1
    -7
      plugins/freeverb/Makefile
  70. +6
    -4
      plugins/gigaverb/DistrhoPluginInfo.h
  71. +1
    -7
      plugins/gigaverb/Makefile
  72. +5
    -3
      plugins/glBars/DistrhoPluginInfo.h
  73. +1
    -1
      plugins/glBars/Makefile
  74. +6
    -4
      plugins/pitchshift/DistrhoPluginInfo.h
  75. +1
    -7
      plugins/pitchshift/Makefile

+ 14
- 4
Makefile View File

@@ -79,18 +79,26 @@ ifneq ($(HAVE_PROJECTM),true)
ln -sf $(CURDIR)/plugins/ProM/projectM/presets/presets_* bin/ProM.lv2/resources/presets/

ifeq ($(MACOS),true)
# VST2 fonts
# CLAP + VST2 fonts
install -d bin/ProM.clap/Contents/Resources/fonts
install -d bin/ProM.vst/Contents/Resources/fonts
ln -sf $(CURDIR)/plugins/ProM/projectM/fonts/*.ttf bin/ProM.clap/Contents/Resources/fonts/
ln -sf $(CURDIR)/plugins/ProM/projectM/fonts/*.ttf bin/ProM.vst/Contents/Resources/fonts/
# VST2 presets
# CLAP + VST2 presets
install -d bin/ProM.clap/Contents/Resources/presets
install -d bin/ProM.vst/Contents/Resources/presets
ln -sf $(CURDIR)/plugins/ProM/projectM/presets/presets_* bin/ProM.clap/Contents/Resources/presets/
ln -sf $(CURDIR)/plugins/ProM/projectM/presets/presets_* bin/ProM.vst/Contents/Resources/presets/
else
# VST2 fonts
# CLAP + VST2 fonts
install -d bin/ProM.clap/resources/fonts
install -d bin/ProM.vst/resources/fonts
ln -sf $(CURDIR)/plugins/ProM/projectM/fonts/*.ttf bin/ProM.clap/resources/fonts/
ln -sf $(CURDIR)/plugins/ProM/projectM/fonts/*.ttf bin/ProM.vst/resources/fonts/
# VST2 presets
# CLAP + VST2 presets
install -d bin/ProM.clap/resources/presets
install -d bin/ProM.vst/resources/presets
ln -sf $(CURDIR)/plugins/ProM/projectM/presets/presets_* bin/ProM.clap/resources/presets/
ln -sf $(CURDIR)/plugins/ProM/projectM/presets/presets_* bin/ProM.vst/resources/presets/
endif

@@ -160,6 +168,7 @@ install:
install -d $(DESTDIR)$(PREFIX)/lib/lv2/
install -d $(DESTDIR)$(PREFIX)/lib/vst/
install -d $(DESTDIR)$(PREFIX)/lib/vst3/
install -d $(DESTDIR)$(PREFIX)/lib/clap/
install -d $(DESTDIR)$(PREFIX)/bin/

install -m 644 bin/*-ladspa.* $(DESTDIR)$(PREFIX)/lib/ladspa/
@@ -176,6 +185,7 @@ ifeq ($(HAVE_OPENGL),true)
cp -rL bin/*.vst $(DESTDIR)$(PREFIX)/lib/vst/
endif # HAVE_OPENGL
cp -rL bin/*.vst3 $(DESTDIR)$(PREFIX)/lib/vst3/
cp -rL bin/*.clap $(DESTDIR)$(PREFIX)/lib/clap/

install -m 755 bin/Kars$(APP_EXT) $(DESTDIR)$(PREFIX)/bin/
install -m 755 bin/3BandEQ$(APP_EXT) $(DESTDIR)$(PREFIX)/bin/


+ 6
- 9
dpf/LICENSING.md View File

@@ -2,8 +2,7 @@

Even though DPF is quite liberally licensed, not all plugin formats follow the same ideals.
This is usually due to plugin APIs/headers being tied to a specific license or having commercial restrictions.
This file describes the licensing that applies to each individual plugin format as a way to make it clear what is possible and compatible.
Note that if you are making GPLv2+ licensed plugins this does not apply to you, as so far everything is GPLv2+ compatible.
This file describes the licensing that applies to each individual plugin format as a way to make it clear what is possible and compatible.

Regardless of target format, DPF itself needs to be mentioned in attribution.
See the [LICENSE](LICENSE) file for copyright details.
@@ -14,8 +13,9 @@ See the [LICENSE](LICENSE) file for copyright details.
| LADSPA | LGPLv2.1+ | ??? (*) | 2000-2002 Richard W. E. Furse, Paul Barton-Davis, Stefan Westerfeld |
| DSSI | LGPLv2.1+ | ??? (*) | **DSSI**: 2004, 2009 Chris Cannam, Steve Harris and Sean Bolton;<br/> **ALSA**: 1998-2001 Jaroslav Kysela, Abramo Bagnara, Takashi Iwai |
| LV2 | ISC | Copyright attribution | 2006-2020 Steve Harris, David Robillard;<br/> 2000-2002 Richard W.E. Furse, Paul Barton-Davis, Stefan Westerfeld |
| VST2 | GPLv2+ or commercial | Must be GPLv2+ compatible or alternatively use Steinberg VST2 SDK (no longer available for new plugins) | GPLv2+ compatible license or custom agreement with Steinberg |
| VST2 | BSD-3 | Copyright attribution | 2020-2022 Michael Fabian 'Xaymar' Dirks |
| VST3 | ISC | Copyright attribution | (none, only DPF files used) |
| CLAP | MIT | Copyright attribution | 2014-2022 Alexandre Bique |

### LADSPA and DSSI special note

@@ -32,12 +32,9 @@ These formats are very limited and not much used anymore anyway, feel free to sk

### VST2 special note

By default DPF uses the free reverse-engineered [vestige header](distrho/src/vestige/vestige.h) file.
This file is GPLv2+ licensed, so that applies to plugins built with it as well.
You can alternatively build DPF-based VST2 plugins using the official Steinberg VST2 SDK,
simply set the `VESTIGE_HEADER` compiler macro to `0` during build.
You will need to provide your own VST2 SDK files then, as DPF does not ship with them.
Note there are legal issues surrounding releasing new VST2 plugins using the official SDK, as that is no longer supported by Steinberg.
The DPF's VST2 implementation uses https://github.com/Xaymar/vst2sdk which is a liberally-licensed "clean room" untainted reverse engineered "SDK" for the VST2 interface.
Previously "vestige" was used, but was problematic due to it being GPLv2 licensed.
With the Xaymar's work, both open-source and proprietary plugins can be created from the same source, which helps in maintenance on DPF side.

### VST3 special note



+ 58
- 2
dpf/Makefile.base.mk View File

@@ -35,7 +35,11 @@ DPF_MAKEFILE_BASE_INCLUDED = true
# ---------------------------------------------------------------------------------------------------------------------
# Auto-detect target compiler if not defined

ifeq ($(shell echo '\#test' | grep -- '\#test'),\#test)
TARGET_COMPILER = $(shell echo '\#ifdef __clang__\nclang\n\#else\ngcc\n\#endif' | $(CC) -E -P -x c - 2>/dev/null)
else
TARGET_COMPILER = $(shell echo '#ifdef __clang__\nclang\n#else\ngcc\n#endif' | $(CC) -E -P -x c - 2>/dev/null)
endif

ifneq ($(CLANG),true)
ifneq ($(GCC),true)
@@ -119,6 +123,9 @@ ifneq (,$(filter aarch64%,$(TARGET_PROCESSOR)))
CPU_ARM64 = true
CPU_ARM_OR_ARM64 = true
endif
ifneq (,$(filter riscv64%,$(TARGET_PROCESSOR)))
CPU_RISCV64 = true
endif

ifeq ($(CPU_ARM),true)
ifneq ($(CPU_ARM64),true)
@@ -246,8 +253,7 @@ else ifeq ($(WASM),true)
LINK_OPTS += -O3
LINK_OPTS += -Wl,--gc-sections
else
LINK_OPTS += -Wl,-O1,--gc-sections
LINK_OPTS += -Wl,--as-needed
LINK_OPTS += -Wl,-O1,--as-needed,--gc-sections
endif

ifneq ($(SKIP_STRIPPING),true)
@@ -658,6 +664,8 @@ features:
$(call print_available,CPU_ARM_OR_ARM64)
$(call print_available,CPU_I386)
$(call print_available,CPU_I386_OR_X86_64)
$(call print_available,CPU_RISCV64)
$(call print_available,CPU_X86_64)
@echo === Detected OS
$(call print_available,BSD)
$(call print_available,HAIKU)
@@ -677,6 +685,7 @@ features:
$(call print_available,HAVE_DBUS)
$(call print_available,HAVE_CAIRO)
$(call print_available,HAVE_DGL)
$(call print_available,HAVE_JACK)
$(call print_available,HAVE_LIBLO)
$(call print_available,HAVE_OPENGL)
$(call print_available,HAVE_PULSEAUDIO)
@@ -689,6 +698,53 @@ features:
$(call print_available,HAVE_XEXT)
$(call print_available,HAVE_XRANDR)

# ---------------------------------------------------------------------------------------------------------------------
# Extra rules for MOD Audio stuff

# NOTE: note path must be absolute
MOD_WORKDIR ?= $(HOME)/mod-workdir
MOD_ENVIRONMENT = \
AR=${1}/host/usr/bin/${2}-gcc-ar \
CC=${1}/host/usr/bin/${2}-gcc \
CPP=${1}/host/usr/bin/${2}-cpp \
CXX=${1}/host/usr/bin/${2}-g++ \
LD=${1}/host/usr/bin/${2}-ld \
PKG_CONFIG=${1}/host/usr/bin/pkg-config \
STRIP=${1}/host/usr/bin/${2}-strip \
CFLAGS="-I${1}/staging/usr/include $(EXTRA_MOD_FLAGS)" \
CPPFLAGS= \
CXXFLAGS="-I${1}/staging/usr/include $(EXTRA_MOD_FLAGS)" \
LDFLAGS="-L${1}/staging/usr/lib $(EXTRA_MOD_FLAGS)" \
EXE_WRAPPER="qemu-${3}-static -L ${1}/target" \
NOOPT=true

modduo:
$(MAKE) $(call MOD_ENVIRONMENT,$(MOD_WORKDIR)/modduo-static,arm-mod-linux-gnueabihf.static,arm)

modduox:
$(MAKE) $(call MOD_ENVIRONMENT,$(MOD_WORKDIR)/modduox-static,aarch64-mod-linux-gnueabi.static,aarch64)

moddwarf:
$(MAKE) $(call MOD_ENVIRONMENT,$(MOD_WORKDIR)/moddwarf,aarch64-mod-linux-gnu,aarch64)

modpush:
tar -C bin -cz $(subst bin/,,$(wildcard bin/*.lv2)) | base64 | curl -F 'package=@-' http://192.168.51.1/sdk/install && echo

ifneq (,$(findstring modduo-,$(MAKECMDGOALS)))
$(MAKECMDGOALS):
$(MAKE) $(call MOD_ENVIRONMENT,$(MOD_WORKDIR)/modduo,arm-mod-linux-gnueabihf,arm) $(subst modduo-,,$(MAKECMDGOALS))
endif

ifneq (,$(findstring modduox-,$(MAKECMDGOALS)))
$(MAKECMDGOALS):
$(MAKE) $(call MOD_ENVIRONMENT,$(MOD_WORKDIR)/modduox,aarch64-mod-linux-gnueabi,aarch64) $(subst modduox-,,$(MAKECMDGOALS))
endif

ifneq (,$(findstring moddwarf-,$(MAKECMDGOALS)))
$(MAKECMDGOALS):
$(MAKE) $(call MOD_ENVIRONMENT,$(MOD_WORKDIR)/moddwarf,aarch64-mod-linux-gnu,aarch64) $(subst moddwarf-,,$(MAKECMDGOALS))
endif

# ---------------------------------------------------------------------------------------------------------------------
# Protect against multiple inclusion



+ 2
- 1
dpf/README.md View File

@@ -7,7 +7,7 @@ DPF is designed to make development of new plugins an easy and enjoyable task.<b
It allows developers to create plugins with custom UIs using a simple C++ API.<br/>
The framework facilitates exporting various different plugin formats from the same code-base.<br/>

DPF can build for LADSPA, DSSI, LV2, VST2 and VST3 formats.<br/>
DPF can build for LADSPA, DSSI, LV2, VST2, VST3 and CLAP formats.<br/>
All current plugin format implementations are complete.<br/>
A JACK/Standalone mode is also available, allowing you to quickly test plugins.<br/>

@@ -44,6 +44,7 @@ Online help and discussion about DPF happens in the [kx.studio chat, DPF room](h
- [DISTRHO ProM](https://github.com/DISTRHO/ProM)
- [Dragonfly Reverb](https://michaelwillis.github.io/dragonfly-reverb)
- [Fogpad-port](https://github.com/linuxmao-org/fogpad-port)
- [master_me](https://github.com/trummerschlunk/master_me)
- [Ninjas2](https://github.com/rghvdberg/ninjas2)
- [osamc-lv2-workshop](https://github.com/osamc-lv2-workshop/lv2-workshop) (simple plugins code examples)
- [QuadraFuzz](https://github.com/jpcima/quadrafuzz)


+ 20
- 11
dpf/dgl/NanoVG.hpp View File

@@ -319,10 +319,9 @@ public:

/**
Constructor reusing a NanoVG context, used for subwidgets.
Context will not be deleted on class destructor.
*/
/*
NanoVG(NanoWidget* groupWidget);
*/
explicit NanoVG(NVGcontext* context);

/**
Destructor.
@@ -917,7 +916,17 @@ public:
Constructor for a NanoSubWidget.
@see CreateFlags
*/
explicit NanoBaseWidget(Widget* parentGroupWidget, int flags = CREATE_ANTIALIAS);
explicit NanoBaseWidget(Widget* parentWidget, int flags = CREATE_ANTIALIAS);

/**
Constructor for a NanoSubWidget reusing a parent subwidget nanovg context.
*/
explicit NanoBaseWidget(NanoBaseWidget<SubWidget>* parentWidget);

/**
Constructor for a NanoSubWidget reusing a parent top-level-widget nanovg context.
*/
explicit NanoBaseWidget(NanoBaseWidget<TopLevelWidget>* parentWidget);

/**
Constructor for a NanoTopLevelWidget.
@@ -954,13 +963,7 @@ private:
Widget display function.
Implemented internally to wrap begin/endFrame() automatically.
*/
inline void onDisplay() override
{
// NOTE maybe should use BaseWidget::getWindow().getScaleFactor() as 3rd arg ?
NanoVG::beginFrame(BaseWidget::getWidth(), BaseWidget::getHeight());
onNanoDisplay();
NanoVG::endFrame();
}
void onDisplay() override;

// these should not be used
void beginFrame(uint,uint) {}
@@ -969,6 +972,12 @@ private:
void cancelFrame() {}
void endFrame() {}

/** @internal */
const bool fUsingParentContext;
void displayChildren();
friend class NanoBaseWidget<TopLevelWidget>;
friend class NanoBaseWidget<StandaloneWindow>;

DISTRHO_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR(NanoBaseWidget)
};



+ 1
- 1
dpf/dgl/Window.hpp View File

@@ -541,7 +541,7 @@ private:
uint height,
double scaleFactor,
bool resizable,
bool isVST3,
bool usesSizeRequest,
bool doPostInit);

DISTRHO_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR(Window)


+ 91
- 6
dpf/dgl/src/NanoVG.cpp View File

@@ -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);
@@ -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>;

// -----------------------------------------------------------------------
@@ -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>;

@@ -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>;



+ 2
- 2
dpf/dgl/src/WindowPrivateData.cpp View File

@@ -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),
@@ -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),


+ 21
- 18
dpf/distrho/DistrhoInfo.hpp View File

@@ -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
@@ -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;
@@ -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;
}
}

@@ -389,10 +389,10 @@ START_NAMESPACE_DISTRHO
{
switch (index)
{
case 0;
case 0:
fGainL = value;
break;
case 1;
case 1:
fGainR = value;
break;
}
@@ -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.
@{
*/

@@ -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
@@ -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
@@ -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"

/** @} */

/* ------------------------------------------------------------------------------------------------------------
@@ -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

/** @} */

/* ------------------------------------------------------------------------------------------------------------


+ 3
- 0
dpf/distrho/DistrhoUI.hpp View File

@@ -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



+ 1
- 1
dpf/distrho/src/DistrhoPlugin.cpp View File

@@ -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;
}


+ 1330
- 180
dpf/distrho/src/DistrhoPluginCLAP.cpp
File diff suppressed because it is too large
View File


+ 26
- 1
dpf/distrho/src/DistrhoPluginJACK.cpp View File

@@ -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
@@ -216,6 +220,7 @@ public:
#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);
@@ -687,6 +692,26 @@ private:

#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);
@@ -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)


+ 330
- 266
dpf/distrho/src/DistrhoPluginVST2.cpp
File diff suppressed because it is too large
View File


+ 38
- 12
dpf/distrho/src/DistrhoUI.cpp View File

@@ -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
}

/* ------------------------------------------------------------------------------------------------------------
@@ -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;
@@ -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


+ 9
- 9
dpf/distrho/src/DistrhoUIInternal.hpp View File

@@ -193,16 +193,16 @@ public:
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,);
@@ -211,11 +211,11 @@ public:

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,);
@@ -238,7 +238,7 @@ public:
uiData->window->show();
uiData->window->focus();
}
#endif
#endif

bool plugin_idle()
{
@@ -263,7 +263,7 @@ public:
// -------------------------------------------------------------------

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

@@ -272,12 +272,12 @@ public:
}

#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);
}


+ 12
- 8
dpf/distrho/src/DistrhoUILV2.cpp View File

@@ -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;

@@ -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)
{
@@ -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)
@@ -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
}
}



+ 6
- 6
dpf/distrho/src/DistrhoUIPrivateData.hpp View File

@@ -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
@@ -183,7 +183,7 @@ public:
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)
@@ -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
};



+ 3
- 3
dpf/distrho/src/DistrhoUIVST3.cpp View File

@@ -270,7 +270,7 @@ public:
#if DISTRHO_PLUGIN_HAS_EXTERNAL_UI
fIdleHelper.registerNativeIdleCallback();
#else
fUI.addIdleCallbackForVST3(this, DPF_VST3_TIMER_INTERVAL);
fUI.addIdleCallbackForNativeIdle(this, DPF_VST3_TIMER_INTERVAL);
#endif
}

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

@@ -694,7 +694,7 @@ public:

void idleCallback() override
{
fUI.idleForVST3();
fUI.idleFromNativeIdle();
doIdleStuff();
}
#endif


+ 3
- 3
dpf/distrho/src/clap/entry.h View File

@@ -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 */


+ 5
- 3
dpf/distrho/src/clap/events.h View File

@@ -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.
@@ -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


+ 7
- 7
dpf/distrho/src/clap/ext/audio-ports.h View File

@@ -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 {
@@ -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


+ 24
- 20
dpf/distrho/src/clap/ext/gui.h View File

@@ -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.
//
@@ -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.
@@ -130,21 +134,21 @@ 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.
@@ -152,38 +156,38 @@ typedef struct clap_plugin_gui {
//
// 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.
@@ -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


+ 28
- 0
dpf/distrho/src/clap/ext/latency.h View File

@@ -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
- 0
dpf/distrho/src/clap/ext/note-ports.h View File

@@ -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

+ 54
- 22
dpf/distrho/src/clap/ext/params.h View File

@@ -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;

@@ -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 {
@@ -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


+ 33
- 0
dpf/distrho/src/clap/ext/state.h View File

@@ -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
- 0
dpf/distrho/src/clap/ext/thread-check.h View File

@@ -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
- 0
dpf/distrho/src/clap/ext/timer-support.h View File

@@ -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

+ 4
- 4
dpf/distrho/src/clap/host.h View File

@@ -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


+ 7
- 6
dpf/distrho/src/clap/plugin-factory.h View File

@@ -11,17 +11,18 @@ 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.
@@ -29,9 +30,9 @@ typedef struct clap_plugin_factory {
// 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


+ 14
- 14
dpf/distrho/src/clap/plugin.h View File

@@ -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
@@ -52,21 +52,20 @@ 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.
@@ -74,21 +73,22 @@ typedef struct clap_plugin {
// - 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


+ 8
- 0
dpf/distrho/src/clap/private/macros.h View File

@@ -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


+ 3
- 2
dpf/distrho/src/clap/process.h View File

@@ -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;


+ 26
- 0
dpf/distrho/src/clap/stream.h View File

@@ -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

+ 3
- 2
dpf/distrho/src/jackbridge/RtAudioBridge.hpp View File

@@ -29,6 +29,7 @@
# 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
@@ -36,10 +37,10 @@
# 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


+ 0
- 336
dpf/distrho/src/vestige/vestige.h View File

@@ -1,336 +0,0 @@
/*
* IMPORTANT: The author of DPF has no connection with the
* author of the VeSTige VST-compatibility header, has had no
* involvement in its creation.
*
* The VeSTige header is included in this package in the good-faith
* belief that it has been cleanly and legally reverse engineered
* without reference to the official VST SDK and without its
* developer(s) having agreed to the VST SDK license agreement.
*/

/*
* simple header to allow VeSTige compilation and eventually work
*
* Copyright (c) 2006 Javier Serrano Polo <jasp00/at/users.sourceforge.net>
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public
* License as published by the Free Software Foundation; either
* version 2 of the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* General Public License for more details.
*
* You should have received a copy of the GNU General Public
* License along with this program (see COPYING); if not, write to the
* Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
* Boston, MA 02110-1301 USA.
*
*/
#include <stdint.h>
#ifndef _VESTIGE_H
#define _VESTIGE_H

#define CCONST(a, b, c, d)( ( ( (int) a ) << 24 ) | \
( ( (int) b ) << 16 ) | \
( ( (int) c ) << 8 ) | \
( ( (int) d ) << 0 ) )

#define audioMasterAutomate 0
#define audioMasterVersion 1
#define audioMasterCurrentId 2
#define audioMasterIdle 3
#define audioMasterPinConnected 4
// unsupported? 5
#define audioMasterWantMidi 6
#define audioMasterGetTime 7
#define audioMasterProcessEvents 8
#define audioMasterSetTime 9
#define audioMasterTempoAt 10
#define audioMasterGetNumAutomatableParameters 11
#define audioMasterGetParameterQuantization 12
#define audioMasterIOChanged 13
#define audioMasterNeedIdle 14
#define audioMasterSizeWindow 15
#define audioMasterGetSampleRate 16
#define audioMasterGetBlockSize 17
#define audioMasterGetInputLatency 18
#define audioMasterGetOutputLatency 19
#define audioMasterGetPreviousPlug 20
#define audioMasterGetNextPlug 21
#define audioMasterWillReplaceOrAccumulate 22
#define audioMasterGetCurrentProcessLevel 23
#define audioMasterGetAutomationState 24
#define audioMasterOfflineStart 25
#define audioMasterOfflineRead 26
#define audioMasterOfflineWrite 27
#define audioMasterOfflineGetCurrentPass 28
#define audioMasterOfflineGetCurrentMetaPass 29
#define audioMasterSetOutputSampleRate 30
// unsupported? 31
#define audioMasterGetSpeakerArrangement 31 // deprecated in 2.4?
#define audioMasterGetVendorString 32
#define audioMasterGetProductString 33
#define audioMasterGetVendorVersion 34
#define audioMasterVendorSpecific 35
#define audioMasterSetIcon 36
#define audioMasterCanDo 37
#define audioMasterGetLanguage 38
#define audioMasterOpenWindow 39
#define audioMasterCloseWindow 40
#define audioMasterGetDirectory 41
#define audioMasterUpdateDisplay 42
#define audioMasterBeginEdit 43
#define audioMasterEndEdit 44
#define audioMasterOpenFileSelector 45
#define audioMasterCloseFileSelector 46 // currently unused
#define audioMasterEditFile 47 // currently unused
#define audioMasterGetChunkFile 48 // currently unused
#define audioMasterGetInputSpeakerArrangement 49 // currently unused

#define effFlagsHasEditor 1
#define effFlagsCanReplacing (1 << 4) // very likely
#define effFlagsIsSynth (1 << 8) // currently unused

#define effOpen 0
#define effClose 1
#define effSetProgram 2
#define effGetProgram 3
#define effGetProgramName 5
#define effGetParamName 8
#define effSetSampleRate 10
#define effSetBlockSize 11
#define effMainsChanged 12
#define effEditGetRect 13
#define effEditOpen 14
#define effEditClose 15
#define effEditIdle 19
#define effEditTop 20
#define effProcessEvents 25
#define effGetPlugCategory 35
#define effGetEffectName 45
#define effGetVendorString 47
#define effGetProductString 48
#define effGetVendorVersion 49
#define effCanDo 51
#define effIdle 53
#define effGetParameterProperties 56
#define effGetVstVersion 58
#define effShellGetNextPlugin 70
#define effStartProcess 71
#define effStopProcess 72

#define effBeginSetProgram 67
#define effEndSetProgram 68

#ifdef WORDS_BIGENDIAN
// "VstP"
#define kEffectMagic 0x50747356
#else
// "PtsV"
#define kEffectMagic 0x56737450
#endif

#define kVstLangEnglish 1
#define kVstMidiType 1

struct RemoteVstPlugin;

#define kVstTransportChanged 1
#define kVstTransportPlaying (1 << 1)
#define kVstTransportCycleActive (1 << 2)
#define kVstTransportRecording (1 << 3)

#define kVstAutomationWriting (1 << 6)
#define kVstAutomationReading (1 << 7)

#define kVstNanosValid (1 << 8)
#define kVstPpqPosValid (1 << 9)
#define kVstTempoValid (1 << 10)
#define kVstBarsValid (1 << 11)
#define kVstCyclePosValid (1 << 12)
#define kVstTimeSigValid (1 << 13)
#define kVstSmpteValid (1 << 14)
#define kVstClockValid (1 << 15)

struct _VstMidiEvent
{
// 00
int type;
// 04
int byteSize;
// 08
int deltaFrames;
// 0c?
int flags;
// 10?
int noteLength;
// 14?
int noteOffset;
// 18
char midiData[4];
// 1c?
char detune;
// 1d?
char noteOffVelocity;
// 1e?
char reserved1;
// 1f?
char reserved2;
};

typedef struct _VstMidiEvent VstMidiEvent;


struct _VstEvent
{
char dump[sizeof (VstMidiEvent)];

};

typedef struct _VstEvent VstEvent;

struct _VstEvents
{
// 00
int numEvents;
// 04
void *reserved;
// 08
VstEvent * events[2];
};

enum Vestige2StringConstants
{
VestigeMaxNameLen = 64,
VestigeMaxLabelLen = 64,
VestigeMaxShortLabelLen = 8,
VestigeMaxCategLabelLen = 24,
VestigeMaxFileNameLen = 100
};


enum VstPlugCategory
{
kPlugCategUnknown = 0,
kPlugCategEffect,
kPlugCategSynth,
kPlugCategAnalysis,
kPlugCategMastering,
kPlugCategSpacializer,
kPlugCategRoomFx,
kPlugSurroundFx,
kPlugCategRestoration,
kPlugCategOfflineProcess,
kPlugCategShell,
kPlugCategGenerator,
kPlugCategMaxCount
};

typedef struct _VstEvents VstEvents;

struct _VstParameterProperties
{
float stepFloat; /* float step */
float smallStepFloat; /* small float step */
float largeStepFloat; /* large float step */
char label[VestigeMaxLabelLen]; /* parameter label */
int32_t flags; /* @see VstParameterFlags */
int32_t minInteger; /* integer minimum */
int32_t maxInteger; /* integer maximum */
int32_t stepInteger; /* integer step */
int32_t largeStepInteger; /* large integer step */
char shortLabel[VestigeMaxShortLabelLen]; /* short label, recommended: 6 + delimiter */
int16_t displayIndex; /* index where this parameter should be displayed (starting with 0) */
int16_t category; /* 0: no category, else group index + 1 */
int16_t numParametersInCategory; /* number of parameters in category */
int16_t reserved; /* zero */
char categoryLabel[VestigeMaxCategLabelLen]; /* category label, e.g. "Osc 1" */
char future[16]; /* reserved for future use */
};

typedef struct _VstParameterProperties VstParameterProperties;

enum VstParameterFlags
{
kVstParameterIsSwitch = 1 << 0, /* parameter is a switch (on/off) */
kVstParameterUsesIntegerMinMax = 1 << 1, /* minInteger, maxInteger valid */
kVstParameterUsesFloatStep = 1 << 2, /* stepFloat, smallStepFloat, largeStepFloat valid */
kVstParameterUsesIntStep = 1 << 3, /* stepInteger, largeStepInteger valid */
kVstParameterSupportsDisplayIndex = 1 << 4, /* displayIndex valid */
kVstParameterSupportsDisplayCategory = 1 << 5, /* category, etc. valid */
kVstParameterCanRamp = 1 << 6 /* set if parameter value can ramp up/down */
};

struct _AEffect
{
// Never use virtual functions!!!
// 00-03
int magic;
// dispatcher 04-07
intptr_t (* dispatcher) (struct _AEffect *, int, int, intptr_t, void *, float);
// process, quite sure 08-0b
void (* process) (struct _AEffect *, float **, float **, int);
// setParameter 0c-0f
void (* setParameter) (struct _AEffect *, int, float);
// getParameter 10-13
float (* getParameter) (struct _AEffect *, int);
// programs 14-17
int numPrograms;
// Params 18-1b
int numParams;
// Input 1c-1f
int numInputs;
// Output 20-23
int numOutputs;
// flags 24-27
int flags;
// Fill somewhere 28-2b
void *ptr1;
void *ptr2;
int initialDelay;
// Zeroes 30-33 34-37 38-3b
char empty2[4 + 4];
// 1.0f 3c-3f
float unkown_float;
// An object? pointer 40-43
void *object;
// Zeroes 44-47
void *user;
// Id 48-4b
int32_t uniqueID;
// plugin version 4c-4f
int32_t version;
// processReplacing 50-53
void (* processReplacing) (struct _AEffect *, float **, float **, int);
};

typedef struct _AEffect AEffect;

typedef struct _VstTimeInfo
{
/* info from online documentation of VST provided by Steinberg */

double samplePos;
double sampleRate;
double nanoSeconds;
double ppqPos;
double tempo;
double barStartPos;
double cycleStartPos;
double cycleEndPos;
int32_t timeSigNumerator;
int32_t timeSigDenominator;
int32_t smpteOffset;
int32_t smpteFrameRate;
int32_t samplesToNextClock;
int32_t flags;

} VstTimeInfo;

typedef intptr_t (* audioMasterCallback) (AEffect *, int32_t, int32_t, intptr_t, void *, float);

#endif

+ 11
- 0
dpf/distrho/src/xaymar-vst2/LICENSE View File

@@ -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
- 0
dpf/distrho/src/xaymar-vst2/README.md View File

@@ -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.

+ 1012
- 0
dpf/distrho/src/xaymar-vst2/vst.h
File diff suppressed because it is too large
View File


+ 1
- 1
dpf/dpf.doxygen View File

@@ -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


+ 11
- 2
dpf/utils/package-osx-bundles.sh View File

@@ -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" \
@@ -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})
@@ -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


+ 4
- 0
dpf/utils/plugin.pkg/package.xml.in View File

@@ -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>

+ 6
- 4
plugins/3BandEQ/DistrhoPluginInfo.h View File

@@ -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 "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
@@ -27,7 +28,8 @@
#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

+ 1
- 10
plugins/3BandEQ/Makefile View File

@@ -29,10 +29,7 @@ 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)
@@ -40,12 +37,6 @@ TARGETS += dssi
endif
endif

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

all: $(TARGETS)

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

+ 6
- 4
plugins/3BandSplitter/DistrhoPluginInfo.h View File

@@ -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 "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
@@ -27,7 +28,8 @@
#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

+ 1
- 10
plugins/3BandSplitter/Makefile View File

@@ -29,10 +29,7 @@ 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)
@@ -40,12 +37,6 @@ TARGETS += dssi
endif
endif

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

all: $(TARGETS)

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

+ 25
- 29
plugins/AmplitudeImposer/DistrhoPluginAmplitudeImposer.cpp View File

@@ -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
@@ -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;
}
}
@@ -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];
@@ -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)
@@ -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


+ 0
- 1
plugins/AmplitudeImposer/DistrhoPluginAmplitudeImposer.hpp View File

@@ -42,7 +42,6 @@ public:
enum PortGroups {
kPortGroupAmpEnv,
kPortGroupAudio,
kPortGroupCount
};


+ 6
- 4
plugins/AmplitudeImposer/DistrhoPluginInfo.h View File

@@ -25,9 +25,10 @@
#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
@@ -35,7 +36,8 @@
#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

+ 2
- 6
plugins/AmplitudeImposer/Makefile View File

@@ -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

@@ -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
- 3
plugins/CycleShifter/DistrhoPluginInfo.h View File

@@ -25,9 +25,10 @@
#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
@@ -35,4 +36,7 @@
#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

+ 2
- 6
plugins/CycleShifter/Makefile View File

@@ -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

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

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

all: $(TARGETS)

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

+ 4
- 3
plugins/Kars/DistrhoPluginInfo.h View File

@@ -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


+ 1
- 1
plugins/Kars/Makefile View File

@@ -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

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

+ 6
- 4
plugins/MVerb/DistrhoPluginInfo.h View File

@@ -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
@@ -19,9 +19,10 @@
#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
@@ -29,6 +30,7 @@
#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"



+ 1
- 5
plugins/MVerb/Makefile View File

@@ -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)


+ 4
- 3
plugins/Nekobi/DistrhoPluginInfo.h View File

@@ -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


+ 1
- 19
plugins/Nekobi/Makefile View File

@@ -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

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

+ 7
- 5
plugins/PingPongPan/DistrhoPluginInfo.h View File

@@ -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 "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
@@ -27,7 +28,8 @@
#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

+ 1
- 10
plugins/PingPongPan/Makefile View File

@@ -29,10 +29,7 @@ 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)
@@ -40,12 +37,6 @@ TARGETS += dssi
endif
endif

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

all: $(TARGETS)

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

+ 6
- 4
plugins/ProM/DistrhoPluginInfo.h View File

@@ -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
@@ -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

+ 2
- 1
plugins/ProM/Makefile View File

@@ -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

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

TARGETS = lv2 vst2 vst3
TARGETS = lv2 vst2 vst3 clap

all: $(TARGETS)



+ 6
- 4
plugins/SoulForce/DistrhoPluginInfo.h View File

@@ -25,9 +25,10 @@
#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
@@ -35,7 +36,8 @@
#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

+ 2
- 6
plugins/SoulForce/Makefile View File

@@ -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

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

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

all: $(TARGETS)

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

+ 6
- 4
plugins/bitcrush/DistrhoPluginInfo.h View File

@@ -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."


+ 1
- 7
plugins/bitcrush/Makefile View File

@@ -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

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

+ 6
- 4
plugins/freeverb/DistrhoPluginInfo.h View File

@@ -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."


+ 1
- 7
plugins/freeverb/Makefile View File

@@ -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

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

+ 6
- 4
plugins/gigaverb/DistrhoPluginInfo.h View File

@@ -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."


+ 1
- 7
plugins/gigaverb/Makefile View File

@@ -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

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

+ 5
- 3
plugins/glBars/DistrhoPluginInfo.h View File

@@ -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


+ 1
- 1
plugins/glBars/Makefile View File

@@ -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)



+ 6
- 4
plugins/pitchshift/DistrhoPluginInfo.h View File

@@ -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."


+ 1
- 7
plugins/pitchshift/Makefile View File

@@ -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

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

Loading…
Cancel
Save