10#ifndef __PLUGINS_PLUGIN_DESCRIPTOR_H__
11#define __PLUGINS_PLUGIN_DESCRIPTOR_H__
13#include "zrythm-config.h"
18#include <glib/gi18n.h>
20#include <CarlaBackend.h>
32#define PLUGIN_DESCRIPTOR_SCHEMA_VERSION 1
45 Z_PLUGIN_CATEGORY_DELAY,
46 Z_PLUGIN_CATEGORY_REVERB,
47 Z_PLUGIN_CATEGORY_DISTORTION,
48 Z_PLUGIN_CATEGORY_WAVESHAPER,
49 Z_PLUGIN_CATEGORY_DYNAMICS,
50 Z_PLUGIN_CATEGORY_AMPLIFIER,
51 Z_PLUGIN_CATEGORY_COMPRESSOR,
52 Z_PLUGIN_CATEGORY_ENVELOPE,
53 Z_PLUGIN_CATEGORY_EXPANDER,
54 Z_PLUGIN_CATEGORY_GATE,
55 Z_PLUGIN_CATEGORY_LIMITER,
56 Z_PLUGIN_CATEGORY_FILTER,
57 Z_PLUGIN_CATEGORY_ALLPASS_FILTER,
58 Z_PLUGIN_CATEGORY_BANDPASS_FILTER,
59 Z_PLUGIN_CATEGORY_COMB_FILTER,
61 Z_PLUGIN_CATEGORY_MULTI_EQ,
62 Z_PLUGIN_CATEGORY_PARA_EQ,
63 Z_PLUGIN_CATEGORY_HIGHPASS_FILTER,
64 Z_PLUGIN_CATEGORY_LOWPASS_FILTER,
65 Z_PLUGIN_CATEGORY_GENERATOR,
66 Z_PLUGIN_CATEGORY_CONSTANT,
67 Z_PLUGIN_CATEGORY_INSTRUMENT,
68 Z_PLUGIN_CATEGORY_OSCILLATOR,
69 Z_PLUGIN_CATEGORY_MIDI,
70 Z_PLUGIN_CATEGORY_MODULATOR,
71 Z_PLUGIN_CATEGORY_CHORUS,
72 Z_PLUGIN_CATEGORY_FLANGER,
73 Z_PLUGIN_CATEGORY_PHASER,
74 Z_PLUGIN_CATEGORY_SIMULATOR,
75 Z_PLUGIN_CATEGORY_SIMULATOR_REVERB,
76 Z_PLUGIN_CATEGORY_SPATIAL,
77 Z_PLUGIN_CATEGORY_SPECTRAL,
78 Z_PLUGIN_CATEGORY_PITCH,
79 Z_PLUGIN_CATEGORY_UTILITY,
80 Z_PLUGIN_CATEGORY_ANALYZER,
81 Z_PLUGIN_CATEGORY_CONVERTER,
82 Z_PLUGIN_CATEGORY_FUNCTION,
83 Z_PLUGIN_CATEGORY_MIXER,
101 Z_PLUGIN_PROTOCOL_LV2,
102 Z_PLUGIN_PROTOCOL_DSSI,
103 Z_PLUGIN_PROTOCOL_LADSPA,
104 Z_PLUGIN_PROTOCOL_VST,
105 Z_PLUGIN_PROTOCOL_VST3,
106 Z_PLUGIN_PROTOCOL_AU,
107 Z_PLUGIN_PROTOCOL_SFZ,
108 Z_PLUGIN_PROTOCOL_SF2,
109 Z_PLUGIN_PROTOCOL_CLAP,
110 Z_PLUGIN_PROTOCOL_JSFX,
122 Z_PLUGIN_ARCHITECTURE_32,
123 Z_PLUGIN_ARCHITECTURE_64
198plugin_descriptor_new (
void);
204plugin_protocol_from_str (
const char * str);
206static inline const char *
209 const char * icon = NULL;
212 case ZPluginProtocol::Z_PLUGIN_PROTOCOL_LV2:
215 case ZPluginProtocol::Z_PLUGIN_PROTOCOL_LADSPA:
216 icon =
"logo-ladspa";
218 case ZPluginProtocol::Z_PLUGIN_PROTOCOL_AU:
221 case ZPluginProtocol::Z_PLUGIN_PROTOCOL_VST:
222 case ZPluginProtocol::Z_PLUGIN_PROTOCOL_VST3:
225 case ZPluginProtocol::Z_PLUGIN_PROTOCOL_SFZ:
226 case ZPluginProtocol::Z_PLUGIN_PROTOCOL_SF2:
227 icon =
"file-music-line";
242CarlaBackend::PluginType
243plugin_descriptor_get_carla_plugin_type_from_protocol (
ZPluginProtocol protocol);
246plugin_descriptor_get_protocol_from_carla_plugin_type (
247 CarlaBackend::PluginType ptype);
250plugin_descriptor_get_category_from_carla_category_str (
const char * category);
253plugin_descriptor_get_category_from_carla_category (
254 CarlaBackend::PluginCategory carla_cat);
362plugin_descriptor_free_closure (
void * data, GClosure * closure);
TrackType
The Track's 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.
ZPluginArchitecture
32 or 64 bit.
NONNULL CarlaBridgeMode plugin_descriptor_get_min_bridge_mode(const PluginDescriptor *self)
Returns the minimum bridge mode required for this plugin.
NONNULL int plugin_descriptor_is_midi_modifier(const PluginDescriptor *const descr)
Returns if the Plugin is a midi modifier or not.
NONNULL bool plugin_descriptor_is_instrument(const PluginDescriptor *const descr)
Returns if the Plugin is an instrument or not.
NONNULL bool plugin_descriptor_is_whitelisted(const PluginDescriptor *self)
Returns whether the plugin is known to work, so it should be whitelisted.
CarlaBridgeMode
Carla bridge mode.
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_effect(const PluginDescriptor *const descr)
Returns if the Plugin is an effect or not.
const char * plugin_descriptor_get_icon_name(const PluginDescriptor *const self)
Gets an appropriate icon name for the given descriptor.
ZPluginProtocol
Plugin protocol.
ZPluginCategory
Plugin category.
NONNULL void plugin_descriptor_copy(PluginDescriptor *dest, const PluginDescriptor *src)
Clones the plugin descriptor.
NONNULL PluginDescriptor * plugin_descriptor_clone(const PluginDescriptor *src)
Clones the plugin descriptor.
NONNULL ZPluginCategory plugin_descriptor_string_to_category(const char *str)
Returns the ZPluginCategory matching the given string.
NONNULL bool plugin_descriptor_has_custom_ui(const PluginDescriptor *self)
Returns if the Plugin has a supported custom UI.
NONNULL int plugin_descriptor_is_modulator(const PluginDescriptor *const descr)
Returns if the Plugin is a modulator or not.
@ Z_PLUGIN_PROTOCOL_DUMMY
Dummy protocol for tests.
@ Z_PLUGIN_CATEGORY_NONE
None specified.
CarlaBridgeMode min_bridge_mode
Minimum required bridge mode.
int num_midi_ins
Number of MIDI input ports.
int num_midi_outs
Number of MIDI output ports.
ZPluginProtocol protocol
Plugin protocol (Lv2/DSSI/LADSPA/VST/etc.).
int num_audio_outs
Number of audio output ports.
int num_cv_outs
Number of output CV ports.
char * category_str
Lv2 plugin subcategory.
WrappedObjectWithChangeSignal * gobj
Used in Gtk.
int num_ctrl_ins
Number of input control (plugin param) ports.
char * sha1
SHA1 of the file (replaces ghash).
char * path
Path, if not an Lv2Plugin which uses URIs.
unsigned int ghash
Hash of the plugin's bundle (.so/.ddl for VST) used when caching PluginDescriptor's,...
int num_ctrl_outs
Number of output control (plugin param) ports.
ZPluginArchitecture arch
Architecture (32/64bit).
int num_cv_ins
Number of input CV ports.
int64_t unique_id
Used for VST.
int num_audio_ins
Number of audio input ports.
A GObject-ified normal C object with a signal that interested parties can listen to for changes.