Browse Source

Initial VST3 support, WIP

Signed-off-by: falkTX <falktx@falktx.com>
master
falkTX 1 year ago
parent
commit
19b2d11dc9
Signed by: falkTX <falktx@falktx.com> GPG Key ID: CDBAA37ABC74FBA0
8 changed files with 39 additions and 52 deletions
  1. +13
    -1
      .github/workflows/build.yml
  2. +13
    -5
      Makefile
  3. +1
    -1
      README.md
  4. +1
    -1
      dpf
  5. +6
    -41
      plugins/ProM/DistrhoUIProM.cpp
  6. +0
    -1
      plugins/ProM/DistrhoUIProM.hpp
  7. +1
    -2
      plugins/ProM/Makefile
  8. +4
    -0
      plugins/ProM/ResizeHandle.hpp

+ 13
- 1
.github/workflows/build.yml View File

@@ -172,6 +172,7 @@ jobs:
!bin/*-dssi.dylib
!bin/lv2
!bin/vst2
!bin/vst3

win32:
runs-on: ubuntu-20.04
@@ -255,7 +256,7 @@ jobs:
- name: Build plugins
env:
CFLAGS: -g
CXXFLAGS: -g
CXXFLAGS: -g -DDPF_ABORT_ON_ERROR
LDFLAGS: -static-libgcc -static-libstdc++
run: |
make features
@@ -321,3 +322,14 @@ jobs:
--suppressions=./dpf/utils/valgrind-dpf.supp \
/usr/lib/carla/carla-bridge-native vst2 ./bin/${p} "" 1>/dev/null; \
done
- name: Test VST3 plugins
run: |
for p in $(ls bin/ | grep vst3); do \
env CARLA_BRIDGE_DUMMY=1 CARLA_BRIDGE_TESTING=native \
valgrind \
--error-exitcode=255 \
--leak-check=full \
--track-origins=yes \
--suppressions=./dpf/utils/valgrind-dpf.supp \
/usr/lib/carla/carla-bridge-native vst3 ./bin/${p} "" 1>/dev/null; \
done

+ 13
- 5
Makefile View File

@@ -29,24 +29,32 @@ resources: gen
# LV2 presets
install -d bin/ProM.lv2/resources/presets
ln -sf $(CURDIR)/plugins/ProM/projectM/presets/presets_* bin/ProM.lv2/resources/presets/

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

# VST3 fonts
install -d bin/ProM.vst3/Contents/Resources/fonts
ln -sf $(CURDIR)/plugins/ProM/projectM/fonts/*.ttf bin/ProM.vst3/Contents/Resources/fonts/
# VST3 presets
install -d bin/ProM.vst3/Contents/Resources/presets
ln -sf $(CURDIR)/plugins/ProM/projectM/presets/presets_* bin/ProM.vst3/Contents/Resources/presets/
else
resources:
endif


+ 1
- 1
README.md View File

@@ -1,7 +1,7 @@
# DISTRHO ProM

[projectM](http://projectm.sourceforge.net/) is an awesome music visualizer.<br/>
DISTRHO ProM makes it work as an audio plugin (LV2 and VST2).<br/>
DISTRHO ProM makes it work as an audio plugin (LV2, VST2 and VST3).<br/>

## Screenshot (in jalv.gtk)
![ProM](https://raw.githubusercontent.com/DISTRHO/prom/master/plugins/ProM/Screenshot.png "ProM")<br/>

+ 1
- 1
dpf

@@ -1 +1 @@
Subproject commit e44a908375610d7f46b507532b4602c9f89f085a
Subproject commit 7069b02cddb7f82c152629d2f406ad9b2d95ce10

+ 6
- 41
plugins/ProM/DistrhoUIProM.cpp View File

@@ -69,6 +69,12 @@ static String getCurrentExecutableDataDir()
}
else
# endif
if (datadir.endsWith("/x86_64-linux"))
{
datadir.truncate(datadir.rfind('/'));
datadir += "/Resources";
}
else
#endif
{
datadir += "/resources";
@@ -251,33 +257,6 @@ bool DistrhoUIProM::onKeyboard(const KeyboardEvent& ev)
if (fPM == nullptr)
return false;

#if 0
if (ev.press && (ev.key == '1' || ev.key == '+' || ev.key == '-'))
{
if (ev.key == '1')
{
if (getWidth() != 512 || getHeight() != 512)
setSize(512, 512);
}
else if (ev.key == '+')
{
/**/ if (getWidth() < 1100 && getHeight() < 1100)
setSize(getWidth()+100, getHeight()+100);
else if (getWidth() != 1100 || getHeight() != 1100)
setSize(1100, 1100);
}
else if (ev.key == '-')
{
/**/ if (getWidth() >= 200 && getHeight() >= 200)
setSize(getWidth()-100, getHeight()-100);
else if (getWidth() != 100 || getHeight() != 100)
setSize(100, 100);
}

return true;
}
#endif

// special handling for text
if (fPM->isTextInputActive(true) && !ev.press)
{
@@ -357,20 +336,6 @@ bool DistrhoUIProM::onKeyboard(const KeyboardEvent& ev)
return true;
}

bool DistrhoUIProM::onSpecial(const SpecialEvent& ev)
{
if (fPM == nullptr)
return false;

const projectMKeycode pmKey = dgl2pmkey(ev.key);

if (pmKey == PROJECTM_K_NONE)
return false;

fPM->default_key_handler(ev.press ? PROJECTM_KEYUP : PROJECTM_KEYDOWN, pmKey);
return true;
}

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

UI* createUI()


+ 0
- 1
plugins/ProM/DistrhoUIProM.hpp View File

@@ -49,7 +49,6 @@ protected:

void onDisplay() override;
bool onKeyboard(const KeyboardEvent&) override;
bool onSpecial(const SpecialEvent&) override;

private:
ScopedPointer<projectM> fPM;


+ 1
- 2
plugins/ProM/Makefile View File

@@ -195,8 +195,7 @@ LINK_FLAGS += -lpthread
# --------------------------------------------------------------
# Enable all possible plugin types

TARGETS += lv2
TARGETS += vst
TARGETS = lv2 vst2 vst3

all: $(TARGETS)



+ 4
- 0
plugins/ProM/ResizeHandle.hpp View File

@@ -56,6 +56,10 @@ protected:
const GraphicsContext& context(getGraphicsContext());
const double lineWidth = 1.0 * getScaleFactor();

#ifdef DGL_OPENGL
glMatrixMode(GL_MODELVIEW);
#endif

// draw white lines, 1px wide
Color(1.0f, 1.0f, 1.0f).setFor(context);
l1.draw(context, lineWidth);


Loading…
Cancel
Save