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

Immutable index for visible-note and marquee queries. More...

#include <spatial_index.hpp>

Public Member Functions

 TimePitchIndex (const timeline::MidiContent &content)
std::size_t size () const noexcept
TimePitchQueryResult query (timebase::TickPosition start, timebase::TickPosition end, std::uint8_t lowest_pitch, std::uint8_t highest_pitch) const
 Finds notes intersecting [start, end) within [lowest_pitch, highest_pitch].

Detailed Description

Immutable index for visible-note and marquee queries.

Time ranges are half-open and pitch bounds are inclusive. Results retain the model's canonical (start, id) order. The index augments its start-sorted tree with each subtree's latest end and pitch census, so a long note crossing the query's left edge remains reachable without scanning every earlier note.

Constructor & Destructor Documentation

◆ TimePitchIndex()

pulp::timeline_editor::TimePitchIndex::TimePitchIndex ( const timeline::MidiContent & content)
inlineexplicit

Member Function Documentation

◆ query()

TimePitchQueryResult pulp::timeline_editor::TimePitchIndex::query ( timebase::TickPosition start,
timebase::TickPosition end,
std::uint8_t lowest_pitch,
std::uint8_t highest_pitch ) const
inlinenodiscard

Finds notes intersecting [start, end) within [lowest_pitch, highest_pitch].

◆ size()

std::size_t pulp::timeline_editor::TimePitchIndex::size ( ) const
inlinenodiscardnoexcept

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