pub enum MixerCommand {
AddTrack {
kind: TrackKind,
handle: Arc<TrackHandle>,
},
SetInstrument {
track_id: usize,
instrument: Box<dyn Plugin + Send>,
},
RemoveTrack {
track_id: usize,
},
SetParameter {
track_id: usize,
param_index: usize,
value: f32,
},
CreateClip {
track_id: usize,
start_tick: i64,
length_ticks: i64,
},
UpdateClip {
track_id: usize,
clip_index: usize,
events: Vec<ClipEvent>,
},
UpdateClipPosition {
track_id: usize,
clip_index: usize,
start_tick: i64,
length_ticks: i64,
},
RemoveClip {
track_id: usize,
clip_index: usize,
},
SetPattern {
track_id: usize,
slot: u8,
block: PatternBlock,
},
}Variants§
AddTrack
SetInstrument
RemoveTrack
SetParameter
CreateClip
Create a new empty clip on a track.
UpdateClip
Replace a clip’s events with edited data from the UI.
UpdateClipPosition
Update a clip’s timeline position and length on the audio thread.
RemoveClip
Remove a clip from a track on the audio thread.
SetPattern
Give one of a sequencer track’s eight pattern slots new contents, and
with it the UI’s current word on the track-level settings that ride on
a block — see PatternBlock.
The block travels by value. It is Copy and about two and a half
kilobytes, so receiving one is a memcpy into memory that already
exists: no Vec to free, no Box to drop, nothing for the audio
thread to hand back to the allocator. The first pattern a track is
given allocates its player, exactly as SetInstrument allocates a
voice array; every one after it does not.
Auto Trait Implementations§
impl !RefUnwindSafe for MixerCommand
impl !Sync for MixerCommand
impl !UnwindSafe for MixerCommand
impl Freeze for MixerCommand
impl Send for MixerCommand
impl Unpin for MixerCommand
impl UnsafeUnpin for MixerCommand
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