Skip to content

Commit

Permalink
Update DPF and plugins
Browse files Browse the repository at this point in the history
Signed-off-by: falkTX <falktx@falktx.com>
  • Loading branch information
falkTX committed Oct 30, 2022
1 parent f9666d8 commit 0cba155
Show file tree
Hide file tree
Showing 12 changed files with 153 additions and 139 deletions.
57 changes: 31 additions & 26 deletions dpf/FEATURES.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,29 +4,29 @@ This file describes the available features for each plugin format.
The limitations could be due to the plugin format itself or within DPF.
If the limitation is within DPF, a link is provided to a description below on the reason for it.

| Feature | JACK/Standalone | LADSPA | DSSI | LV2 | VST2 | VST3 | Feature |
|---------------------|---------------------------------------|-------------------------|---------------------|-------------------------------|--------------------------------|----------------------------------|---------------------|
| Audio port groups | [Yes*](#jack-audio-port-groups) | No | No | Yes | No | [No*](#vst3-is-work-in-progress) | Audio port groups |
| Audio port as CV | Yes | No | No | Yes | No | [No*](#vst3-is-work-in-progress) | Audio port as CV |
| Audio sidechan | Yes | No | No | Yes | [No*](#vst2-potential-support) | [No*](#vst3-is-work-in-progress) | Audio sidechan |
| Bypass control | No | No | No | Yes | [No*](#vst2-potential-support) | [No*](#vst3-is-work-in-progress) | Bypass control |
| MIDI input | Yes | No | Yes | Yes | Yes | Yes | MIDI input |
| MIDI output | Yes | No | No | Yes | Yes | Yes | MIDI output |
| Parameter changes | Yes | No | No | [No*](#lv2-parameter-changes) | Yes | Yes | Parameter changes |
| Parameter groups | No | No | No | Yes | Yes | [No*](#vst3-is-work-in-progress) | Parameter groups |
| Parameter outputs | No | No | No | Yes | No | [No*](#vst3-is-work-in-progress) | Parameter outputs |
| Parameter triggers | Yes | No | No | Yes | [No*](#parameter-triggers) | [No*](#parameter-triggers) | Parameter triggers |
| Programs | [Yes*](#jack-parameters-and-programs) | [No*](#ladspa-programs) | [Yes*](#dssi-state) | Yes | [No*](#vst2-programs) | Yes | Programs |
| States | Yes | No | [Yes*](#dssi-state) | Yes | Yes | Yes | States |
| Full/internal state | Yes | No | No | Yes | Yes | Yes | Full/internal state |
| Time position | Yes | No | No | Yes | Yes | Yes | Time position |
| UI | [Yes*](#jack-custom-ui-only) | No | External only | Yes | Embed only | Embed only | UI |
| UI bg/fg colors | No | No | No | Yes | No | No? | UI bg/fg colors |
| UI direct access | Yes | No | No | Yes | Yes | Yes | UI direct access |
| UI host-filebrowser | No | No | No | Yes | [No*](#vst2-potential-support) | [No*](#vst3-is-work-in-progress) | UI host-filebrowser |
| UI host-resize | Yes | No | Yes | Yes | No | [No*](#vst3-is-work-in-progress) | UI host-resize |
| UI remote control | No | No | Yes | Yes | No | Yes | UI remote control |
| UI send midi note | Yes | No | Yes | Yes | Yes | Yes | UI send midi note |
| Feature | JACK/Standalone | LADSPA | DSSI | LV2 | VST2 | VST3 | CLAP | Feature |
|---------------------|---------------------------------------|--------------------|---------------------|-------------------------------|----------------------------|----------------------------|-------------------------------|---------------------|
| Audio port groups | [Yes*](#jack-audio-port-groups) | No | No | Yes | No | Yes | Yes | Audio port groups |
| Audio port as CV | Yes | No | No | Yes | No | [Yes*](#vst3-cv) | [No*](#work-in-progress) | Audio port as CV |
| Audio sidechan | Yes | No | No | Yes | [No*](#vst2-deprecated) | Yes | Yes | Audio sidechan |
| Bypass control | No | No | No | Yes | [No*](#vst2-deprecated) | Yes | Yes | Bypass control |
| MIDI input | Yes | No | Yes | Yes | Yes | Yes | Yes | MIDI input |
| MIDI output | Yes | No | No | Yes | Yes | Yes | Yes | MIDI output |
| Parameter changes | Yes | No | No | [No*](#lv2-parameter-changes) | Yes | Yes | Yes | Parameter changes |
| Parameter groups | No | No | No | Yes | Yes | [No*](#work-in-progress) | Yes | Parameter groups |
| Parameter outputs | No | No | No | Yes | No | Yes | Yes | Parameter outputs |
| Parameter triggers | Yes | No | No | Yes | [No*](#parameter-triggers) | [No*](#parameter-triggers) | [No*](#parameter-triggers) | Parameter triggers |
| Programs | [Yes*](#jack-parameters-and-programs) | [No*](#ladspa-rdf) | [Yes*](#dssi-state) | Yes | [No*](#vst2-programs) | Yes | No | Programs |
| States | Yes | No | [Yes*](#dssi-state) | Yes | Yes | Yes | Yes | States |
| Full/internal state | Yes | No | No | Yes | Yes | Yes | Yes | Full/internal state |
| Time position | Yes | No | No | Yes | Yes | Yes | Yes | Time position |
| UI | [Yes*](#jack-custom-ui-only) | No | External only | Yes | Embed only | Embed only | Yes | UI |
| UI bg/fg colors | No | No | No | Yes | No | No? | No | UI bg/fg colors |
| UI direct access | Yes | No | No | Yes | Yes | Yes | Yes | UI direct access |
| UI host-filebrowser | No | No | No | Yes | [No*](#vst2-deprecated) | [No*](#work-in-progress) | [No*](#work-in-progress) | UI host-filebrowser |
| UI host-resize | Yes | No | Yes | Yes | No | Yes | Yes | UI host-resize |
| UI remote control | No | No | Yes | Yes | No | Yes | No | UI remote control |
| UI send midi note | Yes | No | Yes | Yes | Yes | Yes | Yes | UI send midi note |

For things that could be unclear:

Expand Down Expand Up @@ -59,7 +59,7 @@ MIDI CCs are used for parameter changes (matching the `midiCC` value you set on
There is no generic plugin editor view.
If your plugin has no custom UI, the standalone executable will run but not show any window.

## LADSPA programs
## LADSPA RDF

Programs for LADSPA could be done via LRDF but this is not supported in DPF.

Expand All @@ -78,7 +78,7 @@ But if we involve programs, they would need to pass through the UI in order to w
Although this is already implemented in DPF (through a custom extension), this is not implemented on most hosts.
So for now you can pretty much treat it as if not supported.

## VST2 potential support
## VST2 deprecated

Not supported in DPF at the moment.
It could eventually be, but likely not due to VST2 being phased out by Steinberg.
Expand All @@ -88,6 +88,11 @@ Contact DPF authors if you require such a feature.

VST2 program support requires saving state of all programs in memory, which is very expensive and thus not done in DPF.

## VST3 is work in progress
## VST3 CV

Although VST3 officially supports CV (Control Voltage) tagged audio ports,
at the moment no host supports such feature and thus it is not possible to validate it.

## Work in progress

Feature is possible, just not implemented yet in DPF.
64 changes: 16 additions & 48 deletions dpf/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,21 +3,21 @@
[![cmake](https://github.com/DISTRHO/DPF/actions/workflows/cmake.yml/badge.svg)](https://github.com/DISTRHO/DPF/actions/workflows/cmake.yml)
[![example-plugins](https://github.com/DISTRHO/DPF/actions/workflows/example-plugins.yml/badge.svg)](https://github.com/DISTRHO/DPF/actions/workflows/example-plugins.yml)

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

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/>
DPF can build for LADSPA, DSSI, LV2, VST2, VST3 and CLAP formats.
A JACK/Standalone mode is also available, allowing you to quickly test plugins.

Plugin DSP and UI communication is done via key-value string pairs.<br/>
You send messages from the UI to the DSP side, which is automatically saved in the host when required.<br/>
(You can also store state internally if needed, but this breaks DSSI compatibility).<br/>
Plugin DSP and UI communication is done via key-value string pairs.
You send messages from the UI to the DSP side, which is automatically saved in the host when required.
(You can also store state internally if needed, but this breaks DSSI compatibility).

Getting time information from the host is possible.<br/>
It uses the same format as the JACK Transport API, making porting some code easier.<br/>
Getting time information from the host is possible.
It uses the same format as the JACK Transport API, making porting some code easier.

Provided features and implementation status for specific plugin formats can be seen in [FEATURES.md](FEATURES.md).

## Licensing

Expand All @@ -31,43 +31,11 @@ Bug reports happen on the [DPF github project](https://github.com/DISTRHO/DPF/is

Online documentation is available at [https://distrho.github.io/DPF/](https://distrho.github.io/DPF/).

Online help and discussion about DPF happens in the [kx.studio chat, DPF room](https://chat.kx.studio/).
Online help and discussion about DPF happens in the [kx.studio chat, DPF room](https://chat.kx.studio/channel/dpf).


## List of plugins made with DPF:
- [DISTRHO glBars](https://github.com/DISTRHO/glBars)
- [DISTRHO Kars](https://github.com/DISTRHO/Kars)
- [DISTRHO Mini-Series](https://github.com/DISTRHO/Mini-Series)
- [DISTRHO MVerb](https://github.com/DISTRHO/MVerb)
- [DISTRHO ndc Plugs](https://github.com/DISTRHO/ndc-Plugs)
- [DISTRHO Nekobi](https://github.com/DISTRHO/Nekobi)
- [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)
- [Regrader-Port](https://github.com/linuxmao-org/regrader-port)
- [Rezonateur](https://github.com/jpcima/rezonateur)
- [Spectacle-analyzer](https://github.com/jpcima/spectacle/)
- [Stone Phaser](https://github.com/jpcima/stone-phaser)
- [String-machine](https://github.com/jpcima/string-machine)
- [Uhhyou Plugins](https://github.com/ryukau/LV2Plugins)
- [VL1-emulator](https://github.com/linuxmao-org/VL1-emulator)
- [Wolf Shaper](https://github.com/pdesaulniers/wolf-shaper)
- [Wolf Spectrum](https://github.com/pdesaulniers/wolf-spectrum)
- [YK Chorus](https://github.com/SpotlightKid/ykchorus)
- [ZamAudio Suite](https://github.com/zamaudio/zam-plugins)
## Work in progress
- [CV-LFO-blender-LV2](https://github.com/BramGiesen/cv-lfo-blender-lv2)
- [fverb](https://github.com/jpcima/fverb)
- [Juice Plugins](https://github.com/DISTRHO/JuicePlugins)
- [gunshot](https://github.com/soerenbnoergaard/gunshot)
- [midiomatic](https://github.com/SpotlightKid/midiomatic)
- [Shiro Plugins](https://github.com/ninodewit/SHIRO-Plugins/)
- [Shiru Plugins](https://github.com/linuxmao-org/shiru-plugins)

Checking the [github "DPF" tag](https://github.com/topics/dpf) can potentially bring up other DPF-made plugins.

Plugin examples are available in the `example/` folder inside this repo.

See [this wiki page](https://github.com/DISTRHO/DPF/wiki/Plugins-made-with-DPF) for a list of plugins made with DPF.

Plugin examples are also available in the `example/` folder inside this repo.
11 changes: 11 additions & 0 deletions dpf/dgl/src/TopLevelWidgetPrivateData.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,17 @@ TopLevelWidget::PrivateData::PrivateData(TopLevelWidget* const s, Window& w)
selfw(s),
window(w)
{
/* if window already has a top-level-widget, make the new one match the first one in size
* this is needed because window creation and resize is a synchronous operation in some systems.
* as such, there's a chance the non-1st top-level-widgets would never get a valid size.
*/
if (!window.pData->topLevelWidgets.empty())
{
TopLevelWidget* const first = window.pData->topLevelWidgets.front();

selfw->pData->size = first->getSize();
}

window.pData->topLevelWidgets.push_back(self);
}

Expand Down
18 changes: 14 additions & 4 deletions dpf/dgl/src/pugl-upstream/src/win.c
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,16 @@
#define PUGL_LOCAL_CLIENT_MSG (WM_USER + 52)
#define PUGL_USER_TIMER_MIN 9470

#ifdef __cplusplus
# define PUGL_INIT_STRUCT \
{}
#else
# define PUGL_INIT_STRUCT \
{ \
0 \
}
#endif

typedef BOOL(WINAPI* PFN_SetProcessDPIAware)(void);
typedef HRESULT(WINAPI* PFN_GetProcessDpiAwareness)(HANDLE, DWORD*);
typedef HRESULT(WINAPI* PFN_GetScaleFactorForMonitor)(HMONITOR, DWORD*);
Expand Down Expand Up @@ -80,7 +90,7 @@ puglRegisterWindowClass(const char* name)
module = GetModuleHandle(NULL);
}

WNDCLASSEX wc = {0};
WNDCLASSEX wc = PUGL_INIT_STRUCT;
if (GetClassInfoEx(module, name, &wc)) {
return true; // Already registered
}
Expand Down Expand Up @@ -472,8 +482,8 @@ initKeyEvent(PuglKeyEvent* event,
}
} else if (!dead) {
// Translate unshifted key
BYTE keyboardState[256] = {0};
wchar_t buf[5] = {0};
BYTE keyboardState[256] = PUGL_INIT_STRUCT;
wchar_t buf[5] = PUGL_INIT_STRUCT;

event->key = puglDecodeUTF16(
buf, ToUnicode(vkey, vcode, keyboardState, buf, 4, 1 << 2));
Expand Down Expand Up @@ -689,7 +699,7 @@ handleMessage(PuglView* view, UINT message, WPARAM wParam, LPARAM lParam)
pt.y = GET_Y_LPARAM(lParam);

if (!view->impl->mouseTracked) {
TRACKMOUSEEVENT tme = {0};
TRACKMOUSEEVENT tme = PUGL_INIT_STRUCT;

tme.cbSize = sizeof(tme);
tme.dwFlags = TME_LEAVE;
Expand Down
6 changes: 6 additions & 0 deletions dpf/distrho/DistrhoPlugin.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,12 @@ static const uint32_t kCVPortHasPositiveUnipolarRange = 0x40;
*/
static const uint32_t kCVPortHasScaledRange = 0x80;

/**
CV port is optional, allowing hosts that do no CV ports to load the plugin.
When loaded in hosts that don't support CV, the float* buffer for this port will be null.
*/
static const uint32_t kCVPortIsOptional = 0x100;

/** @} */

/* ------------------------------------------------------------------------------------------------------------
Expand Down
Loading

0 comments on commit 0cba155

Please sign in to comment.