Pulp 1.88.0
Cross-platform audio plugin framework
Loading...
Searching...
No Matches
sequencer_state_channel.hpp File Reference
#include <array>
#include <atomic>
#include <cstdint>
#include <optional>
#include <type_traits>
#include <pulp/runtime/seqlock.hpp>
#include <pulp/runtime/spsc_queue.hpp>
#include <pulp/runtime/triple_buffer.hpp>

Go to the source code of this file.

Classes

struct  pulp::state::StepCell
 One step in one lane. More...
struct  pulp::state::PlayheadState
 Volatile, high-rate transport/playhead state. More...
struct  pulp::state::SequencerConfig< Lanes, Steps, Patterns, Cell, Playhead, CommandDepth, AppliedDepth >
 Lanes/Steps/Patterns are MAXIMUM CAPACITY (active extent lives in the Snapshot). More...
struct  pulp::state::DirtyRegion
struct  pulp::state::SetCellEditT< Config >
 SetCell carries a full cell by value, so it is templated on the Config's cell type. More...
struct  pulp::state::ClearEdit
struct  pulp::state::RandomizeLaneEdit
struct  pulp::state::SetPatternLengthEdit
struct  pulp::state::SwitchPatternEdit
struct  pulp::state::StepEditCommandT< Config >
union  pulp::state::StepEditCommandT< Config >::Payload
struct  pulp::state::PatternStateT< Config >
struct  pulp::state::SnapshotT< Config >
 The full non-param state, published for bulk replacement / resync only. More...
struct  pulp::state::StepRangeAppliedT< Config >
 The exact cells the engine wrote for a step-range edit. More...
struct  pulp::state::AppliedEditT< Config >
union  pulp::state::AppliedEditT< Config >::Payload
class  pulp::state::SequencerStateChannelT< Config >
 Ownership: the engine (audio) thread is the single reader of the command queue and the single writer of the applied queue / snapshot / playhead. More...

Namespaces

namespace  pulp
namespace  pulp::state
 SequencerStateChannel is the audio-safe transport for a plugin's structured NON-parameter state: the bulk, observable state a step sequencer / mod-matrix / pattern engine holds outside its automatable parameter set (e.g.

Typedefs

using pulp::state::Epoch = std::uint64_t
using pulp::state::EngineSequence = std::uint64_t
using pulp::state::ClientSequence = std::uint64_t
using pulp::state::EditTransactionId = std::uint32_t
using pulp::state::ReferenceSequencerConfig
 The canonical way to name the transport types is via the channel's member typedefs (e.g.
using pulp::state::SequencerStateChannel = SequencerStateChannelT<ReferenceSequencerConfig>
using pulp::state::Snapshot = SnapshotT<ReferenceSequencerConfig>
using pulp::state::PatternState = PatternStateT<ReferenceSequencerConfig>
using pulp::state::StepEditCommand = StepEditCommandT<ReferenceSequencerConfig>
using pulp::state::AppliedEdit = AppliedEditT<ReferenceSequencerConfig>
using pulp::state::StepRangeApplied = StepRangeAppliedT<ReferenceSequencerConfig>
using pulp::state::SetCellEdit = SetCellEditT<ReferenceSequencerConfig>

Enumerations

enum class  pulp::state::DirtyKind : std::uint8_t {
  pulp::state::None , pulp::state::FullSnapshot , pulp::state::Pattern , pulp::state::Lane ,
  pulp::state::StepRange , pulp::state::Cell
}
enum class  pulp::state::StepEditKind : std::uint8_t {
  pulp::state::SetCell , pulp::state::Clear , pulp::state::RandomizeLane , pulp::state::SetPatternLength ,
  pulp::state::SwitchPattern
}
enum class  pulp::state::ClearScope : std::uint8_t { pulp::state::Cell , pulp::state::Lane , pulp::state::Pattern , pulp::state::All }
enum class  pulp::state::GesturePhase : std::uint8_t {
  pulp::state::None , pulp::state::Begin , pulp::state::Update , pulp::state::End ,
  pulp::state::Cancel
}
 Host-undo gesture bracketing hint. More...
enum class  pulp::state::AppliedEditKind : std::uint8_t { pulp::state::StepRangeChanged , pulp::state::PatternLengthChanged , pulp::state::ActivePatternChanged , pulp::state::CommandRejected }

Variables

constexpr std::uint8_t pulp::state::kPatternCount = 32
constexpr std::uint8_t pulp::state::kLaneCount = 12
constexpr std::uint8_t pulp::state::kStepCount = 32
constexpr std::size_t pulp::state::kCommandQueueCapacity = 1024
constexpr std::size_t pulp::state::kAppliedQueueCapacity = 1024