Pulp 1.88.0
Cross-platform audio plugin framework
Loading...
Searching...
No Matches
pulp::dsl::DslProcessor Class Referenceabstract

#include <dsl_processor.hpp>

Public Types

enum class  MemoryPressure { Advisory , Critical }
 Memory-pressure levels a host can surface to a plugin. More...

Public Member Functions

const std::vector< DslParamDescriptor > & dsl_params () const
const DslBusLayout & bus_layout () const
const std::string & dsl_name () const
EditorHostKind editor_host_kind () const
 Whether this processor runs inside a plug-in host or the Pulp standalone app.
void set_editor_host_kind (EditorHostKind kind)
virtual PluginDescriptor descriptor () const =0
 Return the plugin's metadata. Called once during initialization.
virtual void define_parameters (state::StateStore &store)=0
 Register parameters with the state store.
virtual void prepare (const PrepareContext &context)=0
 Prepare for processing.
virtual void release ()
 Release resources.
virtual void suspend ()
 Pause processing for a heavy main-thread operation (preset load, convolution kernel reallocation, sample-rate change) that would otherwise need to either block in process() — fatal — or run in lock-step with process(), which is hard to get right.
virtual void resume ()
 Resume processing after a prior suspend().
virtual std::vector< uint8_t > serialize_plugin_state () const
 Serialize plugin-owned state that is not part of StateStore.
void publish_plugin_state_snapshot (std::vector< uint8_t > bytes)
 Publish an immutable custom-state snapshot from a non-audio thread.
void publish_plugin_state_snapshot (std::span< const uint8_t > bytes)
std::shared_ptr< const std::vector< uint8_t > > published_plugin_state_snapshot () const
 Returns null until the plugin opts into published snapshots.
virtual bool deserialize_plugin_state (std::span< const uint8_t >)
 Restore plugin-owned state previously returned by serialize_plugin_state().
virtual void on_memory_pressure (MemoryPressure)
 Called on the main/UI thread when the host observes memory pressure.
virtual int latency_samples () const
 Latency in samples introduced by this processor (default 0).
virtual bool is_bus_layout_supported (const BusesLayout &layout) const
 Validate a proposed bus layout.
void flag_latency_changed () noexcept
 Cross-adapter latency / tail change notifications.
void flag_tail_changed () noexcept
bool consume_latency_changed_flag () noexcept
 Adapter-side polling helper.
bool consume_tail_changed_flag () noexcept
bool latency_change_pending () const noexcept
 Non-mutating peek used by adapters that need to decide whether to ping the host for a main-thread callback without losing the pending edge (e.g.
bool tail_change_pending () const noexcept
void flag_note_names_changed () noexcept
 Note-name change notification, same shape as the latency / tail pair above.
bool consume_note_names_changed_flag () noexcept
bool note_names_change_pending () const noexcept
void flag_state_dirty () noexcept
 Non-parameter state-change notification, same shape as the latency / tail / note-name flags above.
bool consume_state_dirty_flag () noexcept
bool state_dirty_pending () const noexcept
virtual void process (audio::BufferView< float > &audio_output, const audio::BufferView< const float > &audio_input, midi::MidiBuffer &midi_in, midi::MidiBuffer &midi_out, const ProcessContext &context)=0
 Process one buffer of audio.
virtual void process (ProcessBuffers &audio, midi::MidiBuffer &midi_in, midi::MidiBuffer &midi_out, const ProcessContext &context)
 Additive multi-bus process entry point.
virtual bool has_editor () const
 Editor support.
virtual std::pair< uint32_t, uint32_t > editor_size () const
 Preferred editor window size in logical pixels.
virtual ViewSize view_size () const
 Return the full view size hints (preferred/min/max).
virtual std::unique_ptr< view::View > create_view ()
 Create a custom view for this processor.
virtual void on_view_opened (view::View &)
 Called after a view has been constructed and attached.
virtual void on_view_closed (view::View &)
 Called immediately before a view is destroyed.
virtual void on_view_resized (view::View &, uint32_t, uint32_t)
 Called when the host resizes the editor window.
bool request_editor_resize (uint32_t width, uint32_t height)
 Editor-INITIATED host-window resize (the plugin↔host direction that on_view_resized does not cover).
virtual void on_host_transport_changed (bool, double)
 Called when the host's transport state transitions between playing and stopped, or jumps to a new position.
virtual void on_host_tempo_changed (double)
 Called when the host's transport tempo changes.
virtual std::unique_ptr< class AraDocumentController > create_ara_document_controller ()
 Optional ARA 2.x document-controller factory.
virtual view::ScriptedUiSession * active_scripted_ui ()
 Return the active scripted UI session when a custom create_view() path owns one.
virtual const view::ScriptedUiSession * active_scripted_ui () const
virtual std::vector< SettingsSection > settings_sections ()
 Settings tabs this plugin contributes, composed by the host alongside its own host-owned tabs (e.g.
virtual PrepareResourceUsage estimate_prepare_resources (const PrepareContext &) const
 Estimate storage the next prepare() will allocate or reserve.
virtual PrepareResourceLimit check_prepare_resource_limits (const PrepareContext &context) const
 Check the processor's estimate against the host-supplied prepare limits.
virtual std::vector< std::byte > serialize_dsp_state () const
 Opt-in DSP-state carry across a hot-reload (reload lane, item 1.6).
virtual bool restore_dsp_state (const std::vector< std::byte > &)
virtual bool supports_editor_reload () const
 Editor live-reload support (live-swap 1.9).
virtual std::uint64_t editor_reload_generation () const
 Monotonic counter that increments each time this processor's editor content should be rebuilt (after a successful logic hot-swap).
void prepare_f64_fallback_scratch (const PrepareContext &context)
 Prepare scratch used by the default process_f64() fallback.
void prepare_f64_fallback_scratch (const PrepareContext &context, const BusesLayout &layout)
virtual void process_f64 (audio::BufferView< double > &audio_output, const audio::BufferView< const double > &audio_input, midi::MidiBuffer &midi_in, midi::MidiBuffer &midi_out, const ProcessContext &context)
 Native double-precision process entry point.
virtual void process_f64 (ProcessBuffers64 &audio, midi::MidiBuffer &midi_in, midi::MidiBuffer &midi_out, const ProcessContext &context)
 Additive double-precision richer-surface process entry point.
virtual void on_non_realtime_tick ()
 Non-realtime maintenance tick.
virtual bool non_realtime_tick_pending () const
 RT-safe query: "I have non-realtime work waiting".
state::StateStore & state ()
 Access the parameter state store.
const state::StateStore & state () const
const audio::BufferView< const float > * sidechain_input () const
 Access sidechain input buffer (set by format adapters before process).
const midi::MpeBuffer * mpe_input () const
 Access the per-note MPE expression buffer for this block.
const midi::UmpBuffer * ump_input () const
 Access the MIDI 2.0 UMP buffer for this block.
const state::ParameterEventQueue * param_events () const
 Access sample-accurate parameter automation for this block.
const state::ModulationEventQueue * modulation_events () const
 Timestamped host modulation events for the current block.
bool push_output_param_event (state::ParamID id, float value, std::uint32_t sample_offset) noexcept
 Emit a sample-accurate parameter change to the host from process().
const state::ParameterEventQueue * output_param_events () const
 Access the output parameter-event queue, if the adapter wired one.
void set_state_store (state::StateStore *store)
void set_sidechain (const audio::BufferView< const float > *sc)
void set_mpe_input (const midi::MpeBuffer *mpe)
void set_ump_input (const midi::UmpBuffer *ump)
void set_param_events (const state::ParameterEventQueue *events)
void set_modulation_events (const state::ModulationEventQueue *events)
void set_output_param_events (state::ParameterEventQueue *events)
void set_editor_resize_handler (std::function< bool(uint32_t, uint32_t)> handler)
void set_editor_resize_handler (const void *editor_owner, std::function< bool(uint32_t, uint32_t)> handler, std::function< bool()> is_active={})
virtual std::vector< NoteName > note_names () const
 Names for individual notes, shown by hosts in the piano roll and drum editors.
virtual view::ValueChannelSet * value_channels ()
 Named value channels this processor publishes for its UI — gain reduction, an envelope follower, a spectrum, or bounded trigger occurrences — i.e.
virtual void visit_value_channels (const std::function< void(view::ValueChannelSet *)> &visitor)
 Synchronously visit the current value-channel set while the processor keeps it alive.
virtual void visit_active_scripted_ui (const std::function< void(view::ScriptedUiSession *)> &visitor)
 Synchronously visit the active scripted-UI session while the processor keeps it alive.
virtual void visit_active_scripted_ui (const std::function< void(const view::ScriptedUiSession *)> &visitor) const
 Const counterpart to visit_active_scripted_ui().
virtual bool supports_in_place_scripted_ui_reload () const
 Opt in when a processor-owned scripted editor must reload its existing session rather than rebuilding through create_view().
virtual bool reload_active_scripted_ui_in_place (std::string *)
 Reload a processor-owned scripted editor in place when the editor generation changes.
virtual bool process_block (ProcessBlock &)
 Process the additive block contract directly.
virtual std::optional< std::uint32_t > editor_background () const
 The editor's own background colour, as 0xRRGGBB.
virtual EditorPrewarm editor_prewarm () const
 See EditorPrewarm above.
virtual bool wants_sample_accurate_parameters () const
 Whether this processor reads sample-accurate parameter automation: param_events(), a state::ParamCursor, or for_each_subblock().
virtual bool wants_au_scheduled_parameter_slices () const
 AU v2 only, and only for a processor that wants sample-accurate parameters.
virtual EditorFactory * editor_factory ()
 The UI-agnostic editor factory for this processor, or null.
virtual void on_panic (PanicMode)
 Panic hook: stop this plug-in's own voices.
void request_panic (PanicMode mode=PanicMode::immediate)
 Ask the plug-in to silence itself and, where the host has MIDI output, end the notes it has sent.
PanicCapabilities panic_capabilities () const
 What a panic request can do in the current host. Cheap; any thread.
std::shared_ptr< PanicState > panic_state () const
 The request/state object adapters service.

Protected Attributes

std::vector< DslParamDescriptor > dsl_params_
DslBusLayout bus_layout_
std::string dsl_name_

Member Enumeration Documentation

◆ MemoryPressure

enum class pulp::format::Processor::MemoryPressure
stronginherited

Memory-pressure levels a host can surface to a plugin.

Mirrors the broad shape of iOS didReceiveMemoryWarning + Windows low-memory notifications + Android TrimMemory.

Enumerator
Advisory 

Hint only — trim obviously disposable caches, keep working set.

Critical 

Serious — drop every cache the plugin can rebuild on demand (image atlases, analysis buffers, undo history beyond the last N entries).

Audio rendering must continue.

Member Function Documentation

◆ active_scripted_ui() [1/2]

virtual view::ScriptedUiSession * pulp::format::Processor::active_scripted_ui ( )
inlinevirtualinherited

Return the active scripted UI session when a custom create_view() path owns one.

The default framework editor path is tracked by ViewBridge directly; processor-owned sessions use this hook so format adapters can still select scripted/GPU hosting and poll the session.

Reimplemented in pulp::format::reload::ReloadableShell.

◆ active_scripted_ui() [2/2]

virtual const view::ScriptedUiSession * pulp::format::Processor::active_scripted_ui ( ) const
inlinevirtualinherited

◆ bus_layout()

const DslBusLayout & pulp::dsl::DslProcessor::bus_layout ( ) const
inline

◆ check_prepare_resource_limits()

virtual PrepareResourceLimit pulp::format::Processor::check_prepare_resource_limits ( const PrepareContext & context) const
inlinevirtualinherited

Check the processor's estimate against the host-supplied prepare limits.

Returning None means the estimate fits every non-zero limit. Hosts that want fail-closed prepare behavior can call this before prepare(). Appended to preserve additive-only vtable ordering.

◆ consume_latency_changed_flag()

bool pulp::format::Processor::consume_latency_changed_flag ( )
inlinenoexceptinherited

Adapter-side polling helper.

Returns true exactly once per flag_*_changed() call. The adapter calls this on the host / main thread; on true it must get the latest latency_samples() / tail_samples to the host by that format's sanctioned route (see flag_latency_changed above — for CLAP that is a restart request, not a direct push).

◆ consume_note_names_changed_flag()

bool pulp::format::Processor::consume_note_names_changed_flag ( )
inlinenoexceptinherited

◆ consume_state_dirty_flag()

bool pulp::format::Processor::consume_state_dirty_flag ( )
inlinenoexceptinherited

◆ consume_tail_changed_flag()

bool pulp::format::Processor::consume_tail_changed_flag ( )
inlinenoexceptinherited

◆ create_ara_document_controller()

virtual std::unique_ptr< class AraDocumentController > pulp::format::Processor::create_ara_document_controller ( )
virtualinherited

Optional ARA 2.x document-controller factory.

Plugins that opt in to ARA return a new AraDocumentController from this method; the format-adapter companion factory (VST3 / AU / CLAP) owns the instance and tears it down with the plugin. Default returns nullptr — the plugin is not ARA-aware. Forward-declared so plugin TUs that don't implement ARA don't need to pull pulp/format/ara.hpp.

◆ create_view()

virtual std::unique_ptr< view::View > pulp::format::Processor::create_view ( )
virtualinherited

Create a custom view for this processor.

Default returns nullptr, which signals the framework to build the default editor (scripted UI if configured, otherwise AutoUi from registered parameters).

Override to return a fully custom view::View tree. The returned view is owned by the ViewBridge and destroyed when the editor closes. This method may be called multiple times during the lifetime of the processor (one per attached editor window).

Reimplemented in pulp::format::reload::ReloadableShell.

◆ define_parameters()

virtual void pulp::format::Processor::define_parameters ( state::StateStore & store)
pure virtualinherited

Register parameters with the state store.

Called once during construction. Add all automatable parameters here.

Implemented in pulp::dsl::FaustProcessor< FaustDsp >, pulp::format::NativeCoreProcessor, pulp::format::reload::ReloadableShell, pulp::format::SpectralFrameProcessor, pulp::host::BakedGraphProcessor, and pulp::sequence::SequenceProcessor.

◆ descriptor()

virtual PluginDescriptor pulp::format::Processor::descriptor ( ) const
pure virtualinherited

◆ deserialize_plugin_state()

virtual bool pulp::format::Processor::deserialize_plugin_state ( std::span< const uint8_t > )
inlinevirtualinherited

Restore plugin-owned state previously returned by serialize_plugin_state().

An empty span means the host blob carried no plugin-owned payload (legacy state or a processor that saved only StateStore data). Plugins that override this hook should treat empty input as "reset persisted plugin-owned state to defaults". Return false to reject malformed or incompatible payloads.

Called on a host/main thread with the audio thread stopped.

Reimplemented in pulp::format::NativeCoreProcessor.

◆ dsl_name()

const std::string & pulp::dsl::DslProcessor::dsl_name ( ) const
inline

◆ dsl_params()

const std::vector< DslParamDescriptor > & pulp::dsl::DslProcessor::dsl_params ( ) const
inline

◆ editor_background()

virtual std::optional< std::uint32_t > pulp::format::Processor::editor_background ( ) const
inlinevirtualinherited

The editor's own background colour, as 0xRRGGBB.

A host-embedded editor returns its view before its document has drawn (view-first opening), so the host's first frames — and the native layer behind them — show nothing but this colour, as do the letterbox bars around a pinned design viewport. Return the colour the editor paints behind everything else (for a scripted UI, its page/root background) so the editor opens looking like itself instead of a framework default.

Called on the main thread each time an editor opens, so it may depend on state (an editor with user-selectable colour schemes returns the active scheme's background). std::nullopt uses the editor root's theme bg.primary, which is what a native or AutoUi editor paints. See ViewBridge::editor_background_rgb(). Appended to preserve additive-only vtable ordering (node_abi_gate).

◆ editor_factory()

virtual EditorFactory * pulp::format::Processor::editor_factory ( )
virtualinherited

The UI-agnostic editor factory for this processor, or null.

A non-null factory builds this processor's editors through the editor-host contract in pulp/format/editor_host.hpp: one EditorFactory creates an Editor per window and role, each bound to the processor through an EditorContext. The factory belongs to the processor and must outlive every editor it creates; the returned pointer is non-owning. Called on the host's main thread.

The default returns the factory of the UI package this plug-in's binary declares with pulp_add_plugin(... UI <package>) (see pulp/format/editor_package.hpp), so a plug-in gets its package's editor without overriding this. Each plug-in binary carries its own choice; every processor in that binary that does not override this shares it. An override wins over the package.

Null (no UI package, UI none, and no override) leaves the processor on the existing editor path (has_editor(), create_view() and the hooks around them), which format adapters keep using unchanged. A processor with no factory and has_editor() == false is headless.

Defined out of line (format.cpp) so a derived class's vtable names this exported member rather than the hidden image-local accessor: a hot-reload logic dylib resolves Processor's members from the plug-in that loads it, and could not resolve a hidden symbol.

Appended to preserve additive-only vtable ordering (node_abi_gate).

◆ editor_host_kind()

EditorHostKind pulp::format::Processor::editor_host_kind ( ) const
inlineinherited

Whether this processor runs inside a plug-in host or the Pulp standalone app.

Every plug-in format adapter leaves the default, plugin; only StandaloneApp marks its processor standalone. Safe to call from create_view() and from any editor code on the main thread. The same answer reaches scripted editors as hostKind().

◆ editor_prewarm()

virtual EditorPrewarm pulp::format::Processor::editor_prewarm ( ) const
inlinevirtualinherited

See EditorPrewarm above.

Appended to preserve additive-only vtable ordering (node_abi_gate).

◆ editor_reload_generation()

virtual std::uint64_t pulp::format::Processor::editor_reload_generation ( ) const
inlinevirtualinherited

Monotonic counter that increments each time this processor's editor content should be rebuilt (after a successful logic hot-swap).

The editor idle tick polls this; when it changes, the ViewBridge rebuilds the primary view from create_view(). Only meaningful when supports_editor_reload() is true. Must be safe to call from the UI thread. Appended to preserve additive-only vtable ordering.

Reimplemented in pulp::format::reload::ReloadableShell.

◆ editor_size()

virtual std::pair< uint32_t, uint32_t > pulp::format::Processor::editor_size ( ) const
inlinevirtualinherited

Preferred editor window size in logical pixels.

◆ estimate_prepare_resources()

virtual PrepareResourceUsage pulp::format::Processor::estimate_prepare_resources ( const PrepareContext & ) const
inlinevirtualinherited

Estimate storage the next prepare() will allocate or reserve.

Default is unknown/zero for source compatibility. Processors with large prepared resources should override this so hosts and tests can reject oversized configurations before allocation. Called on the host thread, never from process(). Appended to preserve additive-only vtable ordering.

◆ flag_latency_changed()

void pulp::format::Processor::flag_latency_changed ( )
inlinenoexceptinherited

Cross-adapter latency / tail change notifications.

Called from process() on the audio thread when a plugin's latency or tail length changes mid-render (e.g. a linear-phase EQ flipping between FIR taps, a reverb extending its decay). The Processor sets an std::atomic<bool> pending-flag; the format adapter polls the flag on the host / main thread and republishes in whatever way that format sanctions. This is NOT the same call in each:

  • VST3 — restartComponent(kLatencyChanged), which per ivsteditcontroller.h is itself a request that the host "deactivate and reactivate the plug-in".
  • AU v2 / v3 — kAudioUnitProperty_Latency PropertyChanged / KVO on latency. Latency is an observable property there with no restart precondition.
  • CLAP — clap_host->request_restart() when the plugin is ACTIVE, and clap_host_latency->changed() only from inside the resulting clap_activate(). clap/ext/latency.h allows the reported latency to move during activate and nowhere else, so changed() alone on an active plugin announces a value the host may not act on. An inactive CLAP plugin reports directly.
  • AAX — SetSignalLatency.

Audio-thread-safe. Never call a host API from process().

◆ flag_note_names_changed()

void pulp::format::Processor::flag_note_names_changed ( )
inlinenoexceptinherited

Note-name change notification, same shape as the latency / tail pair above.

A sampler that loads a new kit, or an instrument that switches articulation maps, raises this so the adapter republishes note_names() and the host relabels its piano roll.

Audio-thread-safe, so a processor may raise it from process().

◆ flag_state_dirty()

void pulp::format::Processor::flag_state_dirty ( )
inlinenoexceptinherited

Non-parameter state-change notification, same shape as the latency / tail / note-name flags above.

Parameter edits already reach the host through the parameter system, so a host knows the project changed. State that lives outside that system leaves no such trace: a loaded sample or impulse response, an imported wavetable, an editor-only setting carried in the plugin's own state payload. Without a signal the host has no reason to believe anything changed, and a user can close the project and lose that work without ever being offered a save prompt. A Processor raises this whenever such state changes.

The adapter republishes it by whatever route the format sanctions. VST3 is wired: IComponentHandler2::setDirty(true), delivered on the main thread. CLAP's equivalent is clap_host_state::mark_dirty; the other adapters do not consume the flag, so raising it is harmless but inert there.

Audio-thread-safe, so a processor may raise it from process(), though the usual caller is the editor or a file-load on the main thread.

◆ flag_tail_changed()

void pulp::format::Processor::flag_tail_changed ( )
inlinenoexceptinherited

◆ has_editor()

virtual bool pulp::format::Processor::has_editor ( ) const
inlinevirtualinherited

Editor support.

By default, all processors have an auto-generated editor built from their parameter definitions (using AutoUi). Override these to customize or disable the editor. Whether this processor has a GUI editor. Default true (AutoUi).

Reimplemented in pulp::dsl::FaustProcessor< FaustDsp >, and pulp::sequence::SequenceProcessor.

◆ is_bus_layout_supported()

virtual bool pulp::format::Processor::is_bus_layout_supported ( const BusesLayout & layout) const
inlinevirtualinherited

Validate a proposed bus layout.

Default acceptance policy:

  • Per-side bus count matches the descriptor.
  • Each proposed channel count is mono or stereo; empty is accepted only for a descriptor-declared zero-width or optional bus.

Override for plugins that need a tighter contract (e.g. an instrument that only renders stereo out, a sidechain compressor that requires sidechain channels == main channels, surround processors that accept >2 channels). The format adapter MUST call this on the host thread — never from process().

Adapters fall back to the descriptor's declared bus count + the empty/mono/stereo policy when a plugin doesn't override this hook, which preserves the prior default-acceptance behavior exactly.

◆ latency_change_pending()

bool pulp::format::Processor::latency_change_pending ( ) const
inlinenoexceptinherited

Non-mutating peek used by adapters that need to decide whether to ping the host for a main-thread callback without losing the pending edge (e.g.

CLAP's request_callback). Does not clear the flag; the host-thread callback must still call consume_*_changed_flag() to drain it.

◆ latency_samples()

virtual int pulp::format::Processor::latency_samples ( ) const
inlinevirtualinherited

Latency in samples introduced by this processor (default 0).

Override for plugins that buffer or lookahead (e.g., compressors, linear-phase EQs). Hosts use this for delay compensation.

Reimplemented in pulp::format::NativeCoreProcessor, pulp::format::reload::ReloadableShell, pulp::format::SpectralFrameProcessor, pulp::host::BakedGraphProcessor, and pulp::sequence::SequenceProcessor.

◆ modulation_events()

const state::ModulationEventQueue * pulp::format::Processor::modulation_events ( ) const
inlineinherited

Timestamped host modulation events for the current block.

CLAP PARAM_MOD events retain their sample offsets here; the StateStore modulation offset remains the compatibility snapshot for processors that only consume block-rate modulation.

◆ mpe_input()

const midi::MpeBuffer * pulp::format::Processor::mpe_input ( ) const
inlineinherited

Access the per-note MPE expression buffer for this block.

Returns nullptr unless the plugin declared MPE via PluginDescriptor legacy flags or node capabilities and the host/format adapter populated it.

◆ non_realtime_tick_pending()

virtual bool pulp::format::Processor::non_realtime_tick_pending ( ) const
inlinevirtualinherited

RT-safe query: "I have non-realtime work waiting".

Default false.

Called from process() by adapters that can only reach the control thread by ASKING for it — CLAP (and therefore WebCLAP) delivers parameter changes as events inside process(), and the only way out is clap_host->request_callback() followed by on_main_thread(). The CLAP adapter peeks this flag each block, exactly as it already does for latency/tail changes, and requests the callback when it is set.

MUST be realtime-safe: no locks, no allocation. Read atomics and compare.

The WAM adapter also consults it once per block, so work a processor discovers for ITSELF (not just work a control write announced) still gets serviced there.

Appended to preserve additive-only vtable ordering (node_abi_gate).

◆ note_names()

virtual std::vector< NoteName > pulp::format::Processor::note_names ( ) const
inlinevirtualinherited

Names for individual notes, shown by hosts in the piano roll and drum editors.

Default empty: the host labels notes with bare pitches, which is what every plug-in did before this hook existed.

Override for instruments whose keys mean something other than pitch — a drum kit ("Kick", "Snare", "Closed Hat"), a sampler's keyswitch range ("Legato", "Staccato"), a step trigger grid. Entries may use the -1 wildcard for port and channel to name a key across all of them.

Called on the host / main thread, never from process(). Raise flag_note_names_changed() when the list changes so the adapter republishes it.

Appended to preserve additive-only vtable ordering (node_abi_gate).

◆ note_names_change_pending()

bool pulp::format::Processor::note_names_change_pending ( ) const
inlinenoexceptinherited

◆ on_host_tempo_changed()

virtual void pulp::format::Processor::on_host_tempo_changed ( double )
inlinevirtualinherited

Called when the host's transport tempo changes.

Default no-op. Override for plugins that care about tempo outside of a process() call — delay sync recomputation, tempo-synced LFO rate caches, UI BPM read-outs. Runs on the main/UI thread; the audio thread keeps reading the current tempo from ProcessContext as usual.

◆ on_host_transport_changed()

virtual void pulp::format::Processor::on_host_transport_changed ( bool ,
double  )
inlinevirtualinherited

Called when the host's transport state transitions between playing and stopped, or jumps to a new position.

Default no-op.

◆ on_memory_pressure()

virtual void pulp::format::Processor::on_memory_pressure ( MemoryPressure )
inlinevirtualinherited

Called on the main/UI thread when the host observes memory pressure.

Default is a no-op — plugins that cache decoded images, analysis buffers, or paged samples override this to drop caches. Implementations MUST NOT block the audio thread; use the existing host-thread rules guidance in docs/reference/host-thread-rules.md for cache invalidation.

Wiring: iOS — the platform layer receives didReceiveMemoryWarning; routing that signal into processors is host-owned. macOS — the platform layer observes DISPATCH_MEMORYPRESSURE; routing that signal into processors is host-owned. Android — the platform layer receives ComponentCallbacks2.onTrimMemory; routing that signal into processors is host-owned. Windows — the platform layer samples GlobalMemoryStatusEx(); routing that signal into processors is host-owned.

◆ on_non_realtime_tick()

virtual void pulp::format::Processor::on_non_realtime_tick ( )
inlinevirtualinherited

Non-realtime maintenance tick.

Default: no-op.

A processor whose control changes need work that process() must never do — decode, resample, FFT-plan, allocate — normally does it on its own background thread. Some hosts give it no thread to run on:

  • WAM v2 in the browser. The entire module lives inside an AudioWorklet; there is no second thread and no std::thread.
  • WebCLAP in the browser, likewise (its on_main_thread callback is the closest thing to a control thread).

Those adapters call this hook from a NON-RENDER context after anything that could have dirtied the processor's derived state — a parameter write, a state restore, a re-prepare. A processor that has a real worker thread should do nothing here, or the worker and the host would race.

WHO ACTUALLY CALLS IT (the contract is narrower than "any host"):

  • WAM: the adapter marks the processor dirty on a control write and calls this ONCE per block, right after the render call — so a burst of control messages (a knob drag delivers many in one turn) collapses into a single pass over the LATEST values. Do not rely on one tick per parameter write; rely on "eventually, with the latest values".
  • CLAP — including, but NOT limited to, WebCLAP: clap_on_main_thread and state.load call it unconditionally. So a NATIVE CLAP plugin gets this hook too (harmlessly: a processor with a worker returns immediately). Do not assume "this only fires in a browser".
  • VST3, AU, and the standalone host do NOT call it at all. A processor that relies on it for correctness must ALSO have a worker (or do the work in prepare()), or it will never reconcile in those formats.

It is NOT an audio-thread callback and is never called from inside process(). In a worklet-only host it does run on the same OS thread as the render callback (just not inside it), so a long tick can still make the next quantum late — keep the work bounded, and prefer work that is proportional to what actually changed.

Appended to preserve additive-only vtable ordering (node_abi_gate).

◆ on_panic()

virtual void pulp::format::Processor::on_panic ( PanicMode )
inlinevirtualinherited

Panic hook: stop this plug-in's own voices.

Called on the audio thread by a host adapter that services panic requests (see pulp/format/panic.hpp), before process(), when request_panic() was raised. immediate means hard-stop (release tails cut, the MIDI CC 120 semantic); release means enter the normal release (CC 123). A processor that owns a midi::Synthesiser implements it as synth.panic(mode == PanicMode::immediate). Must be real-time safe. Default: no-op. Appended to preserve additive-only vtable ordering (node_abi_gate).

◆ on_view_closed()

virtual void pulp::format::Processor::on_view_closed ( view::View & )
inlinevirtualinherited

Called immediately before a view is destroyed.

Runs on the UI thread. Use to unregister listeners; do not assume the view is still usable for drawing after this returns.

◆ on_view_opened()

virtual void pulp::format::Processor::on_view_opened ( view::View & )
inlinevirtualinherited

Called after a view has been constructed and attached.

Runs on the host/UI thread. Safe to read state and register UI listeners.

◆ on_view_resized()

virtual void pulp::format::Processor::on_view_resized ( view::View & ,
uint32_t ,
uint32_t  )
inlinevirtualinherited

Called when the host resizes the editor window.

Dimensions are in logical pixels. Runs on the UI thread.

◆ output_param_events()

const state::ParameterEventQueue * pulp::format::Processor::output_param_events ( ) const
inlineinherited

Access the output parameter-event queue, if the adapter wired one.

◆ panic_capabilities()

PanicCapabilities pulp::format::Processor::panic_capabilities ( ) const
inlineinherited

What a panic request can do in the current host. Cheap; any thread.

◆ panic_state()

std::shared_ptr< PanicState > pulp::format::Processor::panic_state ( ) const
inlineinherited

The request/state object adapters service.

Created on first use, off the audio thread: fetch it once at prepare time and keep the pointer.

◆ param_events()

const state::ParameterEventQueue * pulp::format::Processor::param_events ( ) const
inlineinherited

Access sample-accurate parameter automation for this block.

Returns nullptr when the current host path did not provide a parameter-event queue; an empty queue means the adapter participated but the block had no parameter events.

In VST3, AU v2 and CLAP the queue is always empty for a processor whose wants_sample_accurate_parameters() returns false. A read in that state is a mistake (the processor opted out of the points it is looking for), so it is recorded (one relaxed store, safe on the audio thread) in the adapter's ParamEventsOptOutMonitor, which logs it once, off the audio thread, naming the override.

◆ prepare()

virtual void pulp::format::Processor::prepare ( const PrepareContext & context)
pure virtualinherited

Prepare for processing.

Allocate buffers, initialize filters. Called on the host thread with the audio thread stopped.

Implemented in pulp::dsl::FaustProcessor< FaustDsp >, pulp::format::NativeCoreProcessor, pulp::format::reload::ReloadableShell, pulp::format::SpectralFrameProcessor, pulp::host::BakedGraphProcessor, and pulp::sequence::SequenceProcessor.

◆ prepare_f64_fallback_scratch() [1/2]

void pulp::format::Processor::prepare_f64_fallback_scratch ( const PrepareContext & context)
inherited

Prepare scratch used by the default process_f64() fallback.

Format adapters call this after the plugin's prepare() while audio is stopped, so a plugin that opts into f64 before overriding process_f64() can still run without allocating on the audio thread.

◆ prepare_f64_fallback_scratch() [2/2]

void pulp::format::Processor::prepare_f64_fallback_scratch ( const PrepareContext & context,
const BusesLayout & layout )
inherited

◆ process() [1/2]

virtual void pulp::format::Processor::process ( audio::BufferView< float > & audio_output,
const audio::BufferView< const float > & audio_input,
midi::MidiBuffer & midi_in,
midi::MidiBuffer & midi_out,
const ProcessContext & context )
pure virtualinherited

Process one buffer of audio.

Called on the real-time audio thread.

Parameters
audio_outputOutput buffer to fill (main bus)
audio_inputInput buffer to read (main bus)
midi_inIncoming MIDI events (sample-accurate)
midi_outOutgoing MIDI events (for MIDI effects)
contextTransport state and timing

For sidechain input, call sidechain_input() which returns nullptr if no sidechain is connected.

The input is read-only. A host or graph may hand the same input memory to several processors, or the host's own buffer, so writing through it (with a const_cast, or by passing it to an API that writes in place) is undefined behavior. A processor that needs to, such as a native core handing its buffers to a C interface as mutable, sets PluginDescriptor::node_capabilities.writes_input_buffers, and a graph then gives it private copies.

Implemented in pulp::dsl::FaustProcessor< FaustDsp >, pulp::format::NativeCoreProcessor, pulp::format::reload::ReloadableShell, pulp::format::SpectralFrameProcessor, pulp::host::BakedGraphProcessor, and pulp::sequence::SequenceProcessor.

◆ process() [2/2]

virtual void pulp::format::Processor::process ( ProcessBuffers & audio,
midi::MidiBuffer & midi_in,
midi::MidiBuffer & midi_out,
const ProcessContext & context )
inlinevirtualinherited

Additive multi-bus process entry point.

The default implementation preserves the existing plugin-author contract: it projects the active main output, optional main input, and optional sidechain input from ProcessBuffers, then calls the original main-in/main-out process() callback. Plugins that need direct access to auxes, multi-output instruments, or surround buses can override this method while older processors continue to work unchanged. Appended to preserve additive-only vtable ordering.

◆ process_block()

virtual bool pulp::format::Processor::process_block ( ProcessBlock & )
inlinevirtualinherited

Process the additive block contract directly.

In-process graph nodes use this only when the descriptor opts into dense audio-rate modulation. Appended to preserve every existing virtual slot.

◆ process_f64() [1/2]

virtual void pulp::format::Processor::process_f64 ( audio::BufferView< double > & audio_output,
const audio::BufferView< const double > & audio_input,
midi::MidiBuffer & midi_in,
midi::MidiBuffer & midi_out,
const ProcessContext & context )
virtualinherited

Native double-precision process entry point.

Default implementation preserves compatibility for plugins that opt into f64 before porting their DSP: it converts the double main input to the prepared f32 fallback scratch, calls the original f32 process(), then converts the f32 main output back to double. The fallback never allocates during process(); if the adapter did not prepare enough scratch, it emits silence rather than growing buffers on the audio thread.

◆ process_f64() [2/2]

virtual void pulp::format::Processor::process_f64 ( ProcessBuffers64 & audio,
midi::MidiBuffer & midi_in,
midi::MidiBuffer & midi_out,
const ProcessContext & context )
virtualinherited

Additive double-precision richer-surface process entry point.

The default routes simple main-bus blocks through process_f64() so processors that override the main-bus f64 virtual still run natively. For sidechain or aux blocks, it falls back through the f32 richer surface using prepared scratch so legacy sidechain/aux semantics are preserved without allocating on the audio thread.

◆ publish_plugin_state_snapshot() [1/2]

void pulp::format::Processor::publish_plugin_state_snapshot ( std::span< const uint8_t > bytes)
inlineinherited

◆ publish_plugin_state_snapshot() [2/2]

void pulp::format::Processor::publish_plugin_state_snapshot ( std::vector< uint8_t > bytes)
inlineinherited

Publish an immutable custom-state snapshot from a non-audio thread.

Once a snapshot has been published, host save callbacks copy it instead of invoking serialize_plugin_state(). This keeps large sampler, wavetable, and analysis payload serialization out of host-controlled save timing while preserving serialize_plugin_state() as a compatibility fallback for plugins that have not opted in.

◆ published_plugin_state_snapshot()

std::shared_ptr< const std::vector< uint8_t > > pulp::format::Processor::published_plugin_state_snapshot ( ) const
inlineinherited

Returns null until the plugin opts into published snapshots.

A non-null empty vector is meaningful: the plugin explicitly published no custom payload and serialize_plugin_state() must not be called.

◆ push_output_param_event()

bool pulp::format::Processor::push_output_param_event ( state::ParamID id,
float value,
std::uint32_t sample_offset )
inlinenoexceptinherited

Emit a sample-accurate parameter change to the host from process().

Call this when the plugin itself changes a parameter mid-block (e.g. an LFO-driven macro, a modeled control) and you want the host to record the change at its exact sample offset rather than as a single coalesced value at block start. value is in the plain parameter domain; sample_offset is relative to the start of the current block. The host adapter drains these events after process() and clamps the offset to the block length. Returns false when no output queue is wired (the current format/host path does not carry sample-accurate output) or the per-block queue is full — in either case the adapter's end-of-block snapshot still reports the parameter's final value, so no change is lost.

Realtime-safe: pushes into a fixed-capacity queue, never allocates or locks. Only valid to call from within process().

◆ release()

virtual void pulp::format::Processor::release ( )
inlinevirtualinherited

Release resources.

Called on the host thread with audio stopped. Processors that own active voices or other note-lifecycle state must clear it here; format adapters separately reset their inbound MPE trackers immediately after this call. For an in-place host reset, clear the same state when ProcessContext::reset_requested is true. A transport jump alone does not clear adapter tracker identities and therefore must not clear voice ownership.

Reimplemented in pulp::dsl::FaustProcessor< FaustDsp >, pulp::format::NativeCoreProcessor, pulp::format::reload::ReloadableShell, pulp::format::SpectralFrameProcessor, and pulp::sequence::SequenceProcessor.

◆ reload_active_scripted_ui_in_place()

virtual bool pulp::format::Processor::reload_active_scripted_ui_in_place ( std::string * )
inlinevirtualinherited

Reload a processor-owned scripted editor in place when the editor generation changes.

An override owns its locking protocol and promises that the session returned at open remains authoritative, retains the hosted root, and carries the current generation's script path. Returning false leaves the generation pending. Only called when supports_in_place_scripted_ui_reload() returns true. Appended to preserve additive-only vtable ordering (node_abi_gate).

◆ request_editor_resize()

bool pulp::format::Processor::request_editor_resize ( uint32_t width,
uint32_t height )
inlineinherited

Editor-INITIATED host-window resize (the plugin↔host direction that on_view_resized does not cover).

The editor calls this to ask the DAW/standalone host to resize the plugin window to (w × h) LOGICAL pixels AND to re-pin the design viewport + aspect ratio to the same size, so the content fills the new window with no letterbox / dark fill and no squish. Use it when the editor's own natural size changes at runtime — e.g. a chrome-hiding "player" mode that wants a smaller, differently-shaped window than its full authoring layout.

The format adapter installs the actual host call (CLAP clap_host_gui->request_resize, VST3 IPlugFrame::resizeView, AU preferredContentSize, standalone WindowHost::request_content_size) via set_editor_resize_handler() when the editor opens, and clears it on close. Returns true when a handler is installed AND the host accepted the request; false when no editor is open, multiple editor windows make the target ambiguous, the host exposes no resize path, or the host refused (the editor should keep its current size). Main-thread / UI-thread only.

The handlers live in a side table (detail::editor_resize_handlers), NOT a data member, so this capability adds nothing to sizeof(Processor) and stays ABI-compatible with prebuilt libraries.

◆ request_panic()

void pulp::format::Processor::request_panic ( PanicMode mode = PanicMode::immediate)
inlineinherited

Ask the plug-in to silence itself and, where the host has MIDI output, end the notes it has sent.

Safe from any non-real-time thread (a UI button, a script, a menu): it records the request and returns at once; the next audio block services it. Does nothing audible if the host adapter does not service panic requests; check panic_capabilities(). The state lives in a side table, so this adds nothing to sizeof(Processor).

◆ restore_dsp_state()

virtual bool pulp::format::Processor::restore_dsp_state ( const std::vector< std::byte > & )
inlinevirtualinherited

◆ resume()

virtual void pulp::format::Processor::resume ( )
inlinevirtualinherited

Resume processing after a prior suspend().

Default no-op; the symmetric counterpart of suspend() above.

Reimplemented in pulp::format::NativeCoreProcessor.

◆ serialize_dsp_state()

virtual std::vector< std::byte > pulp::format::Processor::serialize_dsp_state ( ) const
inlinevirtualinherited

Opt-in DSP-state carry across a hot-reload (reload lane, item 1.6).

Documented in full next to latency_samples() above; DECLARED here (at the end of the vtable) so the Processor virtual order stays additive-only (node_abi_gate) after is_bus_layout_supported/process were frozen on main. serialize returns the OLD processor's opaque DSP-state blob (empty = nothing to carry); restore loads it into the NEW processor (false = cold start, always safe). Appended to preserve additive-only vtable ordering.

◆ serialize_plugin_state()

virtual std::vector< uint8_t > pulp::format::Processor::serialize_plugin_state ( ) const
inlinevirtualinherited

Serialize plugin-owned state that is not part of StateStore.

Use this for opaque state that must survive host/session recall but should not be exposed as flat automatable parameters. The returned bytes travel alongside StateStore through the format adapters' save/load paths.

Called on a host/main thread, never from process().

Reimplemented in pulp::format::NativeCoreProcessor.

◆ set_editor_host_kind()

void pulp::format::Processor::set_editor_host_kind ( EditorHostKind kind)
inlineinherited

◆ set_editor_resize_handler() [1/2]

void pulp::format::Processor::set_editor_resize_handler ( const void * editor_owner,
std::function< bool(uint32_t, uint32_t)> handler,
std::function< bool()> is_active = {} )
inlineinherited

◆ set_editor_resize_handler() [2/2]

void pulp::format::Processor::set_editor_resize_handler ( std::function< bool(uint32_t, uint32_t)> handler)
inlineinherited

◆ set_modulation_events()

void pulp::format::Processor::set_modulation_events ( const state::ModulationEventQueue * events)
inlineinherited

◆ set_mpe_input()

void pulp::format::Processor::set_mpe_input ( const midi::MpeBuffer * mpe)
inlineinherited

◆ set_output_param_events()

void pulp::format::Processor::set_output_param_events ( state::ParameterEventQueue * events)
inlineinherited

◆ set_param_events()

void pulp::format::Processor::set_param_events ( const state::ParameterEventQueue * events)
inlineinherited

◆ set_sidechain()

void pulp::format::Processor::set_sidechain ( const audio::BufferView< const float > * sc)
inlineinherited

◆ set_state_store()

void pulp::format::Processor::set_state_store ( state::StateStore * store)
inlineinherited

◆ set_ump_input()

void pulp::format::Processor::set_ump_input ( const midi::UmpBuffer * ump)
inlineinherited

◆ settings_sections()

virtual std::vector< SettingsSection > pulp::format::Processor::settings_sections ( )
inlinevirtualinherited

Settings tabs this plugin contributes, composed by the host alongside its own host-owned tabs (e.g.

Audio/MIDI device selection in the standalone). This keeps device selection a host concern — correct in a DAW, where the host owns the audio device — while letting a plugin surface its own settings (e.g. a model picker) in one unified Settings panel. Called when the settings UI is built; may be called again if it is rebuilt. (Appended last to preserve additive-only vtable ordering.)

◆ sidechain_input()

const audio::BufferView< const float > * pulp::format::Processor::sidechain_input ( ) const
inlineinherited

Access sidechain input buffer (set by format adapters before process).

Returns nullptr if no sidechain is connected or the bus is inactive.

◆ state() [1/2]

state::StateStore & pulp::format::Processor::state ( )
inlineinherited

Access the parameter state store.

Use state().get_value(id) to read parameter values in process().

The store belongs to the host, not to the Processor, and the Processor may reach it for its whole lifetime — including from its destructor, and from any worker thread that destructor is about to join. A host must therefore keep the store alive until the Processor is gone: declare the store before the unique_ptr<Processor>, since members are destroyed in reverse. Every host in this directory does; a host that gets it backwards hands a running thread a freed store, which crashes on plug-in close and nowhere else.

◆ state() [2/2]

const state::StateStore & pulp::format::Processor::state ( ) const
inlineinherited

◆ state_dirty_pending()

bool pulp::format::Processor::state_dirty_pending ( ) const
inlinenoexceptinherited

◆ supports_editor_reload()

virtual bool pulp::format::Processor::supports_editor_reload ( ) const
inlinevirtualinherited

Editor live-reload support (live-swap 1.9).

A processor whose editor should rebuild IN PLACE while it is open — e.g. a ReloadableShell whose logic hot-swaps its create_view() — returns true here. The ViewBridge then hosts the editor under a STABLE root container so its content can be replaced live (the host keeps referencing the same root View) without the DAW re-instantiating the plugin. Default false: normal plugins are unaffected — no wrapper, no polling cost. Appended to preserve additive-only vtable ordering.

Reimplemented in pulp::format::reload::ReloadableShell.

◆ supports_in_place_scripted_ui_reload()

virtual bool pulp::format::Processor::supports_in_place_scripted_ui_reload ( ) const
inlinevirtualinherited

Opt in when a processor-owned scripted editor must reload its existing session rather than rebuilding through create_view().

Kept separate from active_scripted_ui() so existing custom scripted processors retain the ordinary create_view() reload path. Appended to preserve additive-only vtable ordering (node_abi_gate).

◆ suspend()

virtual void pulp::format::Processor::suspend ( )
inlinevirtualinherited

Pause processing for a heavy main-thread operation (preset load, convolution kernel reallocation, sample-rate change) that would otherwise need to either block in process() — fatal — or run in lock-step with process(), which is hard to get right.

The host calls suspend() before the heavy op and resume() after; while suspended, process() is expected to output silence and skip the heavy state.

Default no-op so the contract is opt-in: plug-ins that don't need it pay nothing. Plug-ins that override suspend() should flush their voices / set an internal "suspended" flag, and override resume() to clear it; process() then early- returns or zero-fills while the flag is set.

Threading: both hooks run on the host / main thread, never from process(). Format adapters do not currently call these hooks automatically. Adapter integration stays additive once the canonical "suspend-then-load-preset" surface for each format is settled. Today the hooks exist so a plug-in can wire its own UI-thread "loading..." workflow against them.

Standard suspend/resume guard: while suspended a processor should stop touching shared real-time state so a host can safely reconfigure it.

Reimplemented in pulp::format::NativeCoreProcessor.

◆ tail_change_pending()

bool pulp::format::Processor::tail_change_pending ( ) const
inlinenoexceptinherited

◆ ump_input()

const midi::UmpBuffer * pulp::format::Processor::ump_input ( ) const
inlineinherited

Access the MIDI 2.0 UMP buffer for this block.

Returns nullptr unless the plugin declared UMP via PluginDescriptor legacy flags or node capabilities and the host/format adapter populated it.

◆ value_channels()

virtual view::ValueChannelSet * pulp::format::Processor::value_channels ( )
inlinevirtualinherited

Named value channels this processor publishes for its UI — gain reduction, an envelope follower, a spectrum, or bounded trigger occurrences — i.e.

UI data that is NOT a parameter. Returning nullptr (the default) means the processor declares none, and nothing in the framework runs on its behalf: the cost of not using this is structurally zero, not a per-block branch.

Own the set as a subclass member and declare its channels in your constructor, before audio starts. The returned pointer must outlive every view attached to this processor.

Threading: publish() on a channel is audio-thread safe. Reads happen on the FrameClock thread and nowhere else — the single-reader-thread contract is load-bearing, see value_source.hpp.

Appended to preserve additive-only vtable ordering (node_abi_gate).

Reimplemented in pulp::format::reload::ReloadableShell.

◆ view_size()

virtual ViewSize pulp::format::Processor::view_size ( ) const
inlinevirtualinherited

Return the full view size hints (preferred/min/max).

Resolution order (first non-zero wins):

  1. PULP_PLUGIN_DESIGN_W / _H compile-defs injected by pulp_add_plugin(... DESIGN_WIDTH N DESIGN_HEIGHT N). When set, min is derived as preferred * 2/3, max as preferred * 2, and aspect_ratio as W/H — so CLAP's gui_can_resize (which requires min > 0) works without per-plugin overrides. Explicit DESIGN_MIN_* / DESIGN_MAX_* args override the derived values.
  2. editor_size() with no min/max bounds (legacy default).

Override this method when a plugin needs runtime-computed bounds (e.g., a dynamically generated UI). Most imported-design plugins should use the CMake args instead — see import-design skill.

◆ visit_active_scripted_ui() [1/2]

virtual void pulp::format::Processor::visit_active_scripted_ui ( const std::function< void(const view::ScriptedUiSession *)> & visitor) const
inlinevirtualinherited

Const counterpart to visit_active_scripted_ui().

Appended to preserve additive-only vtable ordering (node_abi_gate).

Reimplemented in pulp::format::reload::ReloadableShell.

◆ visit_active_scripted_ui() [2/2]

virtual void pulp::format::Processor::visit_active_scripted_ui ( const std::function< void(view::ScriptedUiSession *)> & visitor)
inlinevirtualinherited

Synchronously visit the active scripted-UI session while the processor keeps it alive.

Reloadable processors must retain their active-generation lease for the full callback instead of returning a reload-owned raw pointer to the caller.

The pointer is non-owning and is valid only for the callback. The callback must stay bounded and must not re-enter this processor.

Appended to preserve additive-only vtable ordering (node_abi_gate).

Reimplemented in pulp::format::reload::ReloadableShell.

◆ visit_value_channels()

virtual void pulp::format::Processor::visit_value_channels ( const std::function< void(view::ValueChannelSet *)> & visitor)
inlinevirtualinherited

Synchronously visit the current value-channel set while the processor keeps it alive.

Callers that need to claim an attachment from a processor whose implementation can replace its backing instance must do so inside this callback rather than retaining the raw value_channels() result.

The callback must stay bounded and must not re-enter this processor. The pointer is non-owning and is valid only for the callback unless the concrete processor independently guarantees a longer lifetime.

Appended to preserve additive-only vtable ordering (node_abi_gate).

Reimplemented in pulp::format::reload::ReloadableShell.

◆ wants_au_scheduled_parameter_slices()

virtual bool pulp::format::Processor::wants_au_scheduled_parameter_slices ( ) const
inlinevirtualinherited

AU v2 only, and only for a processor that wants sample-accurate parameters.

Default true: one process() call per slice between scheduled events, with the store at each slice's starting value and the slice's points in param_events() relative to the slice. Return false from a processor that reads automation only through param_events() (or a ParamCursor over it) to render the buffer in one call, as VST3 and CLAP do: every point at its buffer offset and the store at its end-of-buffer value. Other formats ignore it. Appended to preserve additive-only vtable ordering (node_abi_gate).

◆ wants_sample_accurate_parameters()

virtual bool pulp::format::Processor::wants_sample_accurate_parameters ( ) const
inlinevirtualinherited

Whether this processor reads sample-accurate parameter automation: param_events(), a state::ParamCursor, or for_each_subblock().

Default true: the VST3, AU v2 and CLAP adapters deliver every automation point in param_events() with its sample offset, and the store holds each parameter's end-of-block value during process(). AU v2 renders one call per scheduled slice unless wants_au_scheduled_parameter_slices() returns false.

Return false from a processor that reads its parameters once per block (state().get_value()) and never looks at the queue. Those adapters then write each automated parameter's last value in the block to the store once, before process(), leave param_events() empty, and AU v2 renders the whole buffer in one call, so dense host automation costs nothing per point. Asked once, when the adapter creates the processor. Other hosting paths (AU v3, LV2, AAX, the standalone and headless hosts, graph nodes) deliver every point either way. Appended to preserve additive-only vtable ordering (node_abi_gate).

Reimplemented in pulp::format::NativeCoreProcessor.

Member Data Documentation

◆ bus_layout_

DslBusLayout pulp::dsl::DslProcessor::bus_layout_
protected

◆ dsl_name_

std::string pulp::dsl::DslProcessor::dsl_name_
protected

◆ dsl_params_

std::vector<DslParamDescriptor> pulp::dsl::DslProcessor::dsl_params_
protected

The documentation for this class was generated from the following file: