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

Immutable intensity context lane owned by a sequence. More...

#include <model.hpp>

Public Member Functions

std::span< const DynamicsEvent > events () const noexcept
 Returns events in strictly increasing position order.
bool empty () const noexcept
 Returns whether no intensity context is authored.
const DynamicsEvent * at (timebase::TickPosition position) const noexcept
 Returns the last event starting at or before position.
std::optional< float > value_at (timebase::TickPosition position) const noexcept
 Returns the interpolated intensity at position.
bool shares_storage_with (const DynamicsLane &other) const noexcept
 Returns whether both lanes share the same immutable event storage.
bool operator== (const DynamicsLane &other) const noexcept
 Compares authored event values.

Static Public Member Functions

static runtime::Result< DynamicsLane, ModelError > create (std::vector< DynamicsEvent > events)
 Validates, orders, and stores intensity events.

Detailed Description

Immutable intensity context lane owned by a sequence.

Events are strictly ordered by position with no duplicates, mirroring ChordScaleLane. The lane is sequence-owned context read through the compile-context subscription contract described in compile_context.hpp.

This reuses AutomationInterpolation as a shared vocabulary rather than inventing a parallel one; it is deliberately not an AutomationCurve. An automation curve targets a parameter and is consumed by the modulation system, while this lane is compile-time musical context with no target and no consumer. Sharing the enum costs nothing and keeps two notions of "hold versus ramp" from drifting apart.

Member Function Documentation

◆ at()

const DynamicsEvent * pulp::timeline::DynamicsLane::at ( timebase::TickPosition position) const
noexcept

Returns the last event starting at or before position.

Returns nullptr before the first event; no default intensity is invented, because silence and "not yet stated" are different claims.

◆ create()

runtime::Result< DynamicsLane, ModelError > pulp::timeline::DynamicsLane::create ( std::vector< DynamicsEvent > events)
static

Validates, orders, and stores intensity events.

◆ empty()

bool pulp::timeline::DynamicsLane::empty ( ) const
inlinenoexcept

Returns whether no intensity context is authored.

◆ events()

std::span< const DynamicsEvent > pulp::timeline::DynamicsLane::events ( ) const
inlinenoexcept

Returns events in strictly increasing position order.

◆ operator==()

bool pulp::timeline::DynamicsLane::operator== ( const DynamicsLane & other) const
noexcept

Compares authored event values.

◆ shares_storage_with()

bool pulp::timeline::DynamicsLane::shares_storage_with ( const DynamicsLane & other) const
inlinenoexcept

Returns whether both lanes share the same immutable event storage.

◆ value_at()

std::optional< float > pulp::timeline::DynamicsLane::value_at ( timebase::TickPosition position) const
noexcept

Returns the interpolated intensity at position.

Empty before the first event, for the same reason at is null there. From the last event onward the final value holds. Between two events the earlier event's interpolation decides: Hold keeps the earlier value for the whole span, Continuous ramps linearly to the later one.


The documentation for this class was generated from the following file:
  • /home/runner/work/pulp/pulp/core/timeline/include/pulp/timeline/model.hpp