#[non_exhaustive]pub enum EventData<'a> {
Midi([u8; 3]),
SysEx(&'a [u8]),
NoteOn(Note),
NoteOff(Note),
Expression(NoteExpression),
}Expand description
What an event carries.
Plugins receive notes and expressions in their format’s note events where it has them: CLAP
note and note expression events on ports that take the CLAP dialect, and VST3 note events,
note expression values, and poly pressure. VST3 names a note by its ID, so a note off or an
expression without an ID reaches each note on its key by that note’s ID, and a note started
without an ID takes no expression other than pressure. Ports that take MIDI only receive the
MIDI 1.0 form of EventData::to_midi; the note ID and the precision beyond 7 bits are lost
there, and an expression other than pressure has no such form and is not delivered. Output
notes and expressions in a format’s note events become these variants; MIDI output stays MIDI.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Midi([u8; 3])
A MIDI 1.0 channel message. Program change and channel pressure use two bytes; the third is ignored. MPE is MIDI 1.0 on member channels and is delivered as MIDI.
SysEx(&'a [u8])
A complete system exclusive message, from its F0 to its F7.
NoteOn(Note)
Starts a note with normalized velocity and an optional independent note ID.
NoteOff(Note)
Ends the notes it addresses; velocity is the release velocity.
Expression(NoteExpression)
Changes an expression of the addressed note or notes.