Skip to main content

Crate rill_patchbay

Crate rill_patchbay 

Source
Expand description

§Rill Patchbay — Event routing and automation

rill-patchbay is the evolution of rill-automation from version 0.2.0, merged with the mapping functionality from rill-control.

§Core components

  • Automata — generative signal sources (LFO, envelopes, sequencers)
  • Servos (in the control module) — connect automata to node parameters
  • Mappings — connect external events (MIDI/OSC) to parameters
  • Sensors — event sources from the external world
  • Manager — central coordinator for dual-thread architecture

§Architecture

┌─────────────────────────────────────────────────────────────┐
│                     CONTROL THREAD                         │
│                                                              │
│  ┌─────────────────────────────────────────────────────┐   │
│  │               Manager                         │   │
│  │  ┌────────────┐  ┌────────────┐  ┌────────────┐     │   │
│  │  │  Automata  │  │  Servos    │  │  Mappings  │     │   │
│  │  └────────────┘  └────────────┘  └────────────┘     │   │
│  │                    │                │                │   │
│  │                    ▼                ▼                │   │
│  │              ┌──────────────────────────┐           │   │
│  │              │   RtQueue<ParameterCommand>│         │   │
│  │              └──────────────────────────┘           │   │
│  └─────────────────────────────────────────────────────┘   │
│                              │                               │
│                              │ non-blocking queue              │
│                              ▼                               │
│  ┌─────────────────────────────────────────────────────┐   │
│  │                  AUDIO THREAD                          │   │
│  │              (rill-graph / rill-io)                  │   │
│  └─────────────────────────────────────────────────────┘   │
└─────────────────────────────────────────────────────────────┘

Re-exports§

pub use automaton::EnvelopeAutomaton;
pub use automaton::EnvelopeStage;
pub use automaton::EnvelopeType;
pub use automaton::FunctionAutomaton;
pub use automaton::LfoAutomaton;
pub use automaton::LfoWaveform;
pub use automaton::PlayMode;
pub use automaton::Range;
pub use automaton::SequencerAutomaton;
pub use automaton::StatefulFunctionAutomaton;
pub use automaton::Step;
pub use automaton::SyncMode;
pub use automaton_task::spawn_automaton_task;
pub use engine::midi_cc;
pub use engine::osc_address;
pub use engine::AnyServo;
pub use engine::Automaton;
pub use engine::BoxedServo;
pub use engine::ControlEvent;
pub use engine::EventPattern;
pub use engine::Mapping;
pub use engine::NoAction;
pub use engine::OscSurface;
pub use engine::OscSurfaceEntry;
pub use engine::ParameterMapping;
pub use engine::Patchbay;
pub use engine::Servo;
pub use engine::Target;
pub use engine::Transform;
pub use manager::Manager;
pub use port_combiner::spawn_combiner;
pub use port_combiner::PortCombinerHandle;
pub use strategy::ConflictStrategy;
pub use strategy::ControlStrategy;
pub use strategy::UiCommand;
pub use sequencer::ParameterTarget;
pub use sequencer::Pattern;
pub use sequencer::SequenceStep;
pub use sequencer::SequencerHandle;
pub use sequencer::Snapshot;
pub use sequencer::SnapshotSequencer;
pub use sequencer::StepPlayMode;

Modules§

automaton
Automata — generative control sources Automata — generative control-signal sources.
automaton_task
Automaton wrapper in a green thread (tokio task)
buffer_prelude
Prelude for working with buffers
engine
Control and event mapping Control and automation subsystem.
external
Common third-party types that are frequently used with Rill
f32_prelude
Prelude for working with f32 samples (common case)
f64_prelude
Prelude for working with f64 samples (high precision)
function_registry
Named function registry for serialization
manager
Patchbay manager — central coordinator Patchbay manager — central coordinator (DEPRECATED).
node_prelude
Prelude for working with nodes
param_prelude
Prelude for working with parameters
port_combiner
PortCombiner — combining automaton and UI per port
port_prelude
Prelude for working with ports
prelude
Prelude for convenient import of core types
queue_prelude
Prelude for working with queues (automation)
sensor
Sensors — event sources from the external world
sequencer
Parameter-lock step sequencer
strategy
Automaton control strategies
time_prelude
Prelude for working with time
utils
Utilities and helper functions Utility functions and helpers for the patchbay.

Structs§

ActionContext
Context provided to an Algorithm during processing.
AlgorithmMetadata
Descriptive metadata for an Algorithm implementation.
AtomicCell
Atomic cell with a fully safe API.
AtomicStats
Atomic statistics for safe concurrent access
BufferStats
Buffer statistics snapshot for monitoring and debugging
ClockTick
A tick of the audio clock
DelayLine
Delay line for audio effects — single-threaded circular buffer.
FanInBuffer
Buffer for mixing multiple producers to one consumer. Single-threaded — use rill_core::queues for cross-thread.
FanOutBuffer
Buffer for broadcasting from one producer to multiple consumers. Single-threaded — use rill_core::queues for cross-thread.
NodeId
Unique identifier for a node in the graph
NodeMetadata
Metadata about a node
NodeState
State of a node during processing State of a node during processing
NodeTypeId
Type identifier for a node (for downcasting)
ParamMetadata
Metadata about a parameter
ParamRange
Range constraints for a parameter
ParameterId
Type-safe parameter identifier with validation
Params
A flexible set of parameters passed to a node constructor.
PipeBuffer
Single-producer, single-consumer buffer for intra-graph node connections.
Port
A port on a node.
PortId
Unique identifier for a port within a graph
RingBuffer
Fixed-size ring buffer (power-of-two size). Single-threaded.
RtQueue
Main RT-safe queue
ScalarVector1
Scalar vector of 1 element
ScalarVector2
Scalar vector of 2 elements
ScalarVector4
Scalar vector of 4 elements
ScalarVector8
Scalar vector of 8 elements
SystemClock
High-precision system clock for sample-accurate timing.
TelemetryBlock
Fixed-size telemetry frame for RT-safe ring buffer communication.

Enums§

AlgorithmCategory
Functional category of an algorithm (for introspection / UI).
AtomicCellError
Errors that can occur when creating an AtomicCell.
BufferError
Buffer error types
ConnectionError
Errors that can occur during graph connections
NodeCategory
Category of a node (for UI/organization)
ParamType
Type of parameter value
ParamValue
Parameter value (can be of different types)
ParameterError
Errors that can occur during parameter operations
PortDirection
Direction of a port (input or output)
PortError
Errors that can occur during port operations
PortType
Type of a port - what kind of signal it carries
ProcessError
Main error type for signal processing operations
QueueError
Errors that can occur during queue operations.
TimeError
Errors that can occur during time and clock operations

Constants§

CACHE_LINE_SIZE
Cache line size for alignment (64 bytes on x86_64)
DEFAULT_BLOCK_SIZE
Default block size for signal processing
DEFAULT_BUFFER_SIZE
Default buffer size for most use cases
DEFAULT_SAMPLE_RATE
Default sample rate (44.1 kHz)
MAX_BLOCK_SIZE
Maximum block size
MAX_BUFFER_SIZE
Maximum buffer size (2^16 = 65536 samples)
MAX_SAMPLE_RATE
Maximum supported sample rate
MIN_BLOCK_SIZE
Minimum block size
MIN_BUFFER_SIZE
Minimum buffer size
MIN_SAMPLE_RATE
Minimum supported sample rate
VERSION
Current version of rill-core

Traits§

Action
Unified processing primitive for ports and DSP blocks.
Algorithm
Unified processing primitive for ports and DSP blocks.
Buffer
Common interface for all buffer types used in the signal graph.
ClockSource
A source of clock ticks for signal processing
Interpolate
Fractional-index reading with interpolation.
IntoParamValue
Trait for types that can be converted to/from ParamValue
Node
Base trait for all audio nodes
Processor
Passive processor of signals
Sink
Active sink of signals
Source
Active source of signals
Transcendental
Transcendental operations (sin, cos, sqrt, exp, ln).
Vector
Core trait for vector types (basic operations).
VectorMask
Vector comparison and masking operations.
VectorReduce
Horizontal reduction operations (vector → scalar).
VectorScalarOps
Scalar-vector arithmetic operations.
VectorTranscendental
Trait for vector types with transcendental operations.

Functions§

abs_slice
Element-wise absolute value of a slice
add_scalar_slice
Add a scalar to a slice
add_slices
Element-wise addition of two slices, storing the result in a third
clamp_slice
Element-wise clamp of a slice
cos_slice
Element-wise cosine of a slice
div_slices
Element-wise division of two slices
exp_slice
Element-wise exponent of a slice
ln_slice
Element-wise natural logarithm of a slice
max_slice
Element-wise maximum of two slices
min_slice
Element-wise minimum of two slices
mul_scalar_slice
Multiply a slice by a scalar
mul_slices
Element-wise multiplication of two slices
sin_slice
Element-wise sine of a slice
sqrt_slice
Element-wise square root of a slice
sub_slices
Element-wise subtraction of two slices
tan_slice
Element-wise tangent of a slice

Type Aliases§

BufferResult
Result type for buffer operations
ConnectionResult
Result type for connection operations
ControlValue
Control signal value type
DefaultClock
Default system clock
DefaultDelayLine
Default delay line with f32 samples
DefaultPipeBuffer
Default pipe buffer with f32 samples
DefaultRingBuffer
Default ring buffer with f32 samples
MonoBlock
Mono signal block type
ParameterResult
Result type for parameter operations
PortResult
Result type for port operations
ProcessResult
Result type for signal processing operations
QueueResult
Result type alias for queue operations.
Sample
Default sample type (32-bit float)
StereoBlock
Stereo signal block type (left, right)
TimeResult
Result type for time operations