|
| int | programIndex () const |
| | Returns the current program index, or -1 if no program exists.
|
| void | setProgramIndex (int index) |
|
Q_SIGNAL void | programIndexChanged (int index) |
| | Implementations should attach to this and set the program.
|
| PluginConfiguration * | configuration () const |
| Q_SIGNAL void | configurationChanged (PluginConfiguration *configuration, bool generateNewPluginPortsAndParams) |
| | Emitted when the configuration is set on the plugin.
|
| dsp::ProcessorParameter * | bypassParameter () const |
| dsp::ProcessorParameter * | gainParameter () const |
| bool | uiVisible () const |
| void | setUiVisible (bool visible) |
|
Q_SIGNAL void | uiVisibleChanged (bool visible) |
| | Implementations should listen to this and show/hide the plugin UI accordingly.
|
| InstantiationStatus | instantiationStatus () const |
|
Q_SIGNAL void | instantiationStatusChanged (InstantiationStatus status) |
| Q_SIGNAL void | instantiationFinished (bool successful, const QString &error) |
| | To be emitted by implementations when instantiation finished.
|
| PluginDescriptor & | get_descriptor () const |
| utils::Utf8String | get_name () const |
| Protocol::ProtocolType | get_protocol () const |
| void | set_configuration (const PluginConfiguration &setting) |
| | Sets the plugin configuration to use.
|
| void | custom_prepare_for_processing (const dsp::graph::GraphNode *node, units::sample_rate_t sample_rate, units::sample_u32_t max_block_length) final |
| void | custom_process_block (dsp::graph::EngineProcessTimeInfo time_nfo, const dsp::ITransport &transport, const dsp::TempoMap &tempo_map) noexcept final |
| | Custom processor logic after processing all owned parameters.
|
| void | custom_release_resources () final |
| bool | currently_enabled () const |
| | Returns whether the plugin is enabled (not bypassed).
|
| bool | currently_enabled_rt () const noexcept |
| std::string | save_state () const |
| | Serializes the plugin's internal state to a base64-encoded string.
|
| void | load_state (const std::string &base64_state) |
| | Queues a previously saved state to be applied to the plugin.
|
| void | flush_plugin_values () |
| | Flushes plugin-reported parameter values to Zrythm params.
|
|
| ProcessorBase (ProcessorBaseDependencies dependencies, utils::Utf8String name={ u8"ProcessorBase" }) |
|
void | set_name (const utils::Utf8String &name) |
| | Set a custom name to be used in the DSP graph.
|
|
void | add_input_port (const dsp::PortUuidReference &uuid) |
|
void | add_output_port (const dsp::PortUuidReference &uuid) |
|
void | add_parameter (const dsp::ProcessorParameterUuidReference &uuid) |
| auto & | get_input_ports () const |
| auto & | get_output_ports () const |
| auto & | get_parameters () const |
| const ParameterChangeTracker & | change_tracker () const noexcept |
| | Returns the change tracker.
|
| utils::Utf8String | get_node_name () const final |
| | Returns a human friendly name of the node.
|
| void | process_block (dsp::graph::EngineProcessTimeInfo time_nfo, const dsp::ITransport &transport, const dsp::TempoMap &tempo_map) noexcept final |
| | Calls custom_process_block() internally after processing all the parameters.
|
| void | prepare_for_processing (const graph::GraphNode *node, units::sample_rate_t sample_rate, units::sample_u32_t max_block_length) final |
| | Called to allocate resources required for processing.
|
| void | release_resources () final |
| | Called to release resources allocated by prepare_for_processing().
|
| virtual units::sample_u32_t | get_single_playback_latency () const |
| | Returns the latency of only the given processable, without adding the previous/next latencies (zero latency by default).
|
|
UuidIdentifiableObject & | operator= (const UuidIdentifiableObject &other)=default |
| auto | get_uuid () const |
|
| | Plugin (ProcessorBaseDependencies dependencies, QObject *parent) |
| | Creates/initializes a plugin and its internal plugin (LV2, etc.) using the given setting.
|
|
dsp::ProcessorParameterUuidReference | generate_default_bypass_param () const |
| | To be called by implementations to generate the default bypass parameter if the plugin does not provide its own.
|
|
dsp::ProcessorParameterUuidReference | generate_default_gain_param () const |
| | To be called by implementations to generate the default gain parameter if the plugin does not provide its own.
|
| auto | dependencies () const |
DSP processing plugin.
Can be external or internal.
Plugin State Persistence
All plugin types serialize their state as base64-encoded data within the project JSON file via their to_json/from_json functions. There are no separate state files on disk — JSON serialization is the sole persistence mechanism.
Each plugin subclass includes a "state" key in its to_json() output containing the base64-encoded plugin state. During from_json(), the state is deserialized first and stored in a temporary member (e.g., state_to_apply_), then applied after the plugin instance is fully initialized. No filesystem paths or state directories are involved.
Definition at line 42 of file plugin.h.
| Q_SIGNAL void zrythm::plugins::Plugin::configurationChanged |
( |
PluginConfiguration * | configuration, |
|
|
bool | generateNewPluginPortsAndParams ) |
Emitted when the configuration is set on the plugin.
Implementing plugins should attach to this and, if generateNewPluginPortsAndParams is true, query the underlying plugin for its port/parameter layout and create corresponding Zrythm objects. If false, ports and parameters already exist (e.g., after JSON deserialization) and only the underlying plugin instance needs to be reinitialized.
- Parameters
-
| configuration | The plugin configuration. |
| generateNewPluginPortsAndParams | Whether the handler should create new Zrythm ports and parameters from the underlying plugin. |
Sets the plugin configuration to use.
This must be called exactly once right after construction to set the PluginConfiguration for this plugin.
When called during fresh construction, the plugin will have no ports or parameters and the signal will instruct handlers to create them. When called during deserialization (after ports/params are already restored from JSON), the signal will instruct handlers to skip creation and only reinitialize the underlying plugin instance.