Zrythm
a highly automated and intuitive digital audio workstation
Loading...
Searching...
No Matches
Plugins

Audio plugin handling. More...

Data Structures

struct  CachedPluginDescriptors
 Descriptors to be cached. More...
 
struct  CarlaPatchbayPortInfo
 
struct  CarlaNativePlugin
 
struct  PluginCollection
 Plugin collection used in the plugin browser. More...
 
struct  PluginCollections
 Serializable plugin collections. More...
 
struct  Plugin
 The base plugin Inheriting plugins must have this as a child. More...
 
struct  PluginDescriptor
 
struct  PluginGtkController
 Widget for a control. More...
 
struct  PluginGtkPresetRecord
 
struct  PluginIdentifier
 Plugin identifier. More...
 
struct  PluginManager
 The PluginManager is responsible for scanning and keeping track of available Plugin's. More...
 
struct  PluginPresetIdentifier
 Preset identifier. More...
 
struct  PluginPreset
 Plugin preset. More...
 
struct  PluginBank
 A plugin bank containing presets. More...
 

Macros

#define CACHED_PLUGIN_DESCRIPTORS_SCHEMA_VERSION   3
 
#define CARLA_STATE_FILENAME   "state.carla"
 
#define PLUGIN_COLLECTION_SCHEMA_VERSION   1
 
#define PLUGIN_COLLECTIONS_SCHEMA_VERSION   1
 
#define PLUGIN_SCHEMA_VERSION   1
 
#define PLUGIN_MAGIC   43198683
 
#define IS_PLUGIN(x)   (((Plugin *) x)->magic == PLUGIN_MAGIC)
 
#define IS_PLUGIN_AND_NONNULL(x)   (x && IS_PLUGIN (x))
 
#define PLUGIN_MIN_REFRESH_RATE   30.f
 Plugin UI refresh rate limits.
 
#define PLUGIN_MAX_REFRESH_RATE   121.f
 
#define PLUGIN_MIN_SCALE_FACTOR   0.5f
 Plugin UI scale factor limits.
 
#define PLUGIN_MAX_SCALE_FACTOR   4.f
 
#define plugin_is_in_active_project(self)    (self->track && track_is_in_active_project (self->track))
 
#define plugin_is_auditioner(self)    (self->track && track_is_auditioner (self->track))
 Whether the plugin is used for MIDI auditioning in SampleProcessor.
 
#define PLUGIN_DESCRIPTOR_SCHEMA_VERSION   1
 
#define PLUGIN_IDENTIFIER_SCHEMA_VERSION   1
 
#define PLUGIN_MANAGER   (ZRYTHM->plugin_manager)
 
#define LILV_WORLD   (PLUGIN_MANAGER->lilv_world)
 
#define LILV_PLUGINS   (PLUGIN_MANAGER->lilv_plugins)
 
#define LV2_GENERATOR_PLUGIN   "Generator"
 
#define LV2_CONSTANT_PLUGIN   "Constant"
 
#define LV2_INSTRUMENT_PLUGIN   "Instrument"
 
#define LV2_OSCILLATOR_PLUGIN   "Oscillator"
 
#define PM_URIDS   (PLUGIN_MANAGER->urids)
 
#define PM_SYMAP   (PLUGIN_MANAGER->symap)
 
#define PM_SYMAP_LOCK   (PLUGIN_MANAGER->symap_lock)
 
#define PM_GET_NODE(uri)   plugin_manager_get_node (PLUGIN_MANAGER, uri)
 
#define PLUGIN_BANK_SCHEMA_VERSION   1
 
#define PLUGIN_PRESET_IDENTIFIER_SCHEMA_VERSION   1
 
#define PLUGIN_PRESET_SCHEMA_VERSION   1
 

Enumerations

enum  CarlaPluginType {
  CARLA_PLUGIN_NONE , CARLA_PLUGIN_RACK , CARLA_PLUGIN_PATCHBAY , CARLA_PLUGIN_PATCHBAY16 ,
  CARLA_PLUGIN_PATCHBAY32 , CARLA_PLUGIN_PATCHBAY64
}
 The type of the Carla plugin. More...
 
enum  ZPluginCategory {
  ZPLUGIN_CATEGORY_NONE , PC_DELAY , PC_REVERB , PC_DISTORTION ,
  PC_WAVESHAPER , PC_DYNAMICS , PC_AMPLIFIER , PC_COMPRESSOR ,
  PC_ENVELOPE , PC_EXPANDER , PC_GATE , PC_LIMITER ,
  PC_FILTER , PC_ALLPASS_FILTER , PC_BANDPASS_FILTER , PC_COMB_FILTER ,
  PC_EQ , PC_MULTI_EQ , PC_PARA_EQ , PC_HIGHPASS_FILTER ,
  PC_LOWPASS_FILTER , PC_GENERATOR , PC_CONSTANT , PC_INSTRUMENT ,
  PC_OSCILLATOR , PC_MIDI , PC_MODULATOR , PC_CHORUS ,
  PC_FLANGER , PC_PHASER , PC_SIMULATOR , PC_SIMULATOR_REVERB ,
  PC_SPATIAL , PC_SPECTRAL , PC_PITCH , PC_UTILITY ,
  PC_ANALYZER , PC_CONVERTER , PC_FUNCTION , PC_MIXER
}
 Plugin category. More...
 
enum  ZPluginProtocol {
  Z_PLUGIN_PROTOCOL_DUMMY , Z_PLUGIN_PROTOCOL_LV2 , Z_PLUGIN_PROTOCOL_DSSI , Z_PLUGIN_PROTOCOL_LADSPA ,
  Z_PLUGIN_PROTOCOL_VST , Z_PLUGIN_PROTOCOL_VST3 , Z_PLUGIN_PROTOCOL_AU , Z_PLUGIN_PROTOCOL_SFZ ,
  Z_PLUGIN_PROTOCOL_SF2 , Z_PLUGIN_PROTOCOL_CLAP , Z_PLUGIN_PROTOCOL_JSFX
}
 Plugin protocol. More...
 
enum  PluginArchitecture { ARCH_32 , ARCH_64 }
 32 or 64 bit. More...
 
enum  CarlaBridgeMode { CARLA_BRIDGE_NONE , CARLA_BRIDGE_UI , CARLA_BRIDGE_FULL }
 Carla bridge mode. More...
 
enum  PluginSlotType {
  PLUGIN_SLOT_INVALID , PLUGIN_SLOT_INSERT , PLUGIN_SLOT_MIDI_FX , PLUGIN_SLOT_INSTRUMENT ,
  PLUGIN_SLOT_MODULATOR
}
 

Functions

CachedPluginDescriptorscached_plugin_descriptors_new (void)
 Reads the file and fills up the object.
 
void cached_plugin_descriptors_serialize_to_file (CachedPluginDescriptors *self)
 
int cached_plugin_descriptors_is_blacklisted (CachedPluginDescriptors *self, const char *abs_path)
 Returns if the plugin at the given path is blacklisted or not.
 
const PluginDescriptorcached_plugin_descriptors_find (CachedPluginDescriptors *self, const PluginDescriptor *descr, bool check_valid, bool check_blacklisted)
 Finds a descriptor matching the given one's unique identifiers.
 
PluginDescriptor ** cached_plugin_descriptors_get (CachedPluginDescriptors *self, const char *abs_path)
 Returns the PluginDescriptor's corresponding to the .so/.dll file at the given path, if it exists and the MD5 hash matches.
 
void cached_plugin_descriptors_blacklist (CachedPluginDescriptors *self, const char *abs_path, int _serialize)
 Appends a descriptor to the cache.
 
void cached_plugin_descriptors_replace (CachedPluginDescriptors *self, const PluginDescriptor *_new_descr, bool _serialize)
 Replaces a descriptor in the cache.
 
void cached_plugin_descriptors_add (CachedPluginDescriptors *self, const PluginDescriptor *descr, int _serialize)
 Appends a descriptor to the cache.
 
void cached_plugin_descriptors_clear (CachedPluginDescriptors *self)
 Clears the descriptors and removes the cache file.
 
void cached_plugin_descriptors_free (CachedPluginDescriptors *self)
 
void plugin_collection_init_loaded (PluginCollection *self)
 
PluginCollectionplugin_collection_new (void)
 Creates a new plugin collection.
 
PluginCollectionplugin_collection_clone (const PluginCollection *self)
 Clones a plugin collection.
 
char * plugin_collection_get_name (PluginCollection *self)
 
void plugin_collection_set_name (PluginCollection *self, const char *name)
 
NONNULL bool plugin_collection_contains_descriptor (PluginCollection *self, const PluginDescriptor *descr, bool match_pointer)
 Returns whether the collection contains the given descriptor.
 
void plugin_collection_add_descriptor (PluginCollection *self, const PluginDescriptor *descr)
 Appends a descriptor to the collection.
 
void plugin_collection_remove_descriptor (PluginCollection *self, const PluginDescriptor *descr)
 Removes the descriptor matching the given one from the collection.
 
void plugin_collection_clear (PluginCollection *self)
 Removes all the descriptors.
 
void plugin_collection_free (PluginCollection *self)
 
PluginCollectionsplugin_collections_new (void)
 Reads the file and fills up the object.
 
void plugin_collections_serialize_to_file (PluginCollections *self)
 
void plugin_collections_remove (PluginCollections *self, PluginCollection *collection, bool serialize)
 Removes the given collection.
 
void plugin_collections_free (PluginCollections *self)
 
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 (Lv2Plugin *lv2_plugin, Port *port, float value)
 Called by generic UI callbacks when e.g.
 
int lv2_gtk_open_ui (Lv2Plugin *plugin)
 Opens the LV2 plugin's UI (either wrapped with suil or external).
 
void lv2_gtk_on_save_preset_activate (GtkWidget *widget, Lv2Plugin *plugin, const char *path, const char *uri, bool add_prefix)
 Called by plugin_gtk_on_save_preset_activate() on accept.
 
GtkWidget * lv2_gtk_build_control_widget (Lv2Plugin *plugin, GtkWindow *window)
 
void lv2_gtk_on_delete_preset_activate (GtkWidget *widget, Lv2Plugin *plugin)
 
void plugin_init_loaded (Plugin *self, Track *track, MixerSelections *ms)
 
NONNULL void plugin_add_automation_track (Plugin *self, AutomationTrack *at)
 Adds an AutomationTrack to the Plugin.
 
NONNULL void plugin_add_in_port (Plugin *pl, Port *port)
 Adds an in port to the plugin's list.
 
NONNULL void plugin_add_out_port (Plugin *pl, Port *port)
 Adds an out port to the plugin's list.
 
Pluginplugin_new_from_setting (PluginSetting *setting, unsigned int track_name_hash, PluginSlotType slot_type, int slot, GError **error)
 Creates/initializes a plugin and its internal plugin (LV2, etc.) using the given setting.
 
Pluginplugin_new_dummy (ZPluginCategory cat, unsigned int track_name_hash, int slot)
 Create a dummy plugin for tests.
 
NONNULL void plugin_set_ui_refresh_rate (Plugin *self)
 Sets the UI refresh rate on the Plugin.
 
NONNULL Portplugin_get_enabled_port (Plugin *self)
 Gets the enable/disable port for this plugin.
 
NONNULL bool plugin_validate (Plugin *self)
 Verifies that the plugin identifiers are valid.
 
void plugin_print (Plugin *self, char *buf, size_t buf_sz)
 Prints the plugin to the buffer, if any, or to the log.
 
NONNULL void plugin_remove_ats_from_automation_tracklist (Plugin *pl, bool free_ats, bool fire_events)
 Removes the automation tracks associated with this plugin from the automation tracklist in the corresponding track.
 
 NONNULL_ARGS (1) Plugin *plugin_clone(Plugin *src
 Clones the given plugin.
 
void plugin_get_full_port_group_designation (Plugin *self, const char *port_group, char *buf)
 
NONNULL Portplugin_get_port_in_group (Plugin *self, const char *port_group, bool left)
 
NONNULL Portplugin_get_port_in_same_group (Plugin *self, Port *port)
 Find corresponding port in the same port group (eg, if this is left, find right and vice versa).
 
NONNULL int plugin_activate (Plugin *pl, bool activate)
 Activates or deactivates the plugin.
 
NONNULL void plugin_move (Plugin *pl, Track *track, PluginSlotType slot_type, int slot, bool confirm_overwrite, bool fire_events)
 Moves the plugin to the given slot in the given channel.
 
NONNULL void plugin_set_track_and_slot (Plugin *pl, unsigned int track_name_hash, PluginSlotType slot_type, int slot)
 Sets the channel and slot on the plugin and its ports.
 
NONNULL void plugin_move_automation (Plugin *pl, Track *prev_track, Track *track, PluginSlotType new_slot_type, int new_slot)
 Moves the Plugin's automation from one Channel to another.
 
NONNULL void plugin_append_ports (Plugin *self, GPtrArray *ports)
 
NONNULL void plugin_expose_ports (Plugin *pl, bool expose, bool inputs, bool outputs)
 Exposes or unexposes plugin ports to the backend.
 
NONNULL Portplugin_get_port_by_symbol (Plugin *pl, const char *sym)
 Gets a port by its symbol.
 
NONNULL Portplugin_get_port_by_param_uri (Plugin *pl, const char *uri)
 Gets a port by its param URI.
 
NONNULL MALLOC char * plugin_get_escaped_name (Plugin *pl)
 Returns the escaped name of the plugin.
 
int plugin_copy_state_dir (Plugin *self, Plugin *src, bool is_backup, const char *abs_state_dir)
 Copies the state directory from the given source plugin to the given destination plugin's state directory.
 
NONNULL MALLOC char * plugin_get_abs_state_dir (Plugin *self, bool is_backup, bool create_if_not_exists)
 Returns the state dir as an absolute path.
 
NONNULL WARN_UNUSED_RESULT bool plugin_ensure_state_dir (Plugin *self, bool is_backup, GError **error)
 Ensures the state dir exists or creates it.
 
NONNULL void plugin_get_all (Project *prj, GPtrArray *arr, bool check_undo_manager)
 Returns all plugins in the current project.
 
NONNULL Pluginplugin_find (const PluginIdentifier *id)
 
NONNULL void plugin_update_identifier (Plugin *self)
 To be called when changes to the plugin identifier were made, so we can update all children recursively.
 
NONNULL void plugin_update_latency (Plugin *pl)
 Updates the plugin's latency.
 
NONNULL void plugin_generate_automation_tracks (Plugin *plugin, Track *track)
 Generates automatables for the plugin.
 
HOT NONNULL OPTIMIZE_O3 void plugin_prepare_process (Plugin *self)
 Prepare plugin for processing.
 
int plugin_instantiate (Plugin *self, LilvState *state, GError **error)
 Instantiates the plugin (e.g.
 
NONNULL void plugin_set_track_name_hash (Plugin *pl, unsigned int track_name_hash)
 Sets the track name hash on the plugin.
 
NONNULL HOT void plugin_process (Plugin *plugin, const EngineProcessTimeInfo *const time_nfo)
 Process plugin.
 
NONNULL MALLOC char * plugin_generate_window_title (Plugin *plugin)
 
NONNULL void plugin_open_ui (Plugin *plugin)
 Process show ui.
 
NONNULL bool plugin_is_selected (Plugin *pl)
 Returns if Plugin exists in MixerSelections.
 
NONNULL void plugin_select (Plugin *self, bool select, bool exclusive)
 Selects the plugin in the MixerSelections.
 
NONNULL bool plugin_is_enabled (Plugin *self, bool check_track)
 Returns whether the plugin is enabled.
 
NONNULL void plugin_set_enabled (Plugin *self, bool enabled, bool fire_events)
 
HOT NONNULL void plugin_process_passthrough (Plugin *self, const EngineProcessTimeInfo *const time_nfo)
 Processes the plugin by passing through the input to its output.
 
NONNULL int plugin_get_event_ports (Plugin *pl, Port **ports, int input)
 Returns the event ports in the plugin.
 
NONNULL void plugin_close_ui (Plugin *plugin)
 Process hide ui.
 
NONNULL void plugin_update_automatables (Plugin *plugin)
 (re)Generates automatables for the plugin.
 
PluginBankplugin_add_bank_if_not_exists (Plugin *self, const char *uri, const char *name)
 
NONNULL void plugin_add_preset_to_bank (Plugin *self, PluginBank *bank, PluginPreset *preset)
 
NONNULL void plugin_set_selected_bank_from_index (Plugin *self, int idx)
 
NONNULL void plugin_set_selected_preset_from_index (Plugin *self, int idx)
 
NONNULL void plugin_set_selected_preset_by_name (Plugin *self, const char *name)
 
NONNULL void plugin_set_caches (Plugin *self)
 Sets caches for processing.
 
NONNULL 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.
 
NONNULL void plugin_disconnect_from_plugin (Plugin *src, Plugin *dest)
 Disconnect the automatic connections from the given source Plugin to the given destination Plugin.
 
NONNULL 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.
 
NONNULL void plugin_disconnect_from_prefader (Plugin *pl, Channel *ch)
 Disconnect the automatic connections from the Plugin to the Channel's prefader (if last Plugin).
 
NONNULL void plugin_disconnect (Plugin *plugin)
 To be called immediately when a channel or plugin is deleted.
 
NONNULL void plugin_delete_state_files (Plugin *self)
 Deletes any state files associated with this plugin.
 
NONNULL int plugin_cleanup (Plugin *self)
 Cleans up an instantiated but not activated plugin.
 
NONNULL void plugin_free (Plugin *plugin)
 Frees given plugin, breaks all its port connections, and frees its ports and other internal pointers.
 
PluginDescriptorplugin_descriptor_new (void)
 
const char * plugin_protocol_to_str (ZPluginProtocol prot)
 
ZPluginProtocol plugin_protocol_from_str (const char *str)
 
const char * plugin_category_to_string (ZPluginCategory category)
 
NONNULL void plugin_descriptor_copy (PluginDescriptor *dest, const PluginDescriptor *src)
 Clones the plugin descriptor.
 
NONNULL PluginDescriptorplugin_descriptor_clone (const PluginDescriptor *src)
 Clones the plugin descriptor.
 
NONNULL bool plugin_descriptor_is_instrument (const PluginDescriptor *const descr)
 Returns if the Plugin is an instrument or not.
 
NONNULL bool plugin_descriptor_is_effect (const PluginDescriptor *const descr)
 Returns if the Plugin is an effect or not.
 
NONNULL int plugin_descriptor_is_modulator (const PluginDescriptor *const descr)
 Returns if the Plugin is a modulator or not.
 
NONNULL int plugin_descriptor_is_midi_modifier (const PluginDescriptor *const descr)
 Returns if the Plugin is a midi modifier or not.
 
NONNULL ZPluginCategory plugin_descriptor_string_to_category (const char *str)
 Returns the ZPluginCategory matching the given string.
 
char * plugin_descriptor_category_to_string (ZPluginCategory category)
 
const char * plugin_descriptor_get_icon_name (const PluginDescriptor *const self)
 Gets an appropriate icon name for the given descriptor.
 
bool plugin_descriptor_is_valid_for_slot_type (const PluginDescriptor *self, int slot_type, int track_type)
 Returns if the given plugin identifier can be dropped in a slot of the given type.
 
NONNULL bool plugin_descriptor_is_same_plugin (const PluginDescriptor *a, const PluginDescriptor *b)
 Returns whether the two descriptors describe the same plugin, ignoring irrelevant fields.
 
NONNULL bool plugin_descriptor_has_custom_ui (const PluginDescriptor *self)
 Returns if the Plugin has a supported custom UI.
 
NONNULL CarlaBridgeMode plugin_descriptor_get_min_bridge_mode (const PluginDescriptor *self)
 Returns the minimum bridge mode required for this plugin.
 
NONNULL bool plugin_descriptor_is_whitelisted (const PluginDescriptor *self)
 Returns whether the plugin is known to work, so it should be whitelisted.
 
NONNULL GMenuModel * plugin_descriptor_generate_context_menu (const PluginDescriptor *self)
 
NONNULL void plugin_descriptor_free (PluginDescriptor *self)
 
NONNULL void plugin_descriptor_free_closure (void *data, GClosure *closure)
 
void plugin_gtk_create_window (Plugin *plugin)
 Creates a new GtkWindow that will be used to either wrap plugin UIs or create generic UIs in.
 
void plugin_gtk_open_generic_ui (Plugin *plugin, bool fire_events)
 Opens the generic UI of the plugin.
 
NONNULL int plugin_gtk_update_plugin_ui (Plugin *pl)
 Called on each GUI frame to update the GTK UI.
 
int plugin_gtk_close_ui (Plugin *plugin)
 Closes the plugin's UI (either LV2 wrapped with suil, generic or LV2 external).
 
void plugin_gtk_set_window_title (Plugin *plugin, GtkWindow *window)
 
void plugin_gtk_add_control_row (GtkWidget *table, int row, const char *name, PluginGtkController *controller)
 
void plugin_gtk_on_save_preset_activate (GtkWidget *widget, Plugin *plugin)
 
gint plugin_gtk_menu_cmp (gconstpointer a, gconstpointer b, gpointer data)
 
bool plugin_gtk_setup_plugin_banks_combo_box (GtkComboBoxText *cb, Plugin *plugin)
 Sets up the combo box with all the banks the plugin has.
 
bool plugin_gtk_setup_plugin_presets_list_box (GtkListBox *box, Plugin *plugin)
 Sets up the combo box with all the presets the plugin has in the given bank, or all the presets if NULL is given.
 
GtkWidget * plugin_gtk_new_label (const char *text, bool title, bool preformatted, float xalign, float yalign)
 Creates a label for a control.
 
void plugin_gtk_generic_set_widget_value (Plugin *pl, PluginGtkController *controller, uint32_t size, LV2_URID type, const void *body)
 Called when a property changed or when there is a UI port event to set (update) the widget's value.
 
void plugin_identifier_init (PluginIdentifier *self)
 
void plugin_identifier_copy (PluginIdentifier *dest, const PluginIdentifier *src)
 
NONNULL bool plugin_identifier_validate (const PluginIdentifier *self)
 
bool plugin_identifier_validate_slot_type_slot_combo (PluginSlotType slot_type, int slot)
 Verifies that slot_type and slot is a valid combination.
 
void plugin_identifier_print (const PluginIdentifier *self, char *str)
 
PluginManagerplugin_manager_new (void)
 
const LilvNode * plugin_manager_get_node (PluginManager *self, const char *uri)
 Returns a cached LilvNode for the given URI.
 
void plugin_manager_scan_plugins (PluginManager *self, const double max_progress, double *progress)
 Scans for plugins, optionally updating the progress.
 
PluginDescriptorplugin_manager_find_plugin_from_uri (PluginManager *self, const char *uri)
 Returns the PluginDescriptor instance for the given URI.
 
PluginDescriptorplugin_manager_find_from_descriptor (PluginManager *self, const PluginDescriptor *src_descr)
 Finds and returns the PluginDescriptor instance matching the given descriptor.
 
bool plugin_manager_supports_protocol (PluginManager *self, ZPluginProtocol protocol)
 Returns if the plugin manager supports the given plugin protocol.
 
PluginDescriptorplugin_manager_pick_instrument (PluginManager *self)
 Returns an instrument plugin, if any.
 
void plugin_manager_clear_plugins (PluginManager *self)
 
void plugin_manager_free (PluginManager *self)
 
PluginBankplugin_bank_new (void)
 
PluginPresetplugin_preset_new (void)
 
NONNULL void plugin_preset_identifier_init (PluginPresetIdentifier *id)
 
GMenuModel * PluginCollection::plugin_collection_generate_context_menu (const PluginCollection *self)
 
void PluginCollections::plugin_collections_add (PluginCollections *self, const PluginCollection *collection, bool serialize)
 Appends a collection.
 
const PluginCollectionPluginCollections::plugin_collections_find_from_name (const PluginCollections *self, const char *name)
 
NONNULL ChannelPlugin::plugin_get_channel (Plugin *self)
 
NONNULL TrackPlugin::plugin_get_track (const Plugin *self)
 

Variables

GError ** error
 

Detailed Description

Audio plugin handling.

Macro Definition Documentation

◆ CACHED_PLUGIN_DESCRIPTORS_SCHEMA_VERSION

#define CACHED_PLUGIN_DESCRIPTORS_SCHEMA_VERSION   3

Definition at line 22 of file cached_plugin_descriptors.h.

◆ CARLA_STATE_FILENAME

#define CARLA_STATE_FILENAME   "state.carla"

Definition at line 29 of file carla_native_plugin.h.

◆ IS_PLUGIN

#define IS_PLUGIN (   x)    (((Plugin *) x)->magic == PLUGIN_MAGIC)

Definition at line 43 of file plugin.h.

◆ IS_PLUGIN_AND_NONNULL

#define IS_PLUGIN_AND_NONNULL (   x)    (x && IS_PLUGIN (x))

Definition at line 44 of file plugin.h.

◆ LILV_PLUGINS

#define LILV_PLUGINS   (PLUGIN_MANAGER->lilv_plugins)

Definition at line 31 of file plugin_manager.h.

◆ LILV_WORLD

#define LILV_WORLD   (PLUGIN_MANAGER->lilv_world)

Definition at line 30 of file plugin_manager.h.

◆ LV2_CONSTANT_PLUGIN

#define LV2_CONSTANT_PLUGIN   "Constant"

Definition at line 33 of file plugin_manager.h.

◆ LV2_GENERATOR_PLUGIN

#define LV2_GENERATOR_PLUGIN   "Generator"

Definition at line 32 of file plugin_manager.h.

◆ LV2_INSTRUMENT_PLUGIN

#define LV2_INSTRUMENT_PLUGIN   "Instrument"

Definition at line 34 of file plugin_manager.h.

◆ LV2_OSCILLATOR_PLUGIN

#define LV2_OSCILLATOR_PLUGIN   "Oscillator"

Definition at line 35 of file plugin_manager.h.

◆ PLUGIN_BANK_SCHEMA_VERSION

#define PLUGIN_BANK_SCHEMA_VERSION   1

Definition at line 22 of file plugin_preset.h.

◆ PLUGIN_COLLECTION_SCHEMA_VERSION

#define PLUGIN_COLLECTION_SCHEMA_VERSION   1

Definition at line 22 of file collection.h.

◆ PLUGIN_COLLECTIONS_SCHEMA_VERSION

#define PLUGIN_COLLECTIONS_SCHEMA_VERSION   1

Definition at line 22 of file collections.h.

◆ PLUGIN_DESCRIPTOR_SCHEMA_VERSION

#define PLUGIN_DESCRIPTOR_SCHEMA_VERSION   1

Definition at line 29 of file plugin_descriptor.h.

◆ PLUGIN_IDENTIFIER_SCHEMA_VERSION

#define PLUGIN_IDENTIFIER_SCHEMA_VERSION   1

Definition at line 25 of file plugin_identifier.h.

◆ plugin_is_auditioner

#define plugin_is_auditioner (   self)     (self->track && track_is_auditioner (self->track))

Whether the plugin is used for MIDI auditioning in SampleProcessor.

Definition at line 63 of file plugin.h.

◆ plugin_is_in_active_project

#define plugin_is_in_active_project (   self)     (self->track && track_is_in_active_project (self->track))

Definition at line 58 of file plugin.h.

◆ PLUGIN_MAGIC

#define PLUGIN_MAGIC   43198683

Definition at line 42 of file plugin.h.

◆ PLUGIN_MANAGER

#define PLUGIN_MANAGER   (ZRYTHM->plugin_manager)

Definition at line 29 of file plugin_manager.h.

◆ PLUGIN_MAX_REFRESH_RATE

#define PLUGIN_MAX_REFRESH_RATE   121.f

Definition at line 50 of file plugin.h.

◆ PLUGIN_MAX_SCALE_FACTOR

#define PLUGIN_MAX_SCALE_FACTOR   4.f

Definition at line 56 of file plugin.h.

◆ PLUGIN_MIN_REFRESH_RATE

#define PLUGIN_MIN_REFRESH_RATE   30.f

Plugin UI refresh rate limits.

Definition at line 49 of file plugin.h.

◆ PLUGIN_MIN_SCALE_FACTOR

#define PLUGIN_MIN_SCALE_FACTOR   0.5f

Plugin UI scale factor limits.

Definition at line 55 of file plugin.h.

◆ PLUGIN_PRESET_IDENTIFIER_SCHEMA_VERSION

#define PLUGIN_PRESET_IDENTIFIER_SCHEMA_VERSION   1

Definition at line 23 of file plugin_preset.h.

◆ PLUGIN_PRESET_SCHEMA_VERSION

#define PLUGIN_PRESET_SCHEMA_VERSION   1

Definition at line 24 of file plugin_preset.h.

◆ PLUGIN_SCHEMA_VERSION

#define PLUGIN_SCHEMA_VERSION   1

Definition at line 40 of file plugin.h.

◆ PM_GET_NODE

#define PM_GET_NODE (   uri)    plugin_manager_get_node (PLUGIN_MANAGER, uri)

Definition at line 39 of file plugin_manager.h.

◆ PM_SYMAP

#define PM_SYMAP   (PLUGIN_MANAGER->symap)

Definition at line 37 of file plugin_manager.h.

◆ PM_SYMAP_LOCK

#define PM_SYMAP_LOCK   (PLUGIN_MANAGER->symap_lock)

Definition at line 38 of file plugin_manager.h.

◆ PM_URIDS

#define PM_URIDS   (PLUGIN_MANAGER->urids)

Definition at line 36 of file plugin_manager.h.

Enumeration Type Documentation

◆ CarlaBridgeMode

Carla bridge mode.

Definition at line 172 of file plugin_descriptor.h.

◆ CarlaPluginType

The type of the Carla plugin.

Definition at line 34 of file carla_native_plugin.h.

◆ PluginArchitecture

32 or 64 bit.

Definition at line 158 of file plugin_descriptor.h.

◆ PluginSlotType

Enumerator
PLUGIN_SLOT_MODULATOR 

Plugin is part of a modulator.

Definition at line 27 of file plugin_identifier.h.

◆ ZPluginCategory

Plugin category.

Enumerator
ZPLUGIN_CATEGORY_NONE 

None specified.

Definition at line 34 of file plugin_descriptor.h.

◆ ZPluginProtocol

Plugin protocol.

Enumerator
Z_PLUGIN_PROTOCOL_DUMMY 

Dummy protocol for tests.

Definition at line 125 of file plugin_descriptor.h.

Function Documentation

◆ cached_plugin_descriptors_add()

void cached_plugin_descriptors_add ( CachedPluginDescriptors self,
const PluginDescriptor descr,
int  _serialize 
)

Appends a descriptor to the cache.

Parameters
serializeWhether to serialize the updated cache now.

◆ cached_plugin_descriptors_blacklist()

void cached_plugin_descriptors_blacklist ( CachedPluginDescriptors self,
const char *  abs_path,
int  _serialize 
)

Appends a descriptor to the cache.

Parameters
serialize1 to serialize the updated cache now.

◆ cached_plugin_descriptors_find()

const PluginDescriptor * cached_plugin_descriptors_find ( CachedPluginDescriptors self,
const PluginDescriptor descr,
bool  check_valid,
bool  check_blacklisted 
)

Finds a descriptor matching the given one's unique identifiers.

Parameters
check_validWhether to check valid descriptors.
check_blacklistedWhether to check blacklisted descriptors.
Returns
The found descriptor or NULL.

◆ cached_plugin_descriptors_get()

PluginDescriptor ** cached_plugin_descriptors_get ( CachedPluginDescriptors self,
const char *  abs_path 
)

Returns the PluginDescriptor's corresponding to the .so/.dll file at the given path, if it exists and the MD5 hash matches.

Note
The returned array must be free'd but not the descriptors.
Returns
NULL-terminated array.

◆ cached_plugin_descriptors_replace()

void cached_plugin_descriptors_replace ( CachedPluginDescriptors self,
const PluginDescriptor _new_descr,
bool  _serialize 
)

Replaces a descriptor in the cache.

Parameters
serializeWhether to serialize the updated cache now.
new_descrA new descriptor to replace with. Note that this will be cloned, not used directly.

◆ lv2_gtk_open_ui()

int lv2_gtk_open_ui ( Lv2Plugin plugin)

Opens the LV2 plugin's UI (either wrapped with suil or external).

Use plugin_gtk_*() for generic UIs.

◆ lv2_gtk_set_float_control()

void lv2_gtk_set_float_control ( Lv2Plugin lv2_plugin,
Port port,
float  value 
)

Called by generic UI callbacks when e.g.

a slider changes value.

◆ NONNULL_ARGS()

NONNULL_ARGS ( )

Clones the given plugin.

Parameters
errorTo be filled if an error occurred.
Returns
The cloned plugin, or NULL if an error occurred.

◆ plugin_activate()

NONNULL int plugin_activate ( Plugin pl,
bool  activate 
)

Activates or deactivates the plugin.

Parameters
activateTrue to activate, false to deactivate.

◆ plugin_collection_contains_descriptor()

NONNULL bool plugin_collection_contains_descriptor ( PluginCollection self,
const PluginDescriptor descr,
bool  match_pointer 
)

Returns whether the collection contains the given descriptor.

Parameters
match_pointerWhether to check pointers or the descriptor details.

◆ plugin_collections_add()

void plugin_collections_add ( PluginCollections self,
const PluginCollection collection,
bool  serialize 
)

Appends a collection.

Parameters
serializeWhether to serialize the updated cache now.

◆ plugin_collections_remove()

void plugin_collections_remove ( PluginCollections self,
PluginCollection collection,
bool  serialize 
)

Removes the given collection.

Parameters
serializeWhether to serialize the updated cache now.

◆ plugin_connect_to_plugin()

NONNULL 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.

◆ plugin_connect_to_prefader()

NONNULL 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.

◆ plugin_copy_state_dir()

int plugin_copy_state_dir ( Plugin self,
Plugin src,
bool  is_backup,
const char *  abs_state_dir 
)

Copies the state directory from the given source plugin to the given destination plugin's state directory.

Parameters
is_backupWhether this is a backup project. Used for calculating the absolute path to the state dir.
abs_state_dirIf passed, the state will be saved inside this directory instead of the plugin's state directory. Used when saving presets.

◆ plugin_delete_state_files()

NONNULL void plugin_delete_state_files ( Plugin self)

Deletes any state files associated with this plugin.

This should be called when a plugin instance is removed from the project (including undo stacks) to remove any files not needed anymore.

◆ plugin_descriptor_is_whitelisted()

NONNULL bool plugin_descriptor_is_whitelisted ( const PluginDescriptor self)

Returns whether the plugin is known to work, so it should be whitelisted.

Non-whitelisted plugins will run in full bridge mode. This is to prevent crashes when Zrythm is not at fault.

These must all be free-software plugins so that they can be debugged if issues arise.

◆ plugin_disconnect()

NONNULL 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.

◆ plugin_expose_ports()

NONNULL void plugin_expose_ports ( Plugin pl,
bool  expose,
bool  inputs,
bool  outputs 
)

Exposes or unexposes plugin ports to the backend.

Parameters
exposeExpose or not.
inputsExpose/unexpose inputs.
outputsExpose/unexpose outputs.

◆ plugin_generate_automation_tracks()

NONNULL void plugin_generate_automation_tracks ( Plugin plugin,
Track track 
)

Generates automatables for the plugin.

The plugin must be instantiated already.

Parameters
trackThe Track this plugin belongs to. This is passed because the track might not be in the project yet so we can't fetch it through indices.

◆ plugin_get_event_ports()

NONNULL int plugin_get_event_ports ( Plugin pl,
Port **  ports,
int  input 
)

Returns the event ports in the plugin.

Parameters
portsArray to fill in. Must be large enough.
Returns
The number of ports in the array.

◆ plugin_get_port_by_param_uri()

NONNULL Port * plugin_get_port_by_param_uri ( Plugin pl,
const char *  uri 
)

Gets a port by its param URI.

Only works for LV2 plugins.

◆ plugin_get_port_by_symbol()

NONNULL Port * plugin_get_port_by_symbol ( Plugin pl,
const char *  sym 
)

Gets a port by its symbol.

Only works for LV2 plugins.

◆ plugin_gtk_new_label()

GtkWidget * plugin_gtk_new_label ( const char *  text,
bool  title,
bool  preformatted,
float  xalign,
float  yalign 
)

Creates a label for a control.

TODO move to ui.

Parameters
titleWhether this is a title text (makes it bold).
preformattedWhether the text is preformatted.

◆ plugin_gtk_open_generic_ui()

void plugin_gtk_open_generic_ui ( Plugin plugin,
bool  fire_events 
)

Opens the generic UI of the plugin.

Assumes plugin_gtk_create_window() has been called.

◆ plugin_gtk_setup_plugin_banks_combo_box()

bool plugin_gtk_setup_plugin_banks_combo_box ( GtkComboBoxText *  cb,
Plugin plugin 
)

Sets up the combo box with all the banks the plugin has.

Returns
Whether any banks were added.

◆ plugin_gtk_setup_plugin_presets_list_box()

bool plugin_gtk_setup_plugin_presets_list_box ( GtkListBox *  box,
Plugin plugin 
)

Sets up the combo box with all the presets the plugin has in the given bank, or all the presets if NULL is given.

Returns
Whether any presets were added.

◆ plugin_gtk_update_plugin_ui()

NONNULL int plugin_gtk_update_plugin_ui ( Plugin pl)

Called on each GUI frame to update the GTK UI.

Note
This is a GSourceFunc.

◆ plugin_instantiate()

int plugin_instantiate ( Plugin self,
LilvState *  state,
GError **  error 
)

Instantiates the plugin (e.g.

when adding to a channel)

◆ plugin_is_enabled()

NONNULL bool plugin_is_enabled ( Plugin self,
bool  check_track 
)

Returns whether the plugin is enabled.

Parameters
check_trackWhether to check if the track is enabled as well.

◆ plugin_manager_find_from_descriptor()

PluginDescriptor * plugin_manager_find_from_descriptor ( PluginManager self,
const PluginDescriptor src_descr 
)

Finds and returns the PluginDescriptor instance matching the given descriptor.

This instance is held by the plugin manager and must not be free'd.

◆ plugin_manager_find_plugin_from_uri()

PluginDescriptor * plugin_manager_find_plugin_from_uri ( PluginManager self,
const char *  uri 
)

Returns the PluginDescriptor instance for the given URI.

This instance is held by the plugin manager and must not be free'd.

◆ plugin_manager_get_node()

const LilvNode * plugin_manager_get_node ( PluginManager self,
const char *  uri 
)

Returns a cached LilvNode for the given URI.

If a node doesn't exist for the given URI, a node is created and cached.

◆ plugin_manager_scan_plugins()

void plugin_manager_scan_plugins ( PluginManager self,
const double  max_progress,
double *  progress 
)

Scans for plugins, optionally updating the progress.

Parameters
max_progressMaximum progress for this stage.
progressPointer to a double (0.0-1.0) to update based on the current progress.

◆ plugin_move()

NONNULL void plugin_move ( Plugin pl,
Track track,
PluginSlotType  slot_type,
int  slot,
bool  confirm_overwrite,
bool  fire_events 
)

Moves the plugin to the given slot in the given channel.

If a plugin already exists, it deletes it and replaces it.

Parameters
confirm_overwriteWhether to show a dialog to confirm the overwrite when a plugin already exists.

◆ plugin_new_from_setting()

Plugin * plugin_new_from_setting ( PluginSetting setting,
unsigned int  track_name_hash,
PluginSlotType  slot_type,
int  slot,
GError **  error 
)

Creates/initializes a plugin and its internal plugin (LV2, etc.) using the given setting.

Parameters
track_name_hashThe expected name hash of track the plugin will be in.
slotThe expected slot the plugin will be in.

◆ plugin_process_passthrough()

HOT NONNULL void plugin_process_passthrough ( Plugin self,
const EngineProcessTimeInfo *const  time_nfo 
)

Processes the plugin by passing through the input to its output.

This is called when the plugin is bypassed.

◆ plugin_remove_ats_from_automation_tracklist()

NONNULL void plugin_remove_ats_from_automation_tracklist ( Plugin pl,
bool  free_ats,
bool  fire_events 
)

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

Used e.g. when moving plugins.

Parameters
free_atsAlso free the ats.

◆ plugin_select()

NONNULL void plugin_select ( Plugin self,
bool  select,
bool  exclusive 
)

Selects the plugin in the MixerSelections.

Parameters
selectSelect or deselect.
exclusiveWhether to make this the only selected plugin or add it to the selections.

Variable Documentation

◆ error

GError** error

Definition at line 401 of file plugin.h.