Pulp 1.88.0
Cross-platform audio plugin framework
Loading...
Searching...
No Matches
pulp::timeline::NoteTransformRegistry Class Reference

Control-thread registry for pure note transforms. More...

#include <note_transform.hpp>

Public Member Functions

std::optional< NoteTransformError > register_transform (NoteTransformRegistration registration)
 Admits one valid, unique transform identity.
runtime::Result< NoteTransformPreview, NoteTransformError > preview (const DocumentView &view, WriterToken &writer, const ApplyNoteTransform &request) const
 Invokes the requested transform and prepares its durable replacement.
std::size_t size () const noexcept
 Returns the number of admitted transform identities.

Static Public Attributes

static constexpr std::size_t kMaxRegistrations = 1024
 Maximum number of transform identities admitted by one registry.
static constexpr std::size_t kMaxParameterBytes = 1024 * 1024
 Maximum canonical parameter payload size in bytes.
static constexpr std::size_t kMaxDurableCommandNotes = DecodeLimits{}.max_notes

Detailed Description

Control-thread registry for pure note transforms.

Registrations are immutable by identity once admitted. A transform may preserve an input note's ItemId by returning it. An output with an invalid ItemId is assigned a fresh project identity; any other identity is refused.

Member Function Documentation

◆ preview()

runtime::Result< NoteTransformPreview, NoteTransformError > pulp::timeline::NoteTransformRegistry::preview ( const DocumentView & view,
WriterToken & writer,
const ApplyNoteTransform & request ) const

Invokes the requested transform and prepares its durable replacement.

The callback runs once on the control thread. Successful output is validated, assigned identities where requested, lowered to an ordinary transaction, and applied to produce snapshot; neither the supplied view nor its project is mutated. The writer may consume identities while preparing valid output.

◆ register_transform()

std::optional< NoteTransformError > pulp::timeline::NoteTransformRegistry::register_transform ( NoteTransformRegistration registration)

Admits one valid, unique transform identity.

The registry retains shared ownership of user_data. Failure leaves the registry unchanged.

◆ size()

std::size_t pulp::timeline::NoteTransformRegistry::size ( ) const
inlinenoexcept

Returns the number of admitted transform identities.

Member Data Documentation

◆ kMaxDurableCommandNotes

std::size_t pulp::timeline::NoteTransformRegistry::kMaxDurableCommandNotes = DecodeLimits{}.max_notes
staticconstexpr

◆ kMaxParameterBytes

std::size_t pulp::timeline::NoteTransformRegistry::kMaxParameterBytes = 1024 * 1024
staticconstexpr

Maximum canonical parameter payload size in bytes.

◆ kMaxRegistrations

std::size_t pulp::timeline::NoteTransformRegistry::kMaxRegistrations = 1024
staticconstexpr

Maximum number of transform identities admitted by one registry.


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