Pulp 1.88.0
Cross-platform audio plugin framework
Loading...
Searching...
No Matches
timeline_device_resolver.hpp
Go to the documentation of this file.
1#pragma once
2
3#include <cstddef>
4#include <cstdint>
5#include <memory>
6#include <span>
7#include <string_view>
8
9namespace pulp::host {
10
11class PluginSlot;
12struct PluginInfo;
13
15inline constexpr std::string_view kBasicInstrumentBindingKey = "pulp.instrument.basic";
16
18inline constexpr std::string_view kEventHumaniserBindingKey = "pulp.device.event.humanise";
19
27inline constexpr int kEventHumaniserWindowSamples = 512;
28
32inline constexpr std::uint32_t kEventHumaniserTimingDepthParamId = 1;
33inline constexpr std::uint32_t kEventHumaniserVelocityDepthParamId = 2;
34
41inline constexpr std::size_t kAdmittedDeviceChainLength = 2;
42
48
53 std::string_view binding_key;
54 std::string_view display_name;
55 std::string_view manufacturer;
56 std::string_view category;
57 std::string_view summary;
62 bool is_instrument = false;
63};
64
67std::span<const BuiltInDeviceDescriptor> builtin_device_catalog() noexcept;
68
70const BuiltInDeviceDescriptor* find_builtin_device(std::string_view binding_key) noexcept;
71
73using TimelineDeviceSlotFactory = std::unique_ptr<PluginSlot> (*)(const PluginInfo&);
74
76std::unique_ptr<PluginSlot> load_builtin_plugin(const PluginInfo& info);
77
83
88
89} // namespace pulp::host
Definition plugin_slot.hpp:94
Bounded event contracts shared by host ingress and graph-authored nodes.
Definition anticipation_eligibility.hpp:9
constexpr int kEventHumaniserWindowSamples
The humaniser's look-ahead window, in samples, and therefore the latency it reports.
Definition timeline_device_resolver.hpp:27
constexpr std::string_view kBasicInstrumentBindingKey
Durable Timeline binding key for Pulp's pathless basic instrument.
Definition timeline_device_resolver.hpp:15
constexpr std::string_view kEventHumaniserBindingKey
Durable Timeline binding key for Pulp's pathless look-ahead note humaniser.
Definition timeline_device_resolver.hpp:18
std::span< const BuiltInDeviceDescriptor > builtin_device_catalog() noexcept
Every device load_builtin_plugin can instantiate, in chain order: an event-to-event device may preced...
constexpr std::uint32_t kEventHumaniserVelocityDepthParamId
Definition timeline_device_resolver.hpp:33
std::unique_ptr< PluginSlot >(*)(const PluginInfo &) TimelineDeviceSlotFactory
Factory signature used by Timeline's disposable graph-lowering transaction.
Definition timeline_device_resolver.hpp:73
BuiltInDeviceDomain
The domain a built-in Timeline device occupies in a track's device chain.
Definition timeline_device_resolver.hpp:47
@ EventToEvent
Definition timeline_device_resolver.hpp:47
@ EventToAudio
Definition timeline_device_resolver.hpp:47
std::unique_ptr< PluginSlot > load_builtin_plugin(const PluginInfo &info)
Loads a pathless Pulp-owned device. Unknown keys and non-empty paths fail closed.
const BuiltInDeviceDescriptor * find_builtin_device(std::string_view binding_key) noexcept
The descriptor for binding_key, or nullptr when no built-in owns it.
constexpr std::size_t kAdmittedDeviceChainLength
The longest device chain the host binding lowers today.
Definition timeline_device_resolver.hpp:41
int event_device_latency_ceiling_samples() noexcept
The per-chain event-compensation ceiling, in samples.
PluginInfo builtin_device_plugin_info(const BuiltInDeviceDescriptor &descriptor)
The PluginInfo the host uses to instantiate descriptor through the device factory.
constexpr std::uint32_t kEventHumaniserTimingDepthParamId
Stable parameter IDs exposed by the built-in humaniser.
Definition timeline_device_resolver.hpp:32
STL namespace.
One instantiable Pulp-owned device.
Definition timeline_device_resolver.hpp:52
bool is_instrument
Definition timeline_device_resolver.hpp:62
std::string_view summary
Definition timeline_device_resolver.hpp:57
std::string_view display_name
Definition timeline_device_resolver.hpp:54
int latency_samples
Definition timeline_device_resolver.hpp:61
int num_audio_inputs
Definition timeline_device_resolver.hpp:59
std::string_view binding_key
Definition timeline_device_resolver.hpp:53
BuiltInDeviceDomain domain
Definition timeline_device_resolver.hpp:58
int num_audio_outputs
Definition timeline_device_resolver.hpp:60
std::string_view category
Definition timeline_device_resolver.hpp:56
std::string_view manufacturer
Definition timeline_device_resolver.hpp:55
Definition scanner.hpp:35