pub enum UnifiedKnystCommands {
Real(Rc<RefCell<MultiThreadedKnystCommands>>),
Dummy(DummyKnystCommands),
}
Expand description
Represents and possible implementor of KnystCommands
Variants§
Real(Rc<RefCell<MultiThreadedKnystCommands>>)
Dummy(DummyKnystCommands)
Trait Implementations§
source§impl KnystCommands for UnifiedKnystCommands
impl KnystCommands for UnifiedKnystCommands
source§fn push_without_inputs(&mut self, gen_or_graph: impl GenOrGraph) -> NodeId
fn push_without_inputs(&mut self, gen_or_graph: impl GenOrGraph) -> NodeId
Push a Gen or Graph to the top level Graph without specifying any inputs.
source§fn push(
&mut self,
gen_or_graph: impl GenOrGraph,
inputs: impl Into<InputBundle>
) -> NodeId
fn push( &mut self, gen_or_graph: impl GenOrGraph, inputs: impl Into<InputBundle> ) -> NodeId
Push a Gen or Graph to the default Graph.
source§fn push_to_graph_without_inputs(
&mut self,
gen_or_graph: impl GenOrGraph,
graph_id: GraphId
) -> NodeId
fn push_to_graph_without_inputs( &mut self, gen_or_graph: impl GenOrGraph, graph_id: GraphId ) -> NodeId
Push a Gen or Graph to the Graph with the specified id without specifying inputs.
source§fn push_to_graph(
&mut self,
gen_or_graph: impl GenOrGraph,
graph_id: GraphId,
inputs: impl Into<InputBundle>
) -> NodeId
fn push_to_graph( &mut self, gen_or_graph: impl GenOrGraph, graph_id: GraphId, inputs: impl Into<InputBundle> ) -> NodeId
Push a Gen or Graph to the Graph with the specified id.
source§fn connect(&mut self, connection: Connection)
fn connect(&mut self, connection: Connection)
Create a new connections
source§fn connect_bundle(&mut self, bundle: impl Into<ConnectionBundle>)
fn connect_bundle(&mut self, bundle: impl Into<ConnectionBundle>)
Make several connections at once using any of the ConnectionBundle
notations
source§fn schedule_beat_callback(
&mut self,
callback: impl FnMut(Beats, &mut MultiThreadedKnystCommands) -> Option<Beats> + Send + 'static,
start_time: StartBeat
) -> CallbackHandle
fn schedule_beat_callback( &mut self, callback: impl FnMut(Beats, &mut MultiThreadedKnystCommands) -> Option<Beats> + Send + 'static, start_time: StartBeat ) -> CallbackHandle
Add a new beat callback. See
BeatCallback
for documentation.source§fn disconnect(&mut self, connection: Connection)
fn disconnect(&mut self, connection: Connection)
Disconnect (undo) a
Connection
source§fn free_disconnected_nodes(&mut self)
fn free_disconnected_nodes(&mut self)
Free any nodes that are not currently connected to the graph’s outputs
via any chain of connections.
source§fn free_node_mend_connections(&mut self, node: NodeId)
fn free_node_mend_connections(&mut self, node: NodeId)
Free a node and try to mend connections between the inputs and the
outputs of the node.
source§fn schedule_change(&mut self, change: ParameterChange)
fn schedule_change(&mut self, change: ParameterChange)
Schedule a change to be made. Read more
source§fn schedule_changes(&mut self, changes: SimultaneousChanges)
fn schedule_changes(&mut self, changes: SimultaneousChanges)
Schedule multiple changes to be made. Read more
source§fn insert_buffer(&mut self, buffer: Buffer) -> BufferId
fn insert_buffer(&mut self, buffer: Buffer) -> BufferId
source§fn remove_buffer(&mut self, buffer_id: BufferId)
fn remove_buffer(&mut self, buffer_id: BufferId)
Remove a buffer from the
Resources
source§fn replace_buffer(&mut self, buffer_id: BufferId, buffer: Buffer)
fn replace_buffer(&mut self, buffer_id: BufferId, buffer: Buffer)
Replace a buffer in the
Resources
source§fn insert_wavetable(&mut self, wavetable: Wavetable) -> WavetableId
fn insert_wavetable(&mut self, wavetable: Wavetable) -> WavetableId
source§fn remove_wavetable(&mut self, wavetable_id: WavetableId)
fn remove_wavetable(&mut self, wavetable_id: WavetableId)
Remove a wavetable from the
Resources
source§fn replace_wavetable(&mut self, id: WavetableId, wavetable: Wavetable)
fn replace_wavetable(&mut self, id: WavetableId, wavetable: Wavetable)
Replace a wavetable in the
Resources
source§fn change_musical_time_map(
&mut self,
change_fn: impl FnOnce(&mut MusicalTimeMap) + Send + 'static
)
fn change_musical_time_map( &mut self, change_fn: impl FnOnce(&mut MusicalTimeMap) + Send + 'static )
Make a change to the shared
MusicalTimeMap
source§fn default_graph_settings(&self) -> GraphSettings
fn default_graph_settings(&self) -> GraphSettings
Return the
GraphSettings
of the top level graph. This means you
don’t have to manually keep track of matching sample rate and block size
for example.source§fn init_local_graph(&mut self, settings: GraphSettings) -> GraphId
fn init_local_graph(&mut self, settings: GraphSettings) -> GraphId
Creates a new local graph and sets it as the default graph
source§fn upload_local_graph(&mut self) -> Option<Handle<GraphHandle>>
fn upload_local_graph(&mut self) -> Option<Handle<GraphHandle>>
Upload the local graph to the previously default graph and restore the default graph to that previous default graph.
source§fn request_inspection(&mut self) -> Receiver<GraphInspection>
fn request_inspection(&mut self) -> Receiver<GraphInspection>
Request a
GraphInspection
of the top level graph which will be sent back in the returned channelsource§fn to_graph(&mut self, graph_id: GraphId)
fn to_graph(&mut self, graph_id: GraphId)
Set knyst commands on the current thread to use the selected GraphId by default
source§fn to_top_level_graph(&mut self)
fn to_top_level_graph(&mut self)
Set knyst commands on the current thread to use the top level GraphId by default
source§fn start_scheduling_bundle(&mut self, time: Time)
fn start_scheduling_bundle(&mut self, time: Time)
Start a scheduling bundle, meaning any change scheduled will not be applied until
KnystCommands::upload_scheduling_bundle
is called. Prefer using schedule_bundle
as it is more difficult to misuse.source§fn upload_scheduling_bundle(&mut self)
fn upload_scheduling_bundle(&mut self)
Uploads scheduled changes to the graph and schedules them for the time specified in
KnystCommands::start_scheduling_bundle
. Prefer schedule_bundle
to help reinforce scoping and potential thread switches.source§fn current_graph(&self) -> GraphId
fn current_graph(&self) -> GraphId
Get the id of the currently active graph
source§fn set_mortality(&mut self, node: NodeId, is_mortal: bool)
fn set_mortality(&mut self, node: NodeId, is_mortal: bool)
Sets the mortality of a node to mortal (true) or immortal (false). An immortal node cannot be freed.
Auto Trait Implementations§
impl !RefUnwindSafe for UnifiedKnystCommands
impl !Send for UnifiedKnystCommands
impl !Sync for UnifiedKnystCommands
impl Unpin for UnifiedKnystCommands
impl !UnwindSafe for UnifiedKnystCommands
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
source§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
source§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Convert
Box<dyn Trait>
(where Trait: Downcast
) to Box<dyn Any>
. Box<dyn Any>
can
then be further downcast
into Box<ConcreteType>
where ConcreteType
implements Trait
.source§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Convert
Rc<Trait>
(where Trait: Downcast
) to Rc<Any>
. Rc<Any>
can then be
further downcast
into Rc<ConcreteType>
where ConcreteType
implements Trait
.source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
Convert
&Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &Any
’s vtable from &Trait
’s.source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
Convert
&mut Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &mut Any
’s vtable from &mut Trait
’s.