Enum wmidi::MidiMessage [] [src]

pub enum MidiMessage<'a> {
    NoteOff(ChannelNoteVelocity),
    NoteOn(ChannelNoteVelocity),
    PolyphonicKeyPressure(ChannelNoteVelocity),
    ControlChange(ChannelControlNumberControlValue),
    ProgramChange(ChannelProgramNumber),
    ChannelPressure(ChannelVelocity),
    PitchBendChange(ChannelPitchBend),
    SysEx(&'a [U7]),
    MidiTimeCode(U7),
    SongPositionPointer(SongPosition),
    SongSelect(Song),
    Reserved(u8),
    TuneRequest,
    TimingClock,
    Start,
    Continue,
    Stop,
    ActiveSensing,
    Reset,
}

Holds information based on the Midi 1.0 spec.

Variants

This message is sent when a note is released (ended).

This message is sent when a note is depressed (start).

This message is most often sent by pressing down on the key after it "bottoms out".

This message is sent when a controller value changes. Controllers include devices such as pedals and levers.

Controller numbers 120-127 are reserved as "Channel Mode Messages".

This message is sent when the patch number changes.

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

This message is sent to indicate a change in the pitch bender (wheel or level, typically). The pitch bender is measured by a fourteen bit value. Center is 8192.

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.

In the data held by the SysEx message, the Manufacturer's ID code (assigned by MMA or AMEI) is either 1 byte or 3 bytes. Two of the 1 Byte IDs are reserved for extensions called Universal Exclusive Messages, which are not manufacturer-specific. If a device recognizes the ID code as its own (or as a supported Universal message) it will listen to the rest of the message. Otherwise the message will be ignored.

MIDI Time Code Quarter Frame.

The data is in the format 0nnndddd where nnn is the Message Type and dddd is the Value.

TODO: Interpret data instead of providing the raw format.

This is an internal 14 bit value that holds the number of MIDI beats (1 beat = six MIDI clocks) since the start of the song.

The Song Select specifies which sequence or song is to be played.

The u8 data holds the status byte.

Upon receiving a Tune Request, all analog synthesizers should tune their oscillators.

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

Start the current sequence playing. (This message will be followed with Timing Clocks).

Continue at the point the sequence was Stopped.

Stop the current sequence.

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

Methods

impl<'a> MidiMessage<'a>
[src]

[src]

Construct a midi message from bytes.

[src]

Return Some(midi_message) if self is not a SysEx message, or None if it is. This expands the lifetime of the MidiMessage from 'a to 'static.

[src]

The number of bytes the MIDI message takes.

[src]

The channel associated with the MIDI message, if applicable for the message type.

[src]

Write the contents of the MIDI message as raw MIDI bytes.

Trait Implementations

impl<'a> Clone for MidiMessage<'a>
[src]

[src]

Returns a copy of the value. Read more

1.0.0
[src]

Performs copy-assignment from source. Read more

impl<'a> Debug for MidiMessage<'a>
[src]

[src]

Formats the value using the given formatter.

impl<'a> PartialEq for MidiMessage<'a>
[src]

[src]

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

[src]

This method tests for !=.

impl<'a> Eq for MidiMessage<'a>
[src]