How do you open the plugin editor in Linux VST2 plugs?

Programming applications for making music on Linux.

Moderators: MattKingUSA, khz

Post Reply
xos
Established Member
Posts: 12
Joined: Sat Jul 23, 2022 12:01 pm
Been thanked: 5 times

How do you open the plugin editor in Linux VST2 plugs?

Post by xos »

This is a programming question about VST2 plugs in Linux.

When you get a opcode 14 to the dispatcher 'effEditOpen' that is what is used to open the GUI for the VST2 plugin.

What exactly is in that 'void *ptr' that the dispatcher gives you in Linux?
And how should you use it?

Is it a x11 variable of the type 'Window'?
And can a declaration of a such parameter be...
Window *win;

But exactly is it a pointer to?
User avatar
sadko4u
Established Member
Posts: 983
Joined: Mon Sep 28, 2015 9:03 pm
Has thanked: 2 times
Been thanked: 359 times

Re: How do you open the plugin editor in Linux VST2 plugs?

Post by sadko4u »

You can consider the following:

Code: Select all

#include <X11/Xlib.h>
Window wnd = reinterpret_cast<Window>(ptr);

// TODO: Create a child X11 window with wnd as parent
LSP (Linux Studio Plugins) Developer and Maintainer.
rlma
Posts: 1
Joined: Fri Aug 05, 2022 11:19 pm

Re: How do you open the plugin editor in Linux VST2 plugs?

Post by rlma »

Hi xos,
wnd was created from the VST host using:

Code: Select all

#include <X11/Xlib.h>

Window wnd = XCreateSimpleWindow(...)
// or Window wnd = XCreateWindow(...)
You can use the window to draw into, or create your own and use XReparentWindow() to fit your window into the window hierarchy.
Post Reply