|
Zrythm v2.0.0-DEV
a highly automated and intuitive digital audio workstation
|
A base class for processors in the DSP graph. More...
#include <src/dsp/processor_base.h>


Data Structures | |
| struct | ProcessorBaseDependencies |
Public Member Functions | |
| 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 |
| utils::Utf8String | get_node_name () const final |
| Returns a human friendly name of the node. | |
| void | process_block (EngineProcessTimeInfo time_nfo, const dsp::ITransport &transport) 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, nframes_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(). | |
| Public Member Functions inherited from zrythm::dsp::graph::IProcessable | |
| virtual nframes_t | get_single_playback_latency () const |
| Returns the latency of only the given processable, without adding the previous/next latencies. | |
Protected Member Functions | |
| virtual void | custom_process_block (EngineProcessTimeInfo time_nfo, const dsp::ITransport &transport) noexcept |
| Custom processor logic after processing all owned parameters. | |
| virtual void | custom_prepare_for_processing (const graph::GraphNode *node, units::sample_rate_t sample_rate, nframes_t max_block_length) |
| virtual void | custom_release_resources () |
| auto | dependencies () const |
Friends | |
| void | to_json (nlohmann::json &j, const ProcessorBase &p) |
| void | from_json (const nlohmann::json &j, ProcessorBase &p) |
A base class for processors in the DSP graph.
Definition at line 24 of file processor_base.h.
|
inlineprotectedvirtual |
Definition at line 97 of file processor_base.h.
|
protectedvirtualnoexcept |
Custom processor logic after processing all owned parameters.
By default, this does passthrough to same-type ports.
Reimplemented in zrythm::dsp::AudioSampleProcessor, zrythm::dsp::Fader, zrythm::dsp::Metronome, zrythm::dsp::MidiPanicProcessor, zrythm::dsp::ModulatorMacroProcessor, zrythm::plugins::Plugin, zrythm::structure::tracks::ChannelSend, and zrythm::structure::tracks::TrackProcessor.
|
inlineprotectedvirtual |
Definition at line 104 of file processor_base.h.
|
inlineprotected |
Definition at line 106 of file processor_base.h.
|
inline |
Definition at line 58 of file processor_base.h.
|
inlinefinalvirtual |
Returns a human friendly name of the node.
Implements zrythm::dsp::graph::IProcessable.
Definition at line 66 of file processor_base.h.
|
inline |
Definition at line 59 of file processor_base.h.
|
inline |
Definition at line 60 of file processor_base.h.
|
finalvirtual |
Called to allocate resources required for processing.
| node | The node in the processing graph. Null means we are processing outside of a graph context and must be handled gracefully. |
| sample_rate | |
| max_block_length |
Reimplemented from zrythm::dsp::graph::IProcessable.
|
finalvirtualnoexcept |
Calls custom_process_block() internally after processing all the parameters.
This is done this way to make sure all parameters are processed by the owning processor as intended and to avoid mistakes by leaving it up to processor implementations to do.
Reimplemented from zrythm::dsp::graph::IProcessable.
|
finalvirtual |
Called to release resources allocated by prepare_for_processing().
This may be called multiple times.
Reimplemented from zrythm::dsp::graph::IProcessable.