Plugin struct

The base plugin Inheriting plugins must have this as a child.

Contents

Public variables

Lv2Plugin* lv2
Pointer back to plugin in its original format.
CarlaNativePlugin* carla
Pointer to Carla native plugin.
PluginDescriptor* descr
Descriptor.
Port** in_ports
Ports coming in as input.
Port** out_ports
Outgoing ports.
Port* enabled
Control for plugin enabled, for convenience.
Port* gain
Control for plugin gain, for convenience.
bool visible
Whether plugin UI is opened or not.
nframes_t latency
Latency reported by the Lv2Plugin, if any, in samples.
bool instantiated
Whether the plugin is currently instantiated or not.
bool activated
Whether the plugin is currently activated or not.
int ui_instantiated
Whether the UI has finished instantiating.
float ui_update_hz
Update frequency of the UI, in Hz (times per second).
char* state_dir
State directory (only basename).
bool deleting
Whether the plugin is currently being deleted.
GtkCheckMenuItem* active_preset_item
Active preset item, if wrapped or generic UI.
GtkWindow* window
The Plugin's window.
GtkEventBox* ev_box
The GdkWindow of this widget should be somewhere inside Plugin::window and will be used for wrapping plugin UIs in.
GtkBox* vbox
Vbox containing the above ev_box for wrapping, or used for packing generic UI controls.
gulong delete_event_id
ID of the delete-event signal for Plugin::window so that we can deactivate before freeing the plugin.

Variable documentation

Port* Plugin::enabled

Control for plugin enabled, for convenience.

This port is already in Plugin::in_ports.

Port* Plugin::gain

Control for plugin gain, for convenience.

This port is already in Plugin::in_ports.

int Plugin::ui_instantiated

Whether the UI has finished instantiating.

When instantiating a plugin UI, if it takes too long there is a UI buffer overflow because UI updates are sent in lv2_plugin_process.

This should be set to false until the plugin UI has finished instantiating, and if this is false then no UI updates should be sent to the plugin.

char* Plugin::state_dir

State directory (only basename).

Used for saving/loading the state.

GtkWindow* Plugin::window

The Plugin's window.

This is used for both generic UIs and for X11/Windows when plugins are wrapped.

All VST plugin UIs are wrapped.

LV2 plugin UIs are only not wrapped when they have external UIs. In that case, this must be NULL.