Struct wmidi::ControlFunction[][src]

pub struct ControlFunction(pub U7);

A Control Change signal. The names of each variant of the constants are from the 1997 MIDI 1.0 specification. The names and description reflect the standard assignment and behavior for each CC number, though manufacturers may ignore some controllers or use non-standard mappings. MIDI devices should provide a controller allocation table as part of their user manual.

  • 0 - 31: Continuous Controller Data (MSB)
  • 32 - 63: Continuous Controller Data (LSB)
  • 64 - 119: Single-byte controllers
  • 120 - 127: Channel mode messages

Setting the MSB on a continous controller resets the LSB to zero. The LSB can be omitted afterwards if the finer resolution is not needed.

Channel mode messages affect the entire instrument and are only valid when sent over the instrument’s “basic channel”.

Implementations

impl ControlFunction[src]

pub const MIN: ControlFunction[src]

pub const MAX: ControlFunction[src]

pub const BANK_SELECT: ControlFunction[src]

[MIDI 1.0] Specifies which program bank to use when changing program. The MSB and LSB are always sent as a pair, immediately followed by a program change.

pub const MODULATION_WHEEL: ControlFunction[src]

Either known as Modulation Wheel (MIDI 1.0 and GM1) or Modulation Depth (GM2)

[GM1] “For all instruments, the Modulation Wheel will change the nature of the sound in the most natural (expected) way. i.e. depth of LFO; change of timbre; add more tine sound; etc.)”

[GM2] Specifies the vibrato (LFO pitch modulation) depth to use for that channel. The depth response ranges from 0 cents (no modulation) to the value of RPN 05.00 “Modulation Depth Range”, following a curve that is linear in cents.

pub const BREATH_CONTROLLER: ControlFunction[src]

Effect was never standardized

pub const UNDEFINED_3: ControlFunction[src]

pub const FOOT_CONTROLLER: ControlFunction[src]

Effect was never standardized

pub const PORTAMENTO_TIME: ControlFunction[src]

[MIDI 1.0] Specifies the pitch increment speed for the portamento effect. The relation between the parameter value and the speed in cents per ms is outside the MIDI specification.

pub const DATA_ENTRY_MSB: ControlFunction[src]

[MIDI 1.0] Sets the value of the last selected RPN/NRPN.

pub const CHANNEL_VOLUME: ControlFunction[src]

[MIDI 1.0] Specifies the mixing volume for that channel.

[GM1] The gain in dB should be equivalent to L = 40 * log10(cc7/127).

pub const BALANCE: ControlFunction[src]

[MIDI 1.0] Specifies the volume balance for that channel. Center is 64, left/bottom is 0 and right/top is 127.

pub const UNDEFINED_9: ControlFunction[src]

pub const PAN: ControlFunction[src]

[MIDI 1.0] Specifies the sound location (in stereo) balance for that channel. Center is 64, left is 0 and right is 127.

pub const EXPRESSION_CONTROLLER: ControlFunction[src]

[MIDI 1.0] Specifies the volume accent for that channel. Unlike ChannelVolume (7), this one is meant to change during performance to create diminuendos and crescendos.

[GM1] The gain in dB should be equivalent to L = 40 * log10(cc7/127) + 40 * log10(cc11/127).

pub const EFFECT_CONTROL_1: ControlFunction[src]

pub const EFFECT_CONTROL_2: ControlFunction[src]

pub const UNDEFINED_14: ControlFunction[src]

pub const UNDEFINED_15: ControlFunction[src]

pub const GENERAL_PURPOSE_CONTROLLER_1: ControlFunction[src]

[MIDI 1.0] 2 bytes general-purpose controller for device-specific features.

pub const GENERAL_PURPOSE_CONTROLLER_2: ControlFunction[src]

[MIDI 1.0] 2 bytes general-purpose controller for device-specific features.

pub const GENERAL_PURPOSE_CONTROLLER_3: ControlFunction[src]

[MIDI 1.0] 2 bytes general-purpose controller for device-specific features.

pub const GENERAL_PURPOSE_CONTROLLER_4: ControlFunction[src]

[MIDI 1.0] 2 bytes general-purpose controller for device-specific features.

pub const UNDEFINED_20: ControlFunction[src]

pub const UNDEFINED_21: ControlFunction[src]

pub const UNDEFINED_22: ControlFunction[src]

pub const UNDEFINED_23: ControlFunction[src]

pub const UNDEFINED_24: ControlFunction[src]

pub const UNDEFINED_25: ControlFunction[src]

pub const UNDEFINED_26: ControlFunction[src]

pub const UNDEFINED_27: ControlFunction[src]

pub const UNDEFINED_28: ControlFunction[src]

pub const UNDEFINED_29: ControlFunction[src]

pub const UNDEFINED_30: ControlFunction[src]

pub const UNDEFINED_31: ControlFunction[src]

pub const BANK_SELECT_LSB: ControlFunction[src]

pub const MODULATION_WHEEL_LSB: ControlFunction[src]

pub const BREATH_CONTROLLER_LSB: ControlFunction[src]

pub const UNDEFINED_3_LSB: ControlFunction[src]

pub const FOOT_CONTROLLER_LSB: ControlFunction[src]

pub const PORTAMENTO_TIME_LSB: ControlFunction[src]

pub const DATA_ENTRY_LSB: ControlFunction[src]

[MIDI 1.0] Sets the value of the last selected RPN/NRPN

pub const CHANNEL_VOLUME_LSB: ControlFunction[src]

pub const BALANCE_LSB: ControlFunction[src]

pub const UNDEFINED_9_LSB: ControlFunction[src]

pub const PAN_LSB: ControlFunction[src]

pub const EXPRESSION_CONTROLLER_LSB: ControlFunction[src]

pub const EFFECT_CONTROL_1_LSB: ControlFunction[src]

pub const EFFECT_CONTROL_2_LSB: ControlFunction[src]

pub const UNDEFINED_14_LSB: ControlFunction[src]

pub const UNDEFINED_15_LSB: ControlFunction[src]

pub const GENERAL_PURPOSE_CONTROLLER_1_LSB: ControlFunction[src]

pub const GENERAL_PURPOSE_CONTROLLER_2_LSB: ControlFunction[src]

pub const GENERAL_PURPOSE_CONTROLLER_3_LSB: ControlFunction[src]

pub const GENERAL_PURPOSE_CONTROLLER_4_LSB: ControlFunction[src]

pub const UNDEFINED_20_LSB: ControlFunction[src]

pub const UNDEFINED_21_LSB: ControlFunction[src]

pub const UNDEFINED_22_LSB: ControlFunction[src]

pub const UNDEFINED_23_LSB: ControlFunction[src]

pub const UNDEFINED_24_LSB: ControlFunction[src]

pub const UNDEFINED_25_LSB: ControlFunction[src]

pub const UNDEFINED_26_LSB: ControlFunction[src]

pub const UNDEFINED_27_LSB: ControlFunction[src]

pub const UNDEFINED_28_LSB: ControlFunction[src]

pub const UNDEFINED_29_LSB: ControlFunction[src]

pub const UNDEFINED_30_LSB: ControlFunction[src]

pub const UNDEFINED_31_LSB: ControlFunction[src]

pub const DAMPER_PEDAL: ControlFunction[src]

Either known as the Hold, Sustain or Damper pedal.

[MIDI 1.0] Response to NoteOff and AllNotesOff should be delayed while this switch is on (value >= 64) until it transitions to off.

[GM2] May be treated as a continuous controller instead of a switch for the “Half Damper” and “re-damper” effects.

pub const PORTAMENTO_ON_OFF: ControlFunction[src]

[MIDI 1.0] Turns the Portamento effect on (value >= 64) or off.

pub const SOSTENUTO: ControlFunction[src]

[MIDI 1.0] Same as DamperPedal (64), but only affects the notes being held while the switch transitions to on (value >= 64). Any note played while the switch is already on behaves as normal.

pub const SOFT_PEDAL: ControlFunction[src]

[GM2] Notes played while this switch is on (value >= 64) should be played at a reduced volume.

pub const LEGATO_FOOTSWITCH: ControlFunction[src]

[MIDI 1.0] This switch turns on (value >= 64) the monophonic legato response mode for that channel, where recieving a NoteOn while a note is already playing will change the pitch of the current note accordingly (without replaying the attack or re-attacking the enveloppes).

pub const HOLD_2: ControlFunction[src]

[MIDI 1.0] Additionnal controller for hold functions that don’t match the specified definition of DamperPedal (64).

pub const SOUND_CONTROLLER_1: ControlFunction[src]

[MIDI 1.0] Remappable Sound Controller, Default Name: “Sound Variation”

pub const SOUND_CONTROLLER_2: ControlFunction[src]

[MIDI 1.0] Remappable Sound Controller, Default Name: “Timbre/Harmonic Intensity”

[GM2] Sets the strength of the resonance effect for filter(s) for the specified Channel. Exact behavior is left to the manufacturer’s discretion.

pub const SOUND_CONTROLLER_3: ControlFunction[src]

[MIDI 1.0] Remappable Sound Controller, Default Name: “Release Time”

[GM2] Controls the release time of the envelope for the specified Channel. Exact behavior is left to the manufacturer’s discretion.

pub const SOUND_CONTROLLER_4: ControlFunction[src]

[MIDI 1.0] Remappable Sound Controller, Default Name: “Attack Time”

[GM2] Controls the attack time of the envelope for the specified Channel. Exact behavior is left to the manufacturer’s discretion.

pub const SOUND_CONTROLLER_5: ControlFunction[src]

[MIDI 1.0] Remappable Sound Controller, Default Name: “Brightness”

[GM2] Controls the preset cut-off frequency of the filter. Exact behavior is left to the manufacturer’s discretion.

pub const SOUND_CONTROLLER_6: ControlFunction[src]

[RP-021] Remappable Sound Controller, Default Name: “Decay Time”

[GM2] Controls the decay time of the envelope for the specified Channel. Exact behavior is left to the manufacturer’s discretion.

pub const SOUND_CONTROLLER_7: ControlFunction[src]

[RP-021] Remappable Sound Controller, Default Name: “Vibrato Rate”

[GM2] Controls the vibrato rate on the specified Channel relative to the sound’s preset rate. Exact behavior is left to the manufacturer’s discretion.

pub const SOUND_CONTROLLER_8: ControlFunction[src]

[RP-021] Remappable Sound Controller, Default Name: “Vibrato Depth”

[GM2] Controls the vibrato depth for the specified Channel. Exact behavior is left to the manufacturer’s discretion.

pub const SOUND_CONTROLLER_9: ControlFunction[src]

[RP-021] Remappable Sound Controller, Default Name: “Vibrato Delay”

[GM2] Controls the vibrato delay on the specified Channel. Exact behavior is left to the manufacturer’s discretion.

pub const SOUND_CONTROLLER_10: ControlFunction[src]

[MIDI 1.0] Remappable Sound Controller, no default

pub const GENERAL_PURPOSE_CONTROLLER_5: ControlFunction[src]

[MIDI 1.0] 1 byte general-purpose controller for device-specific features.

pub const GENERAL_PURPOSE_CONTROLLER_6: ControlFunction[src]

[MIDI 1.0] 1 byte general-purpose controller for device-specific features.

pub const GENERAL_PURPOSE_CONTROLLER_7: ControlFunction[src]

[MIDI 1.0] 1 byte general-purpose controller for device-specific features.

pub const GENERAL_PURPOSE_CONTROLLER_8: ControlFunction[src]

[MIDI 1.0] 1 byte general-purpose controller for device-specific features.

pub const PORTAMENTO_CONTROL: ControlFunction[src]

[MIDI 1.0] Specifies the starting MIDI note from which the next NoteOn will slide.

pub const UNDEFINED_85: ControlFunction[src]

pub const UNDEFINED_86: ControlFunction[src]

pub const UNDEFINED_87: ControlFunction[src]

pub const UNDEFINED_88: ControlFunction[src]

[CA-031] High Resolution Velocity Prefix

If sent before a NoteOn message, the value of this controller acts as an LSB for the velocity of that note.

pub const UNDEFINED_89: ControlFunction[src]

pub const UNDEFINED_90: ControlFunction[src]

pub const EFFECTS_1_DEPTH: ControlFunction[src]

[MIDI 1.0] General-purpose effect depth Controller (default: “External Effects Depth”)

[RP-023] No-longer general-purpose, renamed to “Reverb Send Level”

[GM2] Specifies the Reverb Send Level for that channel, linearly from 0% to 100% of amplitude.

pub const EFFECTS_2_DEPTH: ControlFunction[src]

[MIDI 1.0] General-purpose effect depth Controller (default: “Tremolo Depth”)

pub const EFFECTS_3_DEPTH: ControlFunction[src]

[MIDI 1.0] General-purpose effect depth Controller (default: “Chorus Depth”)

[RP-023] No-longer general-purpose, renamed to “Chorus Send Level”

[GM2] Specifies the Chorus Send Level for that channel, linearly from 0% to 100% of amplitude.

pub const EFFECTS_4_DEPTH: ControlFunction[src]

[MIDI 1.0] General-purpose effect depth Controller (default: “Celeste (Detune) Depth”)

pub const EFFECTS_5_DEPTH: ControlFunction[src]

[MIDI 1.0] General-purpose effect depth Controller (default: “Phaser Depth”)

pub const DATA_INCREMENT: ControlFunction[src]

[RP-018] Increments the value of a RPN/NRPN by 1, regardless of the value byte. The actual behavior depends on the parameter.

pub const DATA_DECREMENT: ControlFunction[src]

[RP-018] Decrements the value of a RPN/NRPN by 1, regardless of the value byte. The actual behavior depends on the parameter.

pub const NON_REGISTERED_PARAMETER_NUMBER_LSB: ControlFunction[src]

[MIDI 1.0] Selects a parameter to be modified by DataIncrement (96), DataDecrement (97) and DataEntry (6 & 38). Unlike RPNs, NRPNs are manufacturer-specific.

pub const NON_REGISTERED_PARAMETER_NUMBER_MSB: ControlFunction[src]

pub const REGISTERED_PARAMETER_NUMBER_LSB: ControlFunction[src]

[MIDI 1.0] Selects a parameter to be modified by DataIncrement (96), DataDecrement (97) and DataEntry (6 & 38).

[MIDI 1.0] MSB=00 LSB=00: Pitch Bend Sensitivity

Specifies the range of the pitch bender (both up and down), with the MSB value being in semitones and the LSB in cents.

[RP-018] Incrementing/decrementing this parameter changes the LSB, which wraps into the MSB at 100 cents to change it by one semitone.

[MIDI 1.0] MSB=00 LSB=01: (Channel) Fine Tuning

Specifies the note displacement from A440 in 8192ths of 100 cents, with 0x40 0x00 acting as zero, 0x00 0x00 as -8192 (-100 cents) and 0x7F 0x7F as +8191 (almost +100 cents).

[RP-018] Incrementing/decrementing this parameter changes the LSB by 1.

[MIDI 1.0] MSB=00 LSB=02: (Channel) Coarse Tuning

Specifies the note displacement from A440 in increments of 100 cents for the MSB, (the LSB is ignored), with 0x40 acting as zero, 0x00 as -64 (-64 semitones) and 0x7F as +63 (+63 semitones).

[RP-018] Incrementing/decrementing this parameter changes the MSB by 1.

[CA-026] MSB=00 LSB=05: Modulation Depth Range

[GM2] Specifies the peak value of ModulationWheel (1), with the MSB value being in semitones and the LSB being in 128ths of 100 cents.

[CA-026] Incrementing/decrementing this parameter changes the LSB by 1.

[GM2] MSB=7F LSB=7F: RPN NULL

This RPN is invalid, data entry will be ignored while this parameter is selected.

pub const REGISTERED_PARAMETER_NUMBER_MSB: ControlFunction[src]

pub const UNDEFINED_102: ControlFunction[src]

pub const UNDEFINED_103: ControlFunction[src]

pub const UNDEFINED_104: ControlFunction[src]

pub const UNDEFINED_105: ControlFunction[src]

pub const UNDEFINED_106: ControlFunction[src]

pub const UNDEFINED_107: ControlFunction[src]

pub const UNDEFINED_108: ControlFunction[src]

pub const UNDEFINED_109: ControlFunction[src]

pub const UNDEFINED_110: ControlFunction[src]

pub const UNDEFINED_111: ControlFunction[src]

pub const UNDEFINED_112: ControlFunction[src]

pub const UNDEFINED_113: ControlFunction[src]

pub const UNDEFINED_114: ControlFunction[src]

pub const UNDEFINED_115: ControlFunction[src]

pub const UNDEFINED_116: ControlFunction[src]

pub const UNDEFINED_117: ControlFunction[src]

pub const UNDEFINED_118: ControlFunction[src]

pub const UNDEFINED_119: ControlFunction[src]

pub const ALL_SOUND_OFF: ControlFunction[src]

[MIDI 1.0] Indicates that the reciever should immediately silence (without going through the release phase and ignoring sustain) all notes currently sounding on that channel. May also be used to turn off lights.

pub const RESET_ALL_CONTROLLERS: ControlFunction[src]

[MIDI 1.0] Indicates that all controllers (including pitch bend and pressure) should be reset to an ideal initial state. This message is ignored if the device is in Omni mode (mode 1 or 2).

[RP-015] Indicates that the following controllers should be reset as such: specified channel:

  • Modulation (cc1): Set to 0
  • Expression (cc11): Set to 127
  • DamperPedal (cc64): Set to 0
  • PortamentoOnOff (cc65): Set to 0
  • Sostenuto (cc66): Set to 0
  • SoftPedal (cc67): Set to 0
  • NRPN (cc98 & cc99): Set to NULL NRPN (0x7F 0x7F)
  • RPN (cc100 & cc101): Set to NULL RPN (0x7F 0x7F)

Also reset the following for the specified channel:

  • Reset pitch-bend to center (0x40 0x00)
  • Reset channel pressure to 0
  • Reset polyphonic pressure of all notes to 0

pub const LOCAL_CONTROL: ControlFunction[src]

[MIDI 1.0] Specifies whether the instrument should react to notes being physically played on it (0: ControlFunction = off, 127 = on), as opposed to notes sent via MIDI-in.

pub const ALL_NOTES_OFF: ControlFunction[src]

[MIDI 1.0] Ignored in Omni mode (mode 1 & 2). In Poly operation (mode 3), acts as a NoteOff for all notes playing on the instrument’s basic channel (it is ignored for all other channels). In Mono operation (mode 4), acts as a NoteOff for all notes playing on the specified channel. In all cases, notes being played on the instrument itself should remain unaffected.

[GM2] Turns off all Notes sounding on the specified Channel.

pub const OMNI_MODE_ON: ControlFunction[src]

[MIDI 1.0] Same as AllNotesOff (123), then set reciever to mode 1 (omni-on, poly) or 2 (omni-on, mono) based on the current mode.

[GM2] Same as AllNotesOff (123), since GM2 does not support Omni mode.

pub const OMNI_MODE_OFF: ControlFunction[src]

[MIDI 1.0] Same as AllNotesOff (123), then set reciever to mode 3 (omni-off, poly) or 4 (omni-off, mono) based on the current mode.

[GM2] Same as AllNotesOff (123), since GM2 does not support Omni mode.

pub const MONO_OPERATION: ControlFunction[src]

[MIDI 1.0] Same as AllNotesOff (123), then set reciever to mode 2 (omni-on, mono) or 4 (omni-off, mono) based on the current mode. The value byte indicates how many channels to use, with 0 being “auto”.

[GM2] Same as AllNotesOff (123), then set the channel to mode 4. Will be ignored if the value byte is not equal to 1 of if the channel is a rhythm channel.

pub const POLY_OPERATION: ControlFunction[src]

[MIDI 1.0] Same as AllNotesOff (123), then set reciever to mode 1 (omni-on, poly) or 3 (omni-off, poly) based on the current mode.

[GM2] Same as AllNotesOff (123), then set the channel to mode 3.

Trait Implementations

impl Clone for ControlFunction[src]

impl Copy for ControlFunction[src]

impl Debug for ControlFunction[src]

impl Eq for ControlFunction[src]

impl From<ControlFunction> for U7[src]

impl From<U7> for ControlFunction[src]

impl Hash for ControlFunction[src]

impl Ord for ControlFunction[src]

impl PartialEq<ControlFunction> for ControlFunction[src]

impl PartialOrd<ControlFunction> for ControlFunction[src]

impl StructuralEq for ControlFunction[src]

impl StructuralPartialEq for ControlFunction[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.