pub struct RillProgram<T: Transcendental> { /* private fields */ }Expand description
A compiled program ready to run inside the rill graph.
Implementations§
Source§impl<T: Transcendental> RillProgram<T>
impl<T: Transcendental> RillProgram<T>
Sourcepub fn new(ir: Ir) -> Self
pub fn new(ir: Ir) -> Self
Create a program from a compiled IR. Allocates state, delays, registers,
and builds the execution schedule. Built-ins are NOT instantiated — use
new_with if the IR references built-in functions.
Sourcepub fn new_with(
ir: Ir,
registry: &Registry<T>,
sample_rate: f32,
) -> Result<Self, CompileError>
pub fn new_with( ir: Ir, registry: &Registry<T>, sample_rate: f32, ) -> Result<Self, CompileError>
Create a program from a compiled Ir, instantiating all built-ins
via the provided Registry. Also sets the initial sample_rate.
Parses builtins from the IR, allocates registers, state, and delays,
and builds the execution schedule. The resulting program implements
Algorithm<T>.
Sourcepub fn param_index(&self, name: &str) -> Option<usize>
pub fn param_index(&self, name: &str) -> Option<usize>
Index of a named parameter, if present.
Sourcepub fn set_param(&mut self, idx: usize, value: ParamValue)
pub fn set_param(&mut self, idx: usize, value: ParamValue)
Set a parameter by index. RT-safe (plain store).
Sourcepub fn param(&self, idx: usize) -> ParamValue
pub fn param(&self, idx: usize) -> ParamValue
Current value of a parameter by index.
Sourcepub fn params_meta(&self) -> &[ParamDef]
pub fn params_meta(&self) -> &[ParamDef]
Metadata for all parameters (name, default, range).
Sourcepub fn process_reference(
&mut self,
input: Option<&[T]>,
output: &mut [T],
) -> ProcessResult<()>
pub fn process_reference( &mut self, input: Option<&[T]>, output: &mut [T], ) -> ProcessResult<()>
Reference implementation: the MVP per-sample interpreter. Used by tests as a numerical oracle; not the production path.