pub enum EventPattern {
Show 13 variants
AnyButton,
ButtonId(u32),
AnyKnob,
KnobId(u32),
AnyFader,
FaderId(u32),
AnyMidi,
MidiControl {
channel: Option<u8>,
controller: u8,
},
MidiNote {
channel: Option<u8>,
note: Option<u8>,
kind: MidiNoteKind,
},
MidiClock,
MidiTransport {
kind: Option<MidiTransportKind>,
},
OscAddress(String),
OscPattern(String),
}Expand description
A pattern for matching controller events.
Variants§
AnyButton
Matches any button event regardless of ID.
ButtonId(u32)
Matches a button event with a specific hardware ID.
AnyKnob
Matches any knob event regardless of ID.
KnobId(u32)
Matches a knob event with a specific hardware ID.
AnyFader
Matches any fader event regardless of ID.
FaderId(u32)
Matches a fader event with a specific hardware ID.
AnyMidi
Matches any MIDI event (control change, note, clock, or transport).
MidiControl
Matches a MIDI control change event by controller number and optional channel.
Fields
MidiNote
Matches a MIDI note-on or note-off event and extracts a mapped value.
Fields
kind: MidiNoteKindWhich aspect of the note event to use as the mapping value.
MidiClock
Matches a MIDI clock tick event.
MidiTransport
Matches a MIDI transport event (start, stop, or continue).
Fields
kind: Option<MidiTransportKind>Optional transport kind filter; None matches any transport event.
OscAddress(String)
Matches an OSC message by exact address string.
OscPattern(String)
Matches an OSC message whose address contains the given substring.
Implementations§
Source§impl EventPattern
impl EventPattern
Sourcepub fn matches(&self, event: &ControlEvent) -> bool
pub fn matches(&self, event: &ControlEvent) -> bool
Checks whether this pattern matches a given control event.
Trait Implementations§
Source§impl Clone for EventPattern
impl Clone for EventPattern
Source§fn clone(&self) -> EventPattern
fn clone(&self) -> EventPattern
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for EventPattern
impl Debug for EventPattern
Source§impl Hash for EventPattern
impl Hash for EventPattern
Source§impl PartialEq for EventPattern
impl PartialEq for EventPattern
Source§fn eq(&self, other: &EventPattern) -> bool
fn eq(&self, other: &EventPattern) -> bool
self and other values to be equal, and is used by ==.