pub enum Command {
Press {
sound: u32,
gain: f32,
gated: bool,
tag: u32,
},
Release {
tag: u32,
},
Play,
Pause,
Locate(u64),
SetScene(Arc<Scene>),
SetGain(f32),
Panic,
}Expand description
What the control thread asks of the audio thread. Applied at the start of the next device block.
Variants§
Press
Starts sound sound of the current scene now. A gated voice plays until a Command::Release with its tag and then fades
out; one that is not gated plays to its end. Plays whether or not the transport runs.
Release
Fades out every held voice with this tag.
Play
Starts the transport: scene events play from the cursor.
Pause
Stops the transport where it is. Voices that are sounding finish, and live presses still sound.
Locate(u64)
Moves the transport cursor, in frames. In a looping scene it wraps into the loop. Sounding voices carry on.
SetScene(Arc<Scene>)
Replaces the scene at a block boundary, keeping the cursor. Voices of the old scene finish on the old scene’s sounds. While the engine still holds a previous retired scene the swap waits for the next block.
SetGain(f32)
Master gain on the dry bus, linear.
Panic
Stops every voice at once.