Pulp 1.88.0
Cross-platform audio plugin framework
Loading...
Searching...
No Matches
note_modifier.hpp File Reference
#include <pulp/timeline/item_id.hpp>
#include <compare>
#include <cstdint>
#include <string_view>

Go to the source code of this file.

Classes

struct  pulp::timeline::NoteModifier
 Sparse playback modifier attached to one note identity. More...
struct  pulp::timeline::NoteModifierDraw
 One deterministic probability draw for a note key and loop pass. More...

Namespaces

namespace  pulp
namespace  pulp::timeline

Enumerations

enum class  pulp::timeline::NoteConditionKind : std::uint8_t { pulp::timeline::NoteConditionKind::Always , pulp::timeline::NoteConditionKind::EveryNth , pulp::timeline::NoteConditionKind::First , pulp::timeline::NoteConditionKind::Fill }
 Pass-relative condition controlling when a note may sound. More...

Functions

constexpr std::uint64_t pulp::timeline::note_modifier_mix (std::uint64_t value) noexcept
 Mixes one 64-bit value with the stable note-modifier avalanche function.
constexpr std::string_view pulp::timeline::note_condition_name (NoteConditionKind condition) noexcept
 Returns the canonical persisted spelling of condition.
constexpr bool pulp::timeline::parse_note_condition (std::string_view name, NoteConditionKind &out) noexcept
 Parses a canonical condition name into out.
constexpr bool pulp::timeline::note_modifier_is_neutral (const NoteModifier &modifier) noexcept
 Returns whether modifier encodes unconditional, single-play behavior.
constexpr bool pulp::timeline::note_modifier_well_formed (const NoteModifier &modifier) noexcept
 Checks structural validity independently of whether the note identity exists.
constexpr std::uint64_t pulp::timeline::note_modifier_draw_key (std::uint64_t seed, ItemId note_id) noexcept
 Derives the deterministic draw key for one authored seed and note identity.
constexpr bool pulp::timeline::note_probability_sounds (std::uint16_t probability, NoteModifierDraw draw) noexcept
 Tests an authored probability against draw.
constexpr bool pulp::timeline::note_condition_holds (NoteConditionKind condition, std::uint16_t period, std::uint16_t offset, std::uint64_t pass_index) noexcept
 Returns whether a pass-relative condition admits pass_index.
constexpr bool pulp::timeline::note_modifier_sounds (const NoteModifier &modifier, std::uint64_t draw_key, std::uint64_t pass_index) noexcept
 Applies both the modifier's condition and deterministic probability gate.

Variables

constexpr std::uint16_t pulp::timeline::note_probability_certain = 0xffffu
 Denominator and exact "always sounds" value for authored note probability.
constexpr std::uint16_t pulp::timeline::note_ratchet_maximum = 64u
 Largest admitted authored retrigger count.