Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Update all plugins, enable clap
Signed-off-by: falkTX <falktx@falktx.com>
  • Loading branch information
falkTX committed Oct 22, 2022
1 parent ac0e5ee commit 39c6c21
Show file tree
Hide file tree
Showing 75 changed files with 3,541 additions and 1,152 deletions.
18 changes: 14 additions & 4 deletions Makefile
Expand Up @@ -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

Expand Down Expand Up @@ -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/
Expand All @@ -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/
Expand Down
15 changes: 6 additions & 9 deletions dpf/LICENSING.md
Expand Up @@ -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.
Expand All @@ -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

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

Expand Down
60 changes: 58 additions & 2 deletions dpf/Makefile.base.mk
Expand Up @@ -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)
Expand Down Expand Up @@ -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)
Expand Down Expand Up @@ -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)
Expand Down Expand Up @@ -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)
Expand All @@ -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)
Expand All @@ -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

Expand Down
3 changes: 2 additions & 1 deletion dpf/README.md
Expand Up @@ -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/>

Expand Down Expand Up @@ -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)
Expand Down
31 changes: 20 additions & 11 deletions dpf/dgl/NanoVG.hpp
Expand Up @@ -319,10 +319,9 @@ class NanoVG

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

/**
Destructor.
Expand Down Expand Up @@ -917,7 +916,17 @@ class NanoBaseWidget : public BaseWidget,
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.
Expand Down Expand Up @@ -954,13 +963,7 @@ class NanoBaseWidget : public BaseWidget,
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) {}
Expand All @@ -969,6 +972,12 @@ class NanoBaseWidget : public BaseWidget,
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)
};

Expand Down
2 changes: 1 addition & 1 deletion dpf/dgl/Window.hpp
Expand Up @@ -541,7 +541,7 @@ class DISTRHO_API Window
uint height,
double scaleFactor,
bool resizable,
bool isVST3,
bool usesSizeRequest,
bool doPostInit);

DISTRHO_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR(Window)
Expand Down

0 comments on commit 39c6c21

Please sign in to comment.