Pulp 1.88.0
Cross-platform audio plugin framework
Loading...
Searching...
No Matches
chord_pattern_renderer.hpp
Go to the documentation of this file.
1#pragma once
2
5
6#include <cstddef>
7#include <cstdint>
8#include <memory>
9#include <optional>
10
11namespace pulp::playback {
12
13inline constexpr const char* kChordPatternContentType = "pulp.playback.chord_pattern";
14inline constexpr std::uint32_t kChordPatternContentSchemaVersion = 1;
15inline constexpr std::size_t kMaximumChordPatternNotes = 4096;
16
20 std::uint64_t seed = 0;
23 std::int8_t octave = 4;
24 std::uint16_t velocity = 0xffff;
25
26 constexpr auto operator<=>(const ChordPatternContent&) const = default;
27};
28
32
36 const timeline::SchemaRegistry& schemas,
37 std::size_t maximum_json_bytes = 1024);
38
40std::optional<ContextRegistrationError>
42 const timeline::SchemaRegistry& schemas);
43
44} // namespace pulp::playback
The declaration side of the compile-context subscription contract.
Definition compile_context_registry.hpp:148
Result<T, E> — either holds a T or an E, never both.
Definition result.hpp:76
Mutable, single-owner accumulator for constructing a SchemaRegistry.
Definition schema_registry.hpp:243
Immutable, shareable registry of Timeline schema contracts.
Definition schema_registry.hpp:189
Definition audio_renderer.hpp:20
runtime::Result< timeline::RegisteredContent, timeline::PersistenceError > create_chord_pattern_content(const ChordPatternContent &content, const timeline::SchemaRegistry &schemas, std::size_t maximum_json_bytes=1024)
Creates schema-backed chord-pattern content after strict payload validation.
constexpr std::uint32_t kChordPatternContentSchemaVersion
Definition chord_pattern_renderer.hpp:14
constexpr const char * kChordPatternContentType
Definition chord_pattern_renderer.hpp:13
std::optional< ContextRegistrationError > declare_chord_pattern_renderer(CompileContextRegistry &registry, const timeline::SchemaRegistry &schemas)
Declares the trusted deterministic note compiler and its ChordScale read.
constexpr std::size_t kMaximumChordPatternNotes
Definition chord_pattern_renderer.hpp:15
runtime::Result< timeline::SchemaRegistration, timeline::SchemaError > register_chord_pattern_content_schema(timeline::SchemaRegistryBuilder &builder)
Registers the exact versioned Content schema and codec.
Immutable authored settings for the deterministic chord-pattern compiler.
Definition chord_pattern_renderer.hpp:19
timebase::TickDuration gate
Definition chord_pattern_renderer.hpp:22
timebase::TickDuration step
Definition chord_pattern_renderer.hpp:21
std::uint16_t velocity
Definition chord_pattern_renderer.hpp:24
constexpr auto operator<=>(const ChordPatternContent &) const =default
std::int8_t octave
Definition chord_pattern_renderer.hpp:23
std::uint64_t seed
Definition chord_pattern_renderer.hpp:20
Definition tick.hpp:56