Enum midi::Message
[−]
[src]
pub enum Message { Start, TimingClock, Continue, Stop, ActiveSensing, SystemReset, AllSoundOff(Channel), ResetAllControllers(Channel), LocalControlOff(Channel), LocalControlOn(Channel), AllNotesOff(Channel), NoteOff(Channel, U7, U7), ProgramChange(Channel, U7), ControlChange(Channel, U7, U7), RPN7(Channel, U14, U7), RPN14(Channel, U14, U14), NRPN7(Channel, U14, U7), NRPN14(Channel, U14, U14), SysEx(Manufacturer, Vec<U7>), NoteOn(Channel, U7, U7), PitchBend(Channel, U14), PolyphonicPressure(Channel, U7, U7), ChannelPressure(Channel, U7), }
Defines the various Midi messages that can be sent
The variants are ordered such that they may be sorted and sent in a sensible order when they
occur at the same time, thus NoteOff
before NoteOn
, Start
before TimingClock
,
ControlChange
and ProgramChange
before NoteOn
, etc, etc
Variants
Start
Start. Start the current sequence playing. (This message will be followed with Timing Clocks).
TimingClock
Timing Clock. Sent 24 times per quarter note when synchronization is required.
Continue
Continue. Continue at the point the sequence was Stopped
Stop
Stop. Stop the current sequence.
ActiveSensing
Active Sensing. This message is intended to be sent repeatedly to tell the receiver that a connection is alive. Use of this message is optional. When initially received, the receiver will expect to receive another Active Sensing message each 300ms (max), and if it does not then it will assume that the connection has been terminated. At termination, the receiver will turn off all voices and return to normal (non- active sensing) operation.
SystemReset
Reset. Reset all receivers in the system to power-up status. This should be used sparingly, preferably under manual control. In particular, it should not be sent on power-up.
AllSoundOff(Channel)
All Sound Off. When All Sound Off is received all oscillators will turn off, and their volume envelopes are set to zero as soon as possible.
ResetAllControllers(Channel)
Reset All Controllers. When Reset All Controllers is received, all controller values are reset to their default values. (See specific Recommended Practices for defaults).
LocalControlOff(Channel)
When Local Control is Off, all devices on a given channel will respond only to data received over MIDI. Played data, etc. will be ignored.
LocalControlOn(Channel)
Local Control On restores the functions of the normal controllers.
AllNotesOff(Channel)
All Notes Off. When an All Notes Off is received, all oscillators will turn off.
(if you need to use one of the more obsure all notes off modes, send the direct
ControlChange
message
NoteOff(Channel, U7, U7)
Note Off event. This message is sent when a note is released (ended). The second argument is the key (note) number. The third argument is the velocity.
ProgramChange(Channel, U7)
Program Change. This message sent when the patch number changes. The second argument is the new program number.
ControlChange(Channel, U7, U7)
Control Change. This message is sent when a controller value changes. The second argument is the controller number (0-119, though 0-127 is allowed). The third argument is the controller value (0-127).
RPN7(Channel, U14, U7)
7-bit RPN. This message is sent when a 7-bit RPN changes. The second argument is the RPN. The third argument is the value.
RPN14(Channel, U14, U14)
14-bit RPN. This message is sent when a 14-bit RPN changes. The second argument is the RPN. The third argument is the value.
NRPN7(Channel, U14, U7)
7-bit NRPN. This message is sent when a 7-bit NRPN changes. The second argument is the NRPN. The third argument is the value.
NRPN14(Channel, U14, U14)
14-bit NRPN. This message is sent when a 14-bit NRPN changes. The second argument is the NRPN. The third argument is the value.
SysEx(Manufacturer, Vec<U7>)
System Exclusive. This message type allows manufacturers to create their own messages (such
as bulk dumps, patch parameters, and other non-spec data) and provides a mechanism for
creating additional MIDI Specification messages.
The first argument indicates the manufacturer.
The second argument contains the data (without the F0
header, or F7
terminator).
NoteOn(Channel, U7, U7)
Note On event. This message is sent when a note is depressed (start). The second argument is the key (note) number. The third is the velocity.
PitchBend(Channel, U14)
Pitch Bend Change. This message is sent to indicate a change in the pitch bender (wheel or lever, typically). The pitch bender is measured by a fourteen bit value. Center (no pitch change) is 2000H.
PolyphonicPressure(Channel, U7, U7)
Polyphonic Key Pressure (Aftertouch). This message is most often sent by pressing down on the key after it "bottoms out". The second argument is the key (note) number. The third argument is the pressure value.
ChannelPressure(Channel, U7)
Channel Pressure (Aftertouch). This message is most often sent by pressing down on the key after it "bottoms out". This message is different from polyphonic after-touch. Use this message to send the single greatest pressure value (of all the current depressed keys). The second argument is the pressure value.
Trait Implementations
impl Debug for Message
[src]
impl Clone for Message
[src]
fn clone(&self) -> Message
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0
Performs copy-assignment from source
. Read more
impl Eq for Message
[src]
impl PartialEq for Message
[src]
fn eq(&self, __arg_0: &Message) -> bool
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, __arg_0: &Message) -> bool
This method tests for !=
.
impl Ord for Message
[src]
fn cmp(&self, __arg_0: &Message) -> Ordering
This method returns an Ordering
between self
and other
. Read more
impl PartialOrd for Message
[src]
fn partial_cmp(&self, __arg_0: &Message) -> Option<Ordering>
This method returns an ordering between self
and other
values if one exists. Read more
fn lt(&self, __arg_0: &Message) -> bool
This method tests less than (for self
and other
) and is used by the <
operator. Read more
fn le(&self, __arg_0: &Message) -> bool
This method tests less than or equal to (for self
and other
) and is used by the <=
operator. Read more
fn gt(&self, __arg_0: &Message) -> bool
This method tests greater than (for self
and other
) and is used by the >
operator. Read more
fn ge(&self, __arg_0: &Message) -> bool
This method tests greater than or equal to (for self
and other
) and is used by the >=
operator. Read more