Pulp 1.88.0
Cross-platform audio plugin framework
Loading...
Searching...
No Matches
grid_projection.hpp File Reference
#include <pulp/timebase/beat_division.hpp>
#include <pulp/timebase/compiled_meter_map.hpp>
#include <pulp/timebase/compiled_tempo_map.hpp>
#include <cmath>
#include <cstddef>
#include <cstdint>
#include <limits>
#include <span>

Go to the source code of this file.

Classes

struct  pulp::timebase::HostGridAnchor
struct  pulp::timebase::GridProjectionRange
struct  pulp::timebase::GridProjectionRequest
struct  pulp::timebase::GridProjectionPoint
struct  pulp::timebase::GridProjectionResult

Namespaces

namespace  pulp
namespace  pulp::timebase
namespace  pulp::timebase::detail

Enumerations

enum class  pulp::timebase::GridAnchor { pulp::timebase::Timeline , pulp::timebase::Bar }
enum class  pulp::timebase::GridPlacement { pulp::timebase::Floor , pulp::timebase::Nearest }
enum class  pulp::timebase::GridProjectionError {
  pulp::timebase::None , pulp::timebase::InvalidDivision , pulp::timebase::InvalidAnchor , pulp::timebase::InvalidRange ,
  pulp::timebase::SampleRangeExceeded , pulp::timebase::TickRangeExceeded , pulp::timebase::ProjectionLimitExceeded , pulp::timebase::OutputTooSmall
}

Functions

constexpr bool pulp::timebase::detail::checked_grid_add (std::int64_t lhs, std::int64_t rhs, std::int64_t &result) noexcept
constexpr bool pulp::timebase::detail::checked_grid_subtract (std::int64_t lhs, std::int64_t rhs, std::int64_t &result) noexcept
double pulp::timebase::detail::grid_frame_error_budget (double source_tick, double anchor_source_tick, double ticks_per_frame, double frame_delta) noexcept
double pulp::timebase::detail::grid_integral_frame_delta (double frame_delta, double budget, GridPlacement placement=GridPlacement::Floor) noexcept
bool pulp::timebase::detail::checked_grid_add_integral_delta (std::int64_t anchor, double integral_delta, std::int64_t &result) noexcept
constexpr bool pulp::timebase::detail::ceil_grid (std::int64_t value, std::int64_t quantum, std::int64_t &result) noexcept
GridProjectionError pulp::timebase::detail::validate_range (const GridProjectionRange &range) noexcept
bool pulp::timebase::detail::host_mapped_grid_output_offset (const GridProjectionRange &range, TickPosition document_tick, std::uint32_t &output_offset, GridPlacement placement=GridPlacement::Floor) noexcept
std::uint64_t pulp::timebase::detail::grid_candidate_count (std::int64_t start, std::int64_t end, std::int64_t quantum, bool inclusive_end) noexcept
GridProjectionError pulp::timebase::detail::preflight_candidate_bound (const CompiledMeterMap &meter, const GridProjectionRange &range, TickDuration grid, GridAnchor anchor, std::uint64_t &candidates) noexcept
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
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
GridProjectionResult pulp::timebase::project_grid (const CompiledTempoMap &tempo, const CompiledMeterMap &meter, const GridProjectionRequest &request, std::span< const GridProjectionRange > ranges, std::span< GridProjectionPoint > output) noexcept

Variables

constexpr std::size_t pulp::timebase::kMaximumGridProjectionPoints = 65'536
constexpr double pulp::timebase::detail::kGridFrameErrorUlps = 8.0
constexpr double pulp::timebase::detail::kGridMaxSnapFrames = 1.0 / 1024.0