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.
PluginSetting* setting
Setting this plugin was instantiated with.
Port** in_ports
Ports coming in as input.
Port** out_ports
Outgoing ports.
Port** lilv_ports
Ports at their lilv indices.
Port* enabled
Control for plugin enabled, for convenience.
Port* own_enabled_port
Whether the plugin has a custom "enabled" port (LV2).
Port* gain
Control for plugin gain, for convenience.
Port* l_out
Instrument left stereo output, 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 instantiation_failed
Set to true if instantiation failed and the plugin will be treated as disabled.
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).
float ui_scale_factor
Scale factor for drawing UIs in scale of the monitor.
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.
bool external_ui_visible
Whether show () has been called on the LV2 external UI.
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 destroy_window_id
ID of the destroy signal for Plugin::window so that we can deactivate before freeing the plugin.
gulong delete_event_id
ID of the delete-event signal for Plugin::window so that we can deactivate before freeing the plugin.
bool is_project
Whether this plugin is currently used in the project.
ModulatorWidget* modulator_widget
Modulator widget, if modulator.
guint update_ui_source_id
ID of GSource (if > 0).
bool deactivating
Temporary variable to check if plugin is currently undergoing deactivation.

Variable documentation

Port** Plugin::lilv_ports

Ports at their lilv indices.

These point to ports in Plugin::in_ports and Plugin::out_ports so should not be freed.

Port* Plugin::enabled

Control for plugin enabled, for convenience.

This port is already in Plugin::in_ports.

Port* Plugin::own_enabled_port

Whether the plugin has a custom "enabled" port (LV2).

If true, bypass logic will be delegated to the plugin.

Port* Plugin::gain

Control for plugin gain, for convenience.

This port is already in Plugin::in_ports.

Port* Plugin::l_out

Instrument left stereo output, for convenience.

This port is already in Plugin::out_ports if instrument.

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.

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

guint Plugin::update_ui_source_id

ID of GSource (if > 0).

@seealso update_plugin_ui().