Struct nodi::MidiEvent [−][src]
pub struct MidiEvent {
pub channel: u4,
pub message: MidiMessage,
}
Expand description
Represents a MIDI message.
This type can be fed to a synthesizer.
Examples
// An instance of this type can be sent to a synthesizer like this.
let msg: MidiEvent = /* ... */;
let mut buf = Vec::new();
msg.write(&mut buf)?;
// Now `bf` contains a valid MIDI message, send it to a MIDI api like `midir::MidiOutputConnection`.
Fields
channel: u4
The channel this event is to be sent to.
message: MidiMessage
The message body.
Implementations
Trait Implementations
Auto Trait Implementations
impl RefUnwindSafe for MidiEvent
impl UnwindSafe for MidiEvent
Blanket Implementations
Mutably borrows from an owned value. Read more