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   5
 
#define CARLA_STATE_FILENAME   "state.carla"
 
#define PLUGIN_COLLECTIONS_SCHEMA_VERSION   2
 
#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_DEFAULT_BANK_URI   "https://lv2.zrythm.org#default-bank"
 
#define PLUGIN_INIT_PRESET_URI   "https://lv2.zrythm.org#init-preset"
 
#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_MANAGER   (gZrythm->plugin_manager)
 
#define PLUGIN_BANK_SCHEMA_VERSION   1
 
#define PLUGIN_PRESET_IDENTIFIER_SCHEMA_VERSION   1
 
#define PLUGIN_PRESET_SCHEMA_VERSION   1
 

Enumerations

enum class  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 {
  Z_PLUGIN_CATEGORY_NONE , Z_PLUGIN_CATEGORY_DELAY , Z_PLUGIN_CATEGORY_REVERB , Z_PLUGIN_CATEGORY_DISTORTION ,
  Z_PLUGIN_CATEGORY_WAVESHAPER , Z_PLUGIN_CATEGORY_DYNAMICS , Z_PLUGIN_CATEGORY_AMPLIFIER , Z_PLUGIN_CATEGORY_COMPRESSOR ,
  Z_PLUGIN_CATEGORY_ENVELOPE , Z_PLUGIN_CATEGORY_EXPANDER , Z_PLUGIN_CATEGORY_GATE , Z_PLUGIN_CATEGORY_LIMITER ,
  Z_PLUGIN_CATEGORY_FILTER , Z_PLUGIN_CATEGORY_ALLPASS_FILTER , Z_PLUGIN_CATEGORY_BANDPASS_FILTER , Z_PLUGIN_CATEGORY_COMB_FILTER ,
  Z_PLUGIN_CATEGORY_EQ , Z_PLUGIN_CATEGORY_MULTI_EQ , Z_PLUGIN_CATEGORY_PARA_EQ , Z_PLUGIN_CATEGORY_HIGHPASS_FILTER ,
  Z_PLUGIN_CATEGORY_LOWPASS_FILTER , Z_PLUGIN_CATEGORY_GENERATOR , Z_PLUGIN_CATEGORY_CONSTANT , Z_PLUGIN_CATEGORY_INSTRUMENT ,
  Z_PLUGIN_CATEGORY_OSCILLATOR , Z_PLUGIN_CATEGORY_MIDI , Z_PLUGIN_CATEGORY_MODULATOR , Z_PLUGIN_CATEGORY_CHORUS ,
  Z_PLUGIN_CATEGORY_FLANGER , Z_PLUGIN_CATEGORY_PHASER , Z_PLUGIN_CATEGORY_SIMULATOR , Z_PLUGIN_CATEGORY_SIMULATOR_REVERB ,
  Z_PLUGIN_CATEGORY_SPATIAL , Z_PLUGIN_CATEGORY_SPECTRAL , Z_PLUGIN_CATEGORY_PITCH , Z_PLUGIN_CATEGORY_UTILITY ,
  Z_PLUGIN_CATEGORY_ANALYZER , Z_PLUGIN_CATEGORY_CONVERTER , Z_PLUGIN_CATEGORY_FUNCTION , Z_PLUGIN_CATEGORY_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 class  ZPluginArchitecture { Z_PLUGIN_ARCHITECTURE_32 , Z_PLUGIN_ARCHITECTURE_64 }
 32 or 64 bit. More...
 
enum class  CarlaBridgeMode { None , UI , Full }
 Carla bridge mode. More...
 
enum class  ZPluginSlotType {
  Z_PLUGIN_SLOT_INVALID , Z_PLUGIN_SLOT_INSERT , Z_PLUGIN_SLOT_MIDI_FX , Z_PLUGIN_SLOT_INSTRUMENT ,
  ZPluginSlotType::Z_PLUGIN_SLOT_MODULATOR
}
 

Functions

CachedPluginDescriptorscached_plugin_descriptors_read_or_new (void)
 Reads the file and fills up the object.
 
void cached_plugin_descriptors_serialize_to_file (CachedPluginDescriptors *self)
 
bool cached_plugin_descriptors_is_blacklisted (CachedPluginDescriptors *self, const char *sha1)
 Returns if the plugin with the given sha1 is blacklisted or not.
 
unsigned int cached_plugin_descriptors_find (CachedPluginDescriptors *self, GPtrArray *arr, const PluginDescriptor *descr, const char *sha1, bool check_valid, bool check_blacklisted)
 Finds descriptors matching the given one's unique identifiers and adds them to the array.
 
void cached_plugin_descriptors_blacklist (CachedPluginDescriptors *self, const char *sha1, bool _serialize)
 Appends a descriptor to 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_read_or_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 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, ZPluginSlotType 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, ZPluginSlotType 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, ZPluginSlotType 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, ZPluginSlotType 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 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.
 
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)
 
bool plugin_protocol_is_supported (ZPluginProtocol protocol)
 
const char * plugin_category_to_string (ZPluginCategory category)
 
CarlaBackend::PluginType plugin_descriptor_get_carla_plugin_type_from_protocol (ZPluginProtocol protocol)
 
ZPluginProtocol plugin_descriptor_get_protocol_from_carla_plugin_type (CarlaBackend::PluginType ptype)
 
ZPluginCategory plugin_descriptor_get_category_from_carla_category_str (const char *category)
 
ZPluginCategory plugin_descriptor_get_category_from_carla_category (CarlaBackend::PluginCategory carla_cat)
 
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, ZPluginSlotType slot_type, TrackType 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, float control)
 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 (ZPluginSlotType slot_type, int slot)
 Verifies that slot_type and slot is a valid combination.
 
void plugin_identifier_print (const PluginIdentifier *self, char *str)
 
uint32_t plugin_identifier_get_hash (const void *id)
 
PluginManagerplugin_manager_new (void)
 
char ** plugin_manager_get_paths_for_protocol (const PluginManager *self, const ZPluginProtocol protocol)
 
char * plugin_manager_get_paths_for_protocol_separated (const PluginManager *self, const ZPluginProtocol protocol)
 
char * plugin_manager_find_plugin_from_rel_path (const PluginManager *self, const ZPluginProtocol protocol, const char *rel_path)
 Searches in the known paths for this plugin protocol for the given relative path of the plugin and returns the absolute path.
 
void plugin_manager_begin_scan (PluginManager *self, const double max_progress, double *progress, GenericCallback cb, void *user_data)
 
void plugin_manager_add_descriptor (PluginManager *self, PluginDescriptor *descr)
 Adds a new descriptor.
 
void plugin_manager_set_currently_scanning_plugin (PluginManager *self, const char *filename, const char *sha1)
 Updates the text in the greeter.
 
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   5

Definition at line 23 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.

◆ PLUGIN_BANK_SCHEMA_VERSION

#define PLUGIN_BANK_SCHEMA_VERSION   1

Definition at line 22 of file plugin_preset.h.

◆ PLUGIN_COLLECTIONS_SCHEMA_VERSION

#define PLUGIN_COLLECTIONS_SCHEMA_VERSION   2

Definition at line 24 of file collections.h.

◆ PLUGIN_DEFAULT_BANK_URI

#define PLUGIN_DEFAULT_BANK_URI   "https://lv2.zrythm.org#default-bank"

Definition at line 46 of file plugin.h.

◆ PLUGIN_DESCRIPTOR_SCHEMA_VERSION

#define PLUGIN_DESCRIPTOR_SCHEMA_VERSION   1

Definition at line 32 of file plugin_descriptor.h.

◆ PLUGIN_INIT_PRESET_URI

#define PLUGIN_INIT_PRESET_URI   "https://lv2.zrythm.org#init-preset"

Definition at line 47 of file plugin.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 66 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 61 of file plugin.h.

◆ PLUGIN_MAGIC

#define PLUGIN_MAGIC   43198683

Definition at line 42 of file plugin.h.

◆ PLUGIN_MANAGER

#define PLUGIN_MANAGER   (gZrythm->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 53 of file plugin.h.

◆ PLUGIN_MAX_SCALE_FACTOR

#define PLUGIN_MAX_SCALE_FACTOR   4.f

Definition at line 59 of file plugin.h.

◆ PLUGIN_MIN_REFRESH_RATE

#define PLUGIN_MIN_REFRESH_RATE   30.f

Plugin UI refresh rate limits.

Definition at line 52 of file plugin.h.

◆ PLUGIN_MIN_SCALE_FACTOR

#define PLUGIN_MIN_SCALE_FACTOR   0.5f

Plugin UI scale factor limits.

Definition at line 58 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.

Enumeration Type Documentation

◆ CarlaBridgeMode

enum class CarlaBridgeMode
strong

Carla bridge mode.

Definition at line 129 of file plugin_descriptor.h.

◆ CarlaPluginType

enum class CarlaPluginType
strong

The type of the Carla plugin.

Definition at line 34 of file carla_native_plugin.h.

◆ ZPluginArchitecture

enum class ZPluginArchitecture
strong

32 or 64 bit.

Definition at line 120 of file plugin_descriptor.h.

◆ ZPluginCategory

Plugin category.

Enumerator
Z_PLUGIN_CATEGORY_NONE 

None specified.

Definition at line 40 of file plugin_descriptor.h.

◆ ZPluginProtocol

Plugin protocol.

Enumerator
Z_PLUGIN_PROTOCOL_DUMMY 

Dummy protocol for tests.

Definition at line 96 of file plugin_descriptor.h.

◆ ZPluginSlotType

enum class ZPluginSlotType
strong
Enumerator
Z_PLUGIN_SLOT_MODULATOR 

Plugin is part of a modulator.

Definition at line 26 of file plugin_identifier.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 * sha1,
bool _serialize )

Appends a descriptor to the cache.

Parameters
serializeWhether serialize the updated cache now.

◆ cached_plugin_descriptors_find()

unsigned int cached_plugin_descriptors_find ( CachedPluginDescriptors * self,
GPtrArray * arr,
const PluginDescriptor * descr,
const char * sha1,
bool check_valid,
bool check_blacklisted )

Finds descriptors matching the given one's unique identifiers and adds them to the array.

Note
The elements in the array are owned by self and must not be free'd.
Parameters
descrThe descriptor to check, or NULL to check sha1.
sha1The sha1 to check, or NULL to check descr.
check_validWhether to check valid descriptors.
check_blacklistedWhether to check blacklisted descriptors.
Returns
Number of descriptors found.

◆ NONNULL_ARGS()

NONNULL_ARGS ( 1 )

Clones the given plugin.

Instantiates the plugin (e.g.

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

when adding to a channel)

◆ 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_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_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_move()

NONNULL void plugin_move ( Plugin * pl,
Track * track,
ZPluginSlotType 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,
ZPluginSlotType 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 356 of file plugin.h.