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
controlmodule) — 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 │
│ ▼ │
│ ┌─────────────────────────────────────────────────────┐ │
│ │ SIGNAL THREAD │ │
│ │ (rill-graph / rill-io) │ │
│ └─────────────────────────────────────────────────────┘ │
└─────────────────────────────────────────────────────────────┘Re-exports§
pub use sensor::Sensor;pub use automaton::sequencer::PlayMode;pub use automaton::sequencer::SequencerAutomaton;pub use automaton::sequencer::Step;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::Range;pub use automaton::StatefulFunctionAutomaton;pub use automaton::SyncMode;pub use automaton_task::spawn_automaton_task;pub use engine::midi_cc;pub use engine::midi_note;pub use engine::osc_address;pub use engine::Automaton;pub use engine::BoxedModule;pub use engine::ControlEvent;pub use engine::EventPattern;pub use engine::Mapping;pub use engine::MidiNoteKind;pub use engine::Module;pub use engine::NoAction;pub use engine::OscSurface;pub use engine::OscSurfaceEntry;pub use engine::ParameterMapping;pub use engine::Servo;pub use engine::Target;pub use engine::Transform;pub use strategy::ConflictStrategy;pub use strategy::ControlStrategy;
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
- module_
def - Rack module type definitions (always compiled) Rack module type definitions.
- module_
factory - Custom module factory — type registry for rack module construction Module factory — type-registry for modular rack module construction.
- node_
prelude - Prelude for working with nodes
- observer
- Micro-control observer for RT safety monitoring Micro-control observer — RT safety monitor with actor-based telemetry.
- param_
prelude - Prelude for working with parameters
- 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
- servo_
constructor - Servo constructor — creates servo actors from ModuleDef descriptors
ServoConstructor — creates Servo actors from [
ModuleDef::Servo] descriptors. - strategy
- Automaton control strategies
- time_
prelude - Prelude for working with time
- utils
- Utilities and helper functions Utility functions and helpers for the patchbay.
Structs§
- Action
Context - Context provided to an
Algorithmduring processing. - Algorithm
Metadata - Descriptive metadata for an
Algorithmimplementation. - Atomic
Cell - Atomic cell with a fully safe API.
- Atomic
Stats - Atomic statistics for safe concurrent access
- Buffer
Stats - Buffer statistics snapshot for monitoring and debugging
- Clock
Tick - A tick of the system clock
- Delay
Line - Delay line for signal effects — single-threaded circular buffer.
- FanIn
Buffer - Buffer for mixing multiple producers to one consumer.
Single-threaded — use
rill_core::queuesfor cross-thread. - FanOut
Buffer - Buffer for broadcasting from one producer to multiple consumers.
Single-threaded — use
rill_core::queuesfor cross-thread. - NodeId
- Unique identifier for a node in the graph
- Node
Metadata - Metadata about a node
- Node
State - State of a node during processing State of a node during processing
- Node
Type Id - Type identifier for a node (for downcasting)
- Param
Metadata - Metadata about a parameter
- Param
Range - Range constraints for a parameter
- Parameter
Id - Type-safe parameter identifier with validation
- Params
- A flexible set of parameters passed to a node constructor.
- Pipe
Buffer - 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
- Ring
Buffer - Fixed-size ring buffer (power-of-two size). Single-threaded.
- RtQueue
- Main RT-safe queue
- Scalar
Vector1 - Scalar vector of 1 element
- Scalar
Vector2 - Scalar vector of 2 elements
- Scalar
Vector4 - Scalar vector of 4 elements
- Scalar
Vector8 - Scalar vector of 8 elements
- System
Clock - High-precision system clock for sample-accurate timing.
- Telemetry
Block - Fixed-size telemetry frame for RT-safe ring buffer communication.
Enums§
- Algorithm
Category - Functional category of an algorithm (for introspection / UI).
- Atomic
Cell Error - Errors that can occur when creating an
AtomicCell. - Buffer
Error - Buffer error types
- Connection
Error - Errors that can occur during graph connections
- Node
Category - Category of a node (for UI/organization)
- Param
Type - Type of parameter value
- Param
Value - Parameter value (can be of different types)
- Parameter
Error - Errors that can occur during parameter operations
- Port
Direction - Direction of a port (input or output)
- Port
Error - Errors that can occur during port operations
- Port
Type - Type of a port - what kind of signal it carries
- Process
Error - Main error type for signal processing operations
- Queue
Error - Errors that can occur during queue operations.
- Time
Error - 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.
- Clock
Source - A source of clock ticks for signal processing
- Interpolate
- Fractional-index reading with interpolation.
- Into
Param Value - Trait for types that can be converted to/from
ParamValue - Node
- Base trait for all signal 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).
- Vector
Mask - Vector comparison and masking operations.
- Vector
Reduce - Horizontal reduction operations (vector → scalar).
- Vector
Scalar Ops - Scalar-vector arithmetic operations.
- Vector
Transcendental - 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§
- Buffer
Result - Result type for buffer operations
- Connection
Result - Result type for connection operations
- Control
Value - Control signal value type
- Default
Clock - Default system clock
- Default
Delay Line - Default delay line with f32 samples
- Default
Pipe Buffer - Default pipe buffer with f32 samples
- Default
Ring Buffer - Default ring buffer with f32 samples
- Mono
Block - Mono signal block type
- Parameter
Result - Result type for parameter operations
- Port
Result - Result type for port operations
- Process
Result - Result type for signal processing operations
- Queue
Result - Result type alias for queue operations.
- Sample
- Default sample type (32-bit float)
- Stereo
Block - Stereo signal block type (left, right)
- Time
Result - Result type for time operations