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
Событие контроллера
Variants§
Button
Кнопка (нажата/отпущена)
Knob
Поворотная ручка (энкодер)
Fader
Фейдер (линейный ползунок)
MidiControl
MIDI Control Change
MidiNote
MIDI Note
Osc
OSC сообщение
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