Pulp 1.88.0
Cross-platform audio plugin framework
Loading...
Searching...
No Matches
pulp::timebase::detail Namespace Reference

Classes

class  RatchetSubdivisionCursor

Functions

constexpr std::uint64_t mix_coordinate (std::uint64_t value) noexcept
constexpr std::uint64_t multiply_high (std::uint64_t lhs, std::uint64_t rhs) noexcept
constexpr bool checked_grid_add (std::int64_t lhs, std::int64_t rhs, std::int64_t &result) noexcept
constexpr bool checked_grid_subtract (std::int64_t lhs, std::int64_t rhs, std::int64_t &result) noexcept
double grid_frame_error_budget (double source_tick, double anchor_source_tick, double ticks_per_frame, double frame_delta) noexcept
double grid_integral_frame_delta (double frame_delta, double budget, GridPlacement placement=GridPlacement::Floor) noexcept
bool checked_grid_add_integral_delta (std::int64_t anchor, double integral_delta, std::int64_t &result) noexcept
constexpr bool ceil_grid (std::int64_t value, std::int64_t quantum, std::int64_t &result) noexcept
GridProjectionError validate_range (const GridProjectionRange &range) noexcept
bool host_mapped_grid_output_offset (const GridProjectionRange &range, TickPosition document_tick, std::uint32_t &output_offset, GridPlacement placement=GridPlacement::Floor) noexcept
std::uint64_t grid_candidate_count (std::int64_t start, std::int64_t end, std::int64_t quantum, bool inclusive_end) noexcept
GridProjectionError preflight_candidate_bound (const CompiledMeterMap &meter, const GridProjectionRange &range, TickDuration grid, GridAnchor anchor, std::uint64_t &candidates) noexcept
template<typename Emit>
GridProjectionError enumerate_range (const CompiledTempoMap &tempo, const CompiledMeterMap &meter, const GridProjectionRange &range, TickDuration grid, GridAnchor anchor, GridPlacement placement, Emit &&emit) noexcept
template<typename Emit>
GridProjectionError enumerate_ranges (const CompiledTempoMap &tempo, const CompiledMeterMap &meter, std::span< const GridProjectionRange > ranges, TickDuration grid, GridAnchor anchor, GridPlacement placement, Emit &&emit) noexcept
constexpr std::int64_t floor_div (std::int64_t numerator, std::int64_t denominator) noexcept
constexpr std::int64_t rounded_scale (std::int64_t value, std::int64_t multiplier, std::int64_t divisor) noexcept
constexpr std::int64_t swing_pivot (std::int64_t pair, SwingRatio ratio) noexcept
constexpr std::uint64_t ordered_tick_coordinate (TickPosition position) noexcept
constexpr TickPosition tick_from_ordered_coordinate (std::uint64_t coordinate) noexcept
constexpr std::int64_t saturating_add (std::int64_t lhs, std::int64_t rhs) noexcept
constexpr std::int64_t saturating_subtract (std::int64_t lhs, std::int64_t rhs) noexcept
constexpr std::int64_t saturating_multiply (std::int64_t lhs, std::int64_t rhs) noexcept

Variables

constexpr BeatFraction kBeatDivisionFractions []
constexpr double kGridFrameErrorUlps = 8.0
constexpr double kGridMaxSnapFrames = 1.0 / 1024.0
constexpr std::uint64_t kSignedTickOrderBit = std::uint64_t{1} << 63U

Function Documentation

◆ ceil_grid()

bool pulp::timebase::detail::ceil_grid ( std::int64_t value,
std::int64_t quantum,
std::int64_t & result )
constexprnoexcept

◆ checked_grid_add()

bool pulp::timebase::detail::checked_grid_add ( std::int64_t lhs,
std::int64_t rhs,
std::int64_t & result )
constexprnoexcept

◆ checked_grid_add_integral_delta()

bool pulp::timebase::detail::checked_grid_add_integral_delta ( std::int64_t anchor,
double integral_delta,
std::int64_t & result )
inlinenoexcept

◆ checked_grid_subtract()

bool pulp::timebase::detail::checked_grid_subtract ( std::int64_t lhs,
std::int64_t rhs,
std::int64_t & result )
constexprnoexcept

◆ enumerate_range()

template<typename Emit>
GridProjectionError pulp::timebase::detail::enumerate_range ( const CompiledTempoMap & tempo,
const CompiledMeterMap & meter,
const GridProjectionRange & range,
TickDuration grid,
GridAnchor anchor,
GridPlacement placement,
Emit && emit )
noexcept

◆ enumerate_ranges()

template<typename Emit>
GridProjectionError pulp::timebase::detail::enumerate_ranges ( const CompiledTempoMap & tempo,
const CompiledMeterMap & meter,
std::span< const GridProjectionRange > ranges,
TickDuration grid,
GridAnchor anchor,
GridPlacement placement,
Emit && emit )
noexcept

◆ floor_div()

std::int64_t pulp::timebase::detail::floor_div ( std::int64_t numerator,
std::int64_t denominator )
constexprnoexcept

◆ grid_candidate_count()

std::uint64_t pulp::timebase::detail::grid_candidate_count ( std::int64_t start,
std::int64_t end,
std::int64_t quantum,
bool inclusive_end )
inlinenoexcept

◆ grid_frame_error_budget()

double pulp::timebase::detail::grid_frame_error_budget ( double source_tick,
double anchor_source_tick,
double ticks_per_frame,
double frame_delta )
inlinenoexcept

◆ grid_integral_frame_delta()

double pulp::timebase::detail::grid_integral_frame_delta ( double frame_delta,
double budget,
GridPlacement placement = GridPlacement::Floor )
inlinenoexcept

◆ host_mapped_grid_output_offset()

bool pulp::timebase::detail::host_mapped_grid_output_offset ( const GridProjectionRange & range,
TickPosition document_tick,
std::uint32_t & output_offset,
GridPlacement placement = GridPlacement::Floor )
inlinenoexcept

◆ mix_coordinate()

std::uint64_t pulp::timebase::detail::mix_coordinate ( std::uint64_t value)
constexprnoexcept

◆ multiply_high()

std::uint64_t pulp::timebase::detail::multiply_high ( std::uint64_t lhs,
std::uint64_t rhs )
constexprnoexcept

◆ ordered_tick_coordinate()

std::uint64_t pulp::timebase::detail::ordered_tick_coordinate ( TickPosition position)
constexprnoexcept

◆ preflight_candidate_bound()

GridProjectionError pulp::timebase::detail::preflight_candidate_bound ( const CompiledMeterMap & meter,
const GridProjectionRange & range,
TickDuration grid,
GridAnchor anchor,
std::uint64_t & candidates )
inlinenoexcept

◆ rounded_scale()

std::int64_t pulp::timebase::detail::rounded_scale ( std::int64_t value,
std::int64_t multiplier,
std::int64_t divisor )
constexprnoexcept

◆ saturating_add()

std::int64_t pulp::timebase::detail::saturating_add ( std::int64_t lhs,
std::int64_t rhs )
constexprnoexcept

◆ saturating_multiply()

std::int64_t pulp::timebase::detail::saturating_multiply ( std::int64_t lhs,
std::int64_t rhs )
constexprnoexcept

◆ saturating_subtract()

std::int64_t pulp::timebase::detail::saturating_subtract ( std::int64_t lhs,
std::int64_t rhs )
constexprnoexcept

◆ swing_pivot()

std::int64_t pulp::timebase::detail::swing_pivot ( std::int64_t pair,
SwingRatio ratio )
constexprnoexcept

◆ tick_from_ordered_coordinate()

TickPosition pulp::timebase::detail::tick_from_ordered_coordinate ( std::uint64_t coordinate)
constexprnoexcept

◆ validate_range()

GridProjectionError pulp::timebase::detail::validate_range ( const GridProjectionRange & range)
inlinenoexcept

Variable Documentation

◆ kBeatDivisionFractions

BeatFraction pulp::timebase::detail::kBeatDivisionFractions[]
inlineconstexpr
Initial value:
= {
{4, 1}, {6, 1}, {8, 3}, {2, 1}, {3, 1}, {4, 3}, {1, 1}, {3, 2}, {2, 3}, {1, 2}, {3, 4},
{1, 3}, {1, 4}, {3, 8}, {1, 6}, {1, 8}, {3, 16}, {1, 12}, {1, 16}, {3, 32}, {1, 24},
}

◆ kGridFrameErrorUlps

double pulp::timebase::detail::kGridFrameErrorUlps = 8.0
inlineconstexpr

◆ kGridMaxSnapFrames

double pulp::timebase::detail::kGridMaxSnapFrames = 1.0 / 1024.0
inlineconstexpr

◆ kSignedTickOrderBit

std::uint64_t pulp::timebase::detail::kSignedTickOrderBit = std::uint64_t{1} << 63U
inlineconstexpr