pub enum ControlEvent {
Button {
id: u32,
pressed: bool,
},
Knob {
id: u32,
value: f32,
normalized: f32,
},
Fader {
id: u32,
value: f32,
normalized: f32,
},
MidiControl {
channel: u8,
controller: u8,
value: u8,
normalized: f32,
},
MidiNote {
channel: u8,
note: u8,
velocity: u8,
on: bool,
},
Osc {
address: String,
args: Vec<f32>,
},
MidiClock,
MidiTransport {
kind: MidiTransportKind,
},
}Expand description
Hardware control event from a physical interface (knob, button, fader, etc.).
Produced by sensors (MIDI, OSC, CV/Gate) and dispatched to servos for mapping to graph parameters.
Variants§
Button
A physical button press or release.
Knob
A physical knob (rotary encoder or potentiometer) event.
Fields
Fader
A physical fader (linear slider) event.
Fields
MidiControl
A MIDI control change message.
Fields
MidiNote
A MIDI note-on or note-off message.
Fields
Osc
An OSC message event.
MidiClock
A MIDI clock tick event.
MidiTransport
A MIDI transport state change.
Fields
§
kind: MidiTransportKindThe type of transport event (start, stop, or continue).
Implementations§
Trait Implementations§
Source§impl Clone for ControlEvent
impl Clone for ControlEvent
Source§fn clone(&self) -> ControlEvent
fn clone(&self) -> ControlEvent
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for ControlEvent
impl Debug for ControlEvent
Source§impl<'de> Deserialize<'de> for ControlEvent
impl<'de> Deserialize<'de> for ControlEvent
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl PartialEq for ControlEvent
impl PartialEq for ControlEvent
Source§fn eq(&self, other: &ControlEvent) -> bool
fn eq(&self, other: &ControlEvent) -> bool
Tests for
self and other values to be equal, and is used by ==.Source§impl Serialize for ControlEvent
impl Serialize for ControlEvent
impl StructuralPartialEq for ControlEvent
Auto Trait Implementations§
impl Freeze for ControlEvent
impl RefUnwindSafe for ControlEvent
impl Send for ControlEvent
impl Sync for ControlEvent
impl Unpin for ControlEvent
impl UnsafeUnpin for ControlEvent
impl UnwindSafe for ControlEvent
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