Import from control_surfaces.event_patterns
Event patterns are used to recognize events from their MIDI data. The most
common type is the BasicPattern
which can be used to detect a variety of event
types.
The interface used to define an event pattern. If none of the following patterns match your needs, you can make a custom pattern by implementing this.
matchEvent(self, event: FlMidiMsg) -> bool
: Given a MIDI event, return whether that event matches with the pattern.
A basic event pattern that can recognize most events.
A pattern used to recognize events that were forwarded from other devices. Its constructor should be given another event pattern to recognize from.
A pattern used to recognize events from the union of multiple patterns. Its constructor should be given other event patterns to match from.
Represents a union between an event pattern and the forwarded version of that
pattern. Equivalent to
UnionPattern(SomePattern(), ForwardedPattern(SomePattern()))
.
A pattern that won't match with anything. This can be used to instantiate controls when they are being recognized through other code.