Plugins module

Code related to audio Plugins (LV2).

Contents

Classes

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

Typedefs

using Plugin = struct Plugin
The base plugin Inheriting plugins must have this as a child.

Functions

void lv2_gtk_ui_port_event(Lv2Plugin* plugin, uint32_t port_index, uint32_t buffer_size, uint32_t protocol, const void* buffer)
Called when there is a UI port event from the plugin.
void lv2_gtk_set_float_control(const Lv2Control* control, float value)
Called by generic UI callbacks when e.g.
void plugin_add_automation_track(Plugin* self, AutomationTrack* at)
Adds an AutomationTrack to the Plugin.
void plugin_add_in_port(Plugin* pl, Port* port)
Adds an in port to the plugin's list.
void plugin_add_out_port(Plugin* pl, Port* port)
Adds an out port to the plugin's list.
void plugin_add_unknown_port(Plugin* pl, Port* port)
Adds an unknown port to the plugin's list.
auto plugin_new_from_descr(const PluginDescriptor* descr) -> Plugin*
Creates/initializes a plugin and its internal plugin (LV2, etc.) using the given descriptor.
void plugin_remove_ats_from_automation_tracklist(Plugin* pl)
Removes the automation tracks associated with this plugin from the automation tracklist in the corresponding track.
void plugin_copy_descr(const PluginDescriptor* src, PluginDescriptor* dest)
Clones the plugin descriptor.
auto plugin_clone_descr(const PluginDescriptor* src) -> PluginDescriptor*
Clones the plugin descriptor.
auto plugin_clone(Plugin* pl) -> Plugin*
Clones the given plugin.
void plugin_set_channel_and_slot(Plugin* pl, Channel* ch, int slot)
Sets the channel and slot on the plugin and its ports.
auto plugin_descriptor_is_instrument(const PluginDescriptor* descr) -> int
Returns if the Plugin is an instrument or not.
auto plugin_descriptor_is_effect(PluginDescriptor* descr) -> int
Returns if the Plugin is an effect or not.
auto plugin_descriptor_is_modulator(PluginDescriptor* descr) -> int
Returns if the Plugin is a modulator or not.
auto plugin_descriptor_is_midi_modifier(PluginDescriptor* descr) -> int
Returns if the Plugin is a midi modifier or not.
auto plugin_descriptor_string_to_category(const char* str) -> PluginCategory
Returns the PluginCategory matching the given string.
void plugin_move_automation(Plugin* pl, Channel* prev_ch, Channel* ch)
Moves the Plugin's automation from one Channel to another.
void plugin_update_latency(Plugin* pl)
Updates the plugin's latency.
void plugin_generate_automation_tracks(Plugin* plugin)
Generates automatables for the plugin.
auto plugin_instantiate(Plugin* plugin) -> int
Loads the plugin from its state file.
void plugin_set_track(Plugin* pl, Track* tr)
Sets the track and track_pos on the plugin.
void plugin_process(Plugin* plugin, const long g_start_frames, const nframes_t nframes)
Process plugin.
void plugin_open_ui(Plugin* plugin)
Process show ui.
auto plugin_is_selected(Plugin* pl) -> int
Returns if Plugin exists in MixerSelections.
void plugin_close_ui(Plugin* plugin)
Process hide ui.
void plugin_update_automatables(Plugin* plugin)
(re)Generates automatables for the plugin.
void plugin_connect_to_plugin(Plugin* src, Plugin* dest)
Connect the output Ports of the given source Plugin to the input Ports of the given destination Plugin.
void plugin_disconnect_from_plugin(Plugin* src, Plugin* dest)
Disconnect the automatic connections from the given source Plugin to the given destination Plugin.
void plugin_connect_to_prefader(Plugin* pl, Channel* ch)
Connects the Plugin's output Port's to the input Port's of the given Channel's prefader.
void plugin_disconnect_from_prefader(Plugin* pl, Channel* ch)
Disconnect the automatic connections from the Plugin to the Channel's prefader (if last Plugin).
void plugin_disconnect(Plugin* plugin)
To be called immediately when a channel or plugin is deleted.
void plugin_free(Plugin* plugin)
Frees given plugin, breaks all its port connections, and frees its ports and other internal pointers.

Function documentation

void lv2_gtk_set_float_control(const Lv2Control* control, float value)

Called by generic UI callbacks when e.g.

a slider changes value.

void plugin_remove_ats_from_automation_tracklist(Plugin* pl)

Removes the automation tracks associated with this plugin from the automation tracklist in the corresponding track.

Used e.g. when moving plugins.

void plugin_update_latency(Plugin* pl)

Updates the plugin's latency.

Calls the plugin format's get_latency() function and stores the result in the plugin.

void plugin_generate_automation_tracks(Plugin* plugin)

Generates automatables for the plugin.

Plugin must be instantiated already.

int plugin_instantiate(Plugin* plugin)

Loads the plugin from its state file.

Instantiates the plugin (e.g. when adding to a channel)

Loads the plugin from its state file.

when adding to a channel).

void plugin_process(Plugin* plugin, const long g_start_frames, const nframes_t nframes)

Process plugin.

Parameters
plugin
g_start_frames The global start frames.
nframes The number of frames to process.

void plugin_open_ui(Plugin* plugin)

Process show ui.

Process show ui.

void plugin_close_ui(Plugin* plugin)

Process hide ui.

Process hide ui.

void plugin_connect_to_plugin(Plugin* src, Plugin* dest)

Connect the output Ports of the given source Plugin to the input Ports of the given destination Plugin.

Used when automatically connecting a Plugin in the Channel strip to the next Plugin.

void plugin_connect_to_prefader(Plugin* pl, Channel* ch)

Connects the Plugin's output Port's to the input Port's of the given Channel's prefader.

Used when doing automatic connections.

void plugin_disconnect(Plugin* plugin)

To be called immediately when a channel or plugin is deleted.

A call to plugin_free can be made at any point later just to free the resources.

void plugin_free(Plugin* plugin)

Frees given plugin, breaks all its port connections, and frees its ports and other internal pointers.

Frees given plugin, breaks all its port connections, and frees its ports and other internal pointers.