Enum midi::Message [] [src]

pub enum Message {
    Start,
    TimingClock,
    Continue,
    Stop,
    ActiveSensing,
    SystemReset,
    AllSoundOff(Channel),
    ResetAllControllers(Channel),
    LocalControlOff(Channel),
    LocalControlOn(Channel),
    AllNotesOff(Channel),
    NoteOff(ChannelU7U7),
    ProgramChange(ChannelU7),
    ControlChange(ChannelU7U7),
    RPN7(ChannelU14U7),
    RPN14(ChannelU14U14),
    NRPN7(ChannelU14U7),
    NRPN14(ChannelU14U14),
    SysEx(ManufacturerVec<U7>),
    NoteOn(ChannelU7U7),
    PitchBend(ChannelU14),
    PolyphonicPressure(ChannelU7U7),
    ChannelPressure(ChannelU7),
}

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 the current sequence playing. (This message will be followed with Timing Clocks).

Timing Clock. Sent 24 times per quarter note when synchronization is required.

Continue. Continue at the point the sequence was Stopped

Stop. Stop the current sequence.

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.

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.

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.

Reset All Controllers. When Reset All Controllers is received, all controller values are reset to their default values. (See specific Recommended Practices for defaults).

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.

Local Control On restores the functions of the normal controllers.

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

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.

Program Change. This message sent when the patch number changes. The second argument is the new program number.

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).

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.

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.

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.

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.

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).

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.

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.

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.

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]

Formats the value using the given formatter.

impl Clone for Message
[src]

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

impl Eq for Message
[src]

impl PartialEq for Message
[src]

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

impl Ord for Message
[src]

This method returns an Ordering between self and other. Read more

impl PartialOrd for Message
[src]

This method returns an ordering between self and other values if one exists. Read more

This method tests less than (for self and other) and is used by the < operator. Read more

This method tests less than or equal to (for self and other) and is used by the <= operator. Read more

This method tests greater than (for self and other) and is used by the > operator. Read more

This method tests greater than or equal to (for self and other) and is used by the >= operator. Read more

impl ToRawMessages for Message
[src]