dowdiness/moondsp/graph does not have a README file
pub trait GraphControllable {
fn apply_control(Self, GraphControl) -> Result[Unit, GraphControlError]
fn apply_controls(Self, Array[GraphControl]) -> Result[Unit, GraphControlError]
}pub(open) trait GraphDebuggable {
fn enable_debug_validation(Self) -> Unit
fn disable_debug_validation(Self) -> Unit
fn last_validation_errors(Self) -> Array[GraphValidationError]
}pub(open) trait NodeEditable : NodeSpanning + NodeFoldable {
fn can_insert_after(Self) -> Bool
fn can_delete(Self) -> Bool
}pub(open) trait NodeFoldable : NodeSpanning {
fn is_foldable(Self) -> Bool
fn fold_value(Self, Double, Double) -> Double
}pub(open) trait NodeSpanning {
fn signal_shape(Self) -> Int
}pub(all) suberror GraphTemplateDocError {
LengthMismatch(Int, Int)
DuplicateNodeId(String)
MissingNodeId(String)
RetiredNodeId(String)
Topology(GraphTopologyEditError)
} derive(Debug)impl Show for GraphTemplateDocErrortype CompiledDspimpl GraphControllable for CompiledDspfn apply_controls(self : CompiledDsp, controls : Array[GraphControl]) -> Result[Unit, GraphControlError]impl GraphDebuggable for CompiledDspfn CompiledDsp::apply_control(self : CompiledDsp, control : GraphControl) -> Result[Unit, GraphControlError]fn CompiledDsp::apply_controls(self : CompiledDsp, controls : Array[GraphControl]) -> Result[Unit, GraphControlError]fn CompiledDsp::set_param(self : CompiledDsp, node_index : Int, slot : GraphParamSlot, value : Double) -> Result[Unit, GraphControlError]fn CompiledDsp::validate_controls(self : CompiledDsp, controls : Array[GraphControl]) -> Result[Unit, GraphControlError]type CompiledDspHotSwapimpl GraphControllable for CompiledDspHotSwapfn apply_control(self : CompiledDspHotSwap, control : GraphControl) -> Result[Unit, GraphControlError]fn apply_controls(self : CompiledDspHotSwap, controls : Array[GraphControl]) -> Result[Unit, GraphControlError]fn CompiledDspHotSwap::apply_control(self : CompiledDspHotSwap, control : GraphControl) -> Result[Unit, GraphControlError]fn CompiledDspHotSwap::apply_controls(self : CompiledDspHotSwap, controls : Array[GraphControl]) -> Result[Unit, GraphControlError]fn CompiledDspHotSwap::from_graph(active : CompiledDsp, crossfade_samples? : Int) -> CompiledDspHotSwapfn CompiledDspHotSwap::gate_off(self : CompiledDspHotSwap, node_index : Int) -> Result[Unit, GraphControlError]fn CompiledDspHotSwap::gate_on(self : CompiledDspHotSwap, node_index : Int) -> Result[Unit, GraphControlError]fn CompiledDspHotSwap::process(self : CompiledDspHotSwap, context : DspContext, output : AudioBuffer) -> Unitfn CompiledDspHotSwap::queue_swap(self : CompiledDspHotSwap, next : CompiledDsp) -> Result[Unit, HotSwapQueueError]fn CompiledDspHotSwap::set_param(self : CompiledDspHotSwap, node_index : Int, slot : GraphParamSlot, value : Double) -> Result[Unit, GraphControlError]type CompiledDspTopologyControllerfn apply_control(self : CompiledDspTopologyController, control : GraphControl) -> Result[Unit, GraphControlError]fn apply_controls(self : CompiledDspTopologyController, controls : Array[GraphControl]) -> Result[Unit, GraphControlError]fn CompiledDspTopologyController::apply_control(self : CompiledDspTopologyController, control : GraphControl) -> Result[Unit, GraphControlError]fn CompiledDspTopologyController::apply_controls(self : CompiledDspTopologyController, controls : Array[GraphControl]) -> Result[Unit, GraphControlError]fn CompiledDspTopologyController::from_nodes(nodes : Array[DspNode], context : DspContext, crossfade_samples? : Int) -> CompiledDspTopologyController?fn CompiledDspTopologyController::gate_off(self : CompiledDspTopologyController, node_index : Int) -> Result[Unit, GraphControlError]fn CompiledDspTopologyController::gate_on(self : CompiledDspTopologyController, node_index : Int) -> Result[Unit, GraphControlError]fn CompiledDspTopologyController::process(self : CompiledDspTopologyController, context : DspContext, output : AudioBuffer) -> Unitfn CompiledDspTopologyController::queue_topology_edit(self : CompiledDspTopologyController, edit : GraphTopologyEdit) -> Result[Unit, GraphTopologyQueueError]fn CompiledDspTopologyController::queue_topology_edits(self : CompiledDspTopologyController, edits : Array[GraphTopologyEdit]) -> Result[Unit, GraphTopologyQueueError]fn CompiledDspTopologyController::set_param(self : CompiledDspTopologyController, node_index : Int, slot : GraphParamSlot, value : Double) -> Result[Unit, GraphControlError]type CompiledStereoDspimpl GraphControllable for CompiledStereoDspfn apply_control(self : CompiledStereoDsp, control : GraphControl) -> Result[Unit, GraphControlError]fn apply_controls(self : CompiledStereoDsp, controls : Array[GraphControl]) -> Result[Unit, GraphControlError]impl GraphDebuggable for CompiledStereoDspfn CompiledStereoDsp::apply_control(self : CompiledStereoDsp, control : GraphControl) -> Result[Unit, GraphControlError]fn CompiledStereoDsp::apply_controls(self : CompiledStereoDsp, controls : Array[GraphControl]) -> Result[Unit, GraphControlError]fn CompiledStereoDsp::compile(compiled_template : CompiledTemplate, context : DspContext) -> CompiledStereoDsp?fn CompiledStereoDsp::gate_off(self : CompiledStereoDsp, node_index : Int) -> Result[Unit, GraphControlError]fn CompiledStereoDsp::gate_on(self : CompiledStereoDsp, node_index : Int) -> Result[Unit, GraphControlError]fn CompiledStereoDsp::process(self : CompiledStereoDsp, context : DspContext, left_output : AudioBuffer, right_output : AudioBuffer) -> Unitfn CompiledStereoDsp::set_param(self : CompiledStereoDsp, node_index : Int, slot : GraphParamSlot, value : Double) -> Result[Unit, GraphControlError]fn CompiledStereoDsp::validate_controls(self : CompiledStereoDsp, controls : Array[GraphControl]) -> Result[Unit, GraphControlError]type CompiledStereoDspHotSwapfn apply_control(self : CompiledStereoDspHotSwap, control : GraphControl) -> Result[Unit, GraphControlError]fn apply_controls(self : CompiledStereoDspHotSwap, controls : Array[GraphControl]) -> Result[Unit, GraphControlError]fn CompiledStereoDspHotSwap::apply_control(self : CompiledStereoDspHotSwap, control : GraphControl) -> Result[Unit, GraphControlError]fn CompiledStereoDspHotSwap::apply_controls(self : CompiledStereoDspHotSwap, controls : Array[GraphControl]) -> Result[Unit, GraphControlError]fn CompiledStereoDspHotSwap::from_graph(active : CompiledStereoDsp, crossfade_samples? : Int) -> CompiledStereoDspHotSwapfn CompiledStereoDspHotSwap::gate_off(self : CompiledStereoDspHotSwap, node_index : Int) -> Result[Unit, GraphControlError]fn CompiledStereoDspHotSwap::gate_on(self : CompiledStereoDspHotSwap, node_index : Int) -> Result[Unit, GraphControlError]fn CompiledStereoDspHotSwap::process(self : CompiledStereoDspHotSwap, context : DspContext, left_output : AudioBuffer, right_output : AudioBuffer) -> Unitfn CompiledStereoDspHotSwap::queue_swap(self : CompiledStereoDspHotSwap, next : CompiledStereoDsp) -> Result[Unit, HotSwapQueueError]fn CompiledStereoDspHotSwap::set_param(self : CompiledStereoDspHotSwap, node_index : Int, slot : GraphParamSlot, value : Double) -> Result[Unit, GraphControlError]type CompiledStereoDspTopologyControllerfn apply_control(self : CompiledStereoDspTopologyController, control : GraphControl) -> Result[Unit, GraphControlError]fn apply_controls(self : CompiledStereoDspTopologyController, controls : Array[GraphControl]) -> Result[Unit, GraphControlError]fn CompiledStereoDspTopologyController::apply_control(self : CompiledStereoDspTopologyController, control : GraphControl) -> Result[Unit, GraphControlError]fn CompiledStereoDspTopologyController::apply_controls(self : CompiledStereoDspTopologyController, controls : Array[GraphControl]) -> Result[Unit, GraphControlError]fn CompiledStereoDspTopologyController::from_nodes(nodes : Array[DspNode], context : DspContext, crossfade_samples? : Int) -> CompiledStereoDspTopologyController?fn CompiledStereoDspTopologyController::gate_off(self : CompiledStereoDspTopologyController, node_index : Int) -> Result[Unit, GraphControlError]fn CompiledStereoDspTopologyController::gate_on(self : CompiledStereoDspTopologyController, node_index : Int) -> Result[Unit, GraphControlError]fn CompiledStereoDspTopologyController::process(self : CompiledStereoDspTopologyController, context : DspContext, left_output : AudioBuffer, right_output : AudioBuffer) -> Unitfn CompiledStereoDspTopologyController::queue_topology_edit(self : CompiledStereoDspTopologyController, edit : GraphTopologyEdit) -> Result[Unit, GraphTopologyQueueError]fn CompiledStereoDspTopologyController::queue_topology_edits(self : CompiledStereoDspTopologyController, edits : Array[GraphTopologyEdit]) -> Result[Unit, GraphTopologyQueueError]fn CompiledStereoDspTopologyController::set_param(self : CompiledStereoDspTopologyController, node_index : Int, slot : GraphParamSlot, value : Double) -> Result[Unit, GraphControlError]pub struct CompiledTemplate {
// private fields
}pub struct ControlBinding {
key : String
node_index : Int
slot : GraphParamSlot
} derive(Eq, Debug)
#alias(new)
fn ControlBinding::ControlBinding(key~ : String, node_index~ : Int, slot~ : GraphParamSlot) -> ControlBindingimpl Show for ControlBindingpub struct ControlBindingBuilder {
// private fields
} derive(Debug)
#alias(new)
fn ControlBindingBuilder::ControlBindingBuilder() -> ControlBindingBuilderimpl Show for ControlBindingBuilderfn ControlBindingBuilder::bind(self : ControlBindingBuilder, key~ : String, node_index~ : Int, slot~ : GraphParamSlot) -> ControlBindingBuilderfn ControlBindingBuilder::build(self : ControlBindingBuilder, compiled_template : CompiledTemplate) -> Result[ControlBindingMap, ControlBindingError]pub(all) enum ControlBindingError {
InvalidNodeIndex(Int)
InvalidSlotForNode(Int, GraphParamSlot)
DuplicateKey(String)
OrphanBinding(String, Int)
} derive(Eq, Debug)impl Show for ControlBindingErrorimpl Show for ControlBindingMapfn ControlBindingMap::resolve_controls(self : ControlBindingMap, controls : Map[String, Double]) -> Array[GraphControl]pub struct DspNode {
// private fields
}impl NodeEditable for DspNodeimpl NodeFoldable for DspNodeimpl NodeSpanning for DspNodeimpl NodeStateful for DspNodefn DspNode::stereo_biquad(input~ : Int, mode~ : BiquadMode, cutoff_hz~ : Double, q~ : Double) -> DspNodepub struct GraphBuilder {
// private fields
}impl ArithSym for GraphBuilderimpl DelaySym for GraphBuilderfn delay(self : GraphBuilder, max_samples : Int, delay_samples : Int, feedback : Double) -> GraphBuilderimpl DspSym for GraphBuilderimpl FilterSym for GraphBuilderimpl StereoDelaySym for GraphBuilderfn stereo_delay(self : GraphBuilder, max_samples : Int, delay_samples : Int, feedback : Double) -> GraphBuilderimpl StereoFilterSym for GraphBuilderfn stereo_biquad(self : GraphBuilder, mode : BiquadMode, cutoff : Double, q : Double) -> GraphBuilderimpl StereoSym for GraphBuilderpub struct GraphControl {
// private fields
}pub(all) enum GraphControlError {
InvalidNodeIndex(Int)
OrphanNode(Int)
InvalidGateNode(Int, DspNodeKind)
InvalidSlotForNode(Int, DspNodeKind, GraphParamSlot)
InvalidParamValue(Int, DspNodeKind, GraphParamSlot, Double)
MissingRuntimeState(Int, DspNodeKind)
} derive(Debug)impl Show for GraphControlErrorpub struct GraphIndexMap {
// private fields
}fn GraphIndexMap::bind_control(self : GraphIndexMap, builder : ControlBindingBuilder, key : String, id : GraphNodeId, slot : GraphParamSlot) -> ControlBindingBuilder?fn GraphIndexMap::delete_chain(self : GraphIndexMap, start_id : GraphNodeId, end_id : GraphNodeId, retarget_id : GraphNodeId, input_slot : GraphTopologyInputSlot, replacement_source_id : GraphNodeId) -> GraphTopologyEdit?fn GraphIndexMap::delete_node(self : GraphIndexMap, delete_id : GraphNodeId, retarget_id : GraphNodeId, input_slot : GraphTopologyInputSlot, replacement_source_id : GraphNodeId) -> GraphTopologyEdit?fn GraphIndexMap::insert_chain(self : GraphIndexMap, retarget_id : GraphNodeId, input_slot : GraphTopologyInputSlot, chain_nodes : Array[DspNode]) -> GraphTopologyEdit?fn GraphIndexMap::insert_node(self : GraphIndexMap, retarget_id : GraphNodeId, input_slot : GraphTopologyInputSlot, inserted_node : DspNode) -> GraphTopologyEdit?fn GraphIndexMap::replace_node(self : GraphIndexMap, id : GraphNodeId, replacement : DspNode) -> GraphTopologyEdit?fn GraphIndexMap::rewire_input(self : GraphIndexMap, id : GraphNodeId, input_slot : GraphTopologyInputSlot, source_id : GraphNodeId) -> GraphTopologyEdit?fn GraphIndexMap::set_param(self : GraphIndexMap, id : GraphNodeId, slot : GraphParamSlot, value : Double) -> GraphControl?impl Show for GraphParamSlotpub struct GraphTemplateDoc {
// private fields
}fn GraphTemplateDoc::compile_stereo(self : GraphTemplateDoc, context : DspContext) -> CompiledStereoDsp?fn GraphTemplateDoc::delete_chain(self : GraphTemplateDoc, start_id : GraphNodeId, end_id : GraphNodeId, retarget_id : GraphNodeId, input_slot : GraphTopologyInputSlot, replacement_source_id : GraphNodeId) -> GraphTemplateDoc raise GraphTemplateDocErrorfn GraphTemplateDoc::delete_node(self : GraphTemplateDoc, delete_id : GraphNodeId, retarget_id : GraphNodeId, input_slot : GraphTopologyInputSlot, replacement_source_id : GraphNodeId) -> GraphTemplateDoc raise GraphTemplateDocErrorfn GraphTemplateDoc::from_nodes(ids~ : Array[GraphNodeId], nodes~ : Array[DspNode]) -> GraphTemplateDoc raise GraphTemplateDocErrorfn GraphTemplateDoc::insert_chain(self : GraphTemplateDoc, inserted_ids : Array[GraphNodeId], retarget_id : GraphNodeId, input_slot : GraphTopologyInputSlot, chain_nodes : Array[DspNode]) -> GraphTemplateDoc raise GraphTemplateDocErrorfn GraphTemplateDoc::insert_node(self : GraphTemplateDoc, inserted_id : GraphNodeId, retarget_id : GraphNodeId, input_slot : GraphTopologyInputSlot, inserted_node : DspNode) -> GraphTemplateDoc raise GraphTemplateDocErrorfn GraphTemplateDoc::replace_node(self : GraphTemplateDoc, id : GraphNodeId, replacement : DspNode) -> GraphTemplateDoc raise GraphTemplateDocErrorfn GraphTemplateDoc::rewire_input(self : GraphTemplateDoc, id : GraphNodeId, input_slot : GraphTopologyInputSlot, source_id : GraphNodeId) -> GraphTemplateDoc raise GraphTemplateDocErrorpub(all) enum GraphTopologyEdit {
ReplaceNode(Int, DspNode)
RewireInput(Int, GraphTopologyInputSlot, Int)
InsertNode(Int, GraphTopologyInputSlot, DspNode)
DeleteNode(Int, Int, GraphTopologyInputSlot, Int)
InsertChain(Int, GraphTopologyInputSlot, Array[DspNode])
DeleteChain(Int, Int, Int, GraphTopologyInputSlot, Int)
}fn GraphTopologyEdit::delete_chain(start_node : Int, end_node : Int, retarget_node : Int, input_slot : GraphTopologyInputSlot, replacement_source : Int) -> GraphTopologyEditfn GraphTopologyEdit::delete_node(delete_node_index : Int, retarget_node_index : Int, retarget_input_slot : GraphTopologyInputSlot, replacement_source_index : Int) -> GraphTopologyEditfn GraphTopologyEdit::insert_chain(retarget_node : Int, input_slot : GraphTopologyInputSlot, chain_nodes : Array[DspNode]) -> GraphTopologyEditfn GraphTopologyEdit::insert_node(retarget_node_index : Int, retarget_input_slot : GraphTopologyInputSlot, inserted_node : DspNode) -> GraphTopologyEditfn GraphTopologyEdit::rewire_input(node_index : Int, input_slot : GraphTopologyInputSlot, source_index : Int) -> GraphTopologyEditpub(all) enum GraphTopologyEditError {
InvalidNodeIndex(Int)
InvalidSourceIndex(Int)
UnsupportedInputSlot(Int, GraphTopologyInputSlot, DspNodeKind)
UnsupportedInsertTemplate(DspNodeKind)
EmptyInsertChain
UnsupportedChainNode(Int, DspNodeKind)
InvalidDeleteRange(Int, Int)
ReplacementSourceInDeletedRange(Int)
DeleteNodeRequiresUnary(Int, DspNodeKind)
DeleteNodeRequiresSingleConsumer(Int)
DeleteNodeConsumerMismatch(Int, Int)
DeleteChainRequiresUnary(Int, DspNodeKind)
DeleteChainRequiresSingleConsumer(Int)
DeleteChainConsumerMismatch(Int, Int, Int)
} derive(Debug)impl Show for GraphTopologyEditErrorpub(all) enum GraphTopologyQueueError {
PendingSwap
InvalidEdit(Int, GraphTopologyEditError)
RecompileRejected
HotSwap(HotSwapQueueError)
} derive(Debug)impl Show for GraphTopologyQueueErrorpub(all) enum HotSwapQueueError {
SampleRateMismatch(Double, Double)
BlockCapacityMismatch(Int, Int)
} derive(Debug)impl Show for HotSwapQueueErrorfn is_finite(value : Double) -> Boolfn[T : ArithSym + DspSym + FilterSym + DelaySym + StereoSym + StereoFilterSym + StereoDelaySym] replay(nodes : Array[DspNode]) -> T?MoonBit DSP audio engine
Dependencies