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>,
},
}Expand description
A controller event from hardware or protocol input.
Variants§
Button
Button press/release.
Knob
Rotary knob / encoder.
Fader
Linear fader.
MidiControl
MIDI Control Change.
Fields
MidiNote
MIDI Note.
Fields
Osc
OSC message.
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 · 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 PartialEq for ControlEvent
impl PartialEq 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