pub enum ChannelMessage {
NoteOff {
ch: Channel,
key: U7,
vel: U7,
},
NoteOn {
ch: Channel,
key: U7,
vel: U7,
},
PolyAftertouch {
ch: Channel,
key: U7,
pressure: U7,
},
ControlChange {
ch: Channel,
cc: U7,
value: U7,
},
ProgramChange {
ch: Channel,
program: U7,
},
ChanAftertouch {
ch: Channel,
pressure: U7,
},
PitchBend {
ch: Channel,
value: U14,
},
}Expand description
A MIDI channel-voice message, carrying its target Channel and payload.
Variants§
NoteOff
Note-off: release key on ch with release velocity vel.
NoteOn
Note-on: start key on ch with velocity vel (velocity 0 is a
conventional note-off).
PolyAftertouch
Polyphonic key pressure (aftertouch) for a single note.
ControlChange
Control-change message setting controller cc to value.
Fields
ProgramChange
Program (patch) change.
ChanAftertouch
Channel pressure (aftertouch) applied to the whole channel.
PitchBend
Pitch-bend wheel position as a 14-bit value (8192 is centred).
Trait Implementations§
Source§impl Clone for ChannelMessage
impl Clone for ChannelMessage
Source§fn clone(&self) -> ChannelMessage
fn clone(&self) -> ChannelMessage
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for ChannelMessage
Source§impl Debug for ChannelMessage
impl Debug for ChannelMessage
impl Eq for ChannelMessage
Source§impl Hash for ChannelMessage
impl Hash for ChannelMessage
Source§impl PartialEq for ChannelMessage
impl PartialEq for ChannelMessage
Source§fn eq(&self, other: &ChannelMessage) -> bool
fn eq(&self, other: &ChannelMessage) -> bool
Tests for
self and other values to be equal, and is used by ==.impl StructuralPartialEq for ChannelMessage
Auto Trait Implementations§
impl Freeze for ChannelMessage
impl RefUnwindSafe for ChannelMessage
impl Send for ChannelMessage
impl Sync for ChannelMessage
impl Unpin for ChannelMessage
impl UnsafeUnpin for ChannelMessage
impl UnwindSafe for ChannelMessage
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