pub struct ControlFunction(pub U7);Expand description
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 continuous 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”.
Tuple Fields§
§0: U7Implementations§
Source§impl ControlFunction
impl ControlFunction
pub const MIN: ControlFunction
pub const MAX: ControlFunction
Sourcepub const BANK_SELECT: ControlFunction
pub const BANK_SELECT: ControlFunction
[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.
Sourcepub const MODULATION_WHEEL: ControlFunction
pub const MODULATION_WHEEL: ControlFunction
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.
Sourcepub const BREATH_CONTROLLER: ControlFunction
pub const BREATH_CONTROLLER: ControlFunction
Effect was never standardized
pub const UNDEFINED_3: ControlFunction
Sourcepub const FOOT_CONTROLLER: ControlFunction
pub const FOOT_CONTROLLER: ControlFunction
Effect was never standardized
Sourcepub const PORTAMENTO_TIME: ControlFunction
pub const PORTAMENTO_TIME: ControlFunction
[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.
Sourcepub const DATA_ENTRY_MSB: ControlFunction
pub const DATA_ENTRY_MSB: ControlFunction
[MIDI 1.0] Sets the value of the last selected RPN/NRPN.
Sourcepub const CHANNEL_VOLUME: ControlFunction
pub const CHANNEL_VOLUME: ControlFunction
[MIDI 1.0] Specifies the mixing volume for that channel.
[GM1] The gain in dB should be equivalent to L = 40 * log10(cc7/127).
Sourcepub const BALANCE: ControlFunction
pub const BALANCE: ControlFunction
[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
Sourcepub const PAN: ControlFunction
pub const PAN: ControlFunction
[MIDI 1.0] Specifies the sound location (in stereo) balance for that channel. Center is 64, left is 0 and right is 127.
Sourcepub const EXPRESSION_CONTROLLER: ControlFunction
pub const EXPRESSION_CONTROLLER: ControlFunction
[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
pub const EFFECT_CONTROL_2: ControlFunction
pub const UNDEFINED_14: ControlFunction
pub const UNDEFINED_15: ControlFunction
Sourcepub const GENERAL_PURPOSE_CONTROLLER_1: ControlFunction
pub const GENERAL_PURPOSE_CONTROLLER_1: ControlFunction
[MIDI 1.0] 2 bytes general-purpose controller for device-specific features.
Sourcepub const GENERAL_PURPOSE_CONTROLLER_2: ControlFunction
pub const GENERAL_PURPOSE_CONTROLLER_2: ControlFunction
[MIDI 1.0] 2 bytes general-purpose controller for device-specific features.
Sourcepub const GENERAL_PURPOSE_CONTROLLER_3: ControlFunction
pub const GENERAL_PURPOSE_CONTROLLER_3: ControlFunction
[MIDI 1.0] 2 bytes general-purpose controller for device-specific features.
Sourcepub const GENERAL_PURPOSE_CONTROLLER_4: ControlFunction
pub const GENERAL_PURPOSE_CONTROLLER_4: ControlFunction
[MIDI 1.0] 2 bytes general-purpose controller for device-specific features.
pub const UNDEFINED_20: ControlFunction
pub const UNDEFINED_21: ControlFunction
pub const UNDEFINED_22: ControlFunction
pub const UNDEFINED_23: ControlFunction
pub const UNDEFINED_24: ControlFunction
pub const UNDEFINED_25: ControlFunction
pub const UNDEFINED_26: ControlFunction
pub const UNDEFINED_27: ControlFunction
pub const UNDEFINED_28: ControlFunction
pub const UNDEFINED_29: ControlFunction
pub const UNDEFINED_30: ControlFunction
pub const UNDEFINED_31: ControlFunction
pub const BANK_SELECT_LSB: ControlFunction
pub const MODULATION_WHEEL_LSB: ControlFunction
pub const BREATH_CONTROLLER_LSB: ControlFunction
pub const UNDEFINED_3_LSB: ControlFunction
pub const FOOT_CONTROLLER_LSB: ControlFunction
pub const PORTAMENTO_TIME_LSB: ControlFunction
Sourcepub const DATA_ENTRY_LSB: ControlFunction
pub const DATA_ENTRY_LSB: ControlFunction
[MIDI 1.0] Sets the value of the last selected RPN/NRPN
pub const CHANNEL_VOLUME_LSB: ControlFunction
pub const BALANCE_LSB: ControlFunction
pub const UNDEFINED_9_LSB: ControlFunction
pub const PAN_LSB: ControlFunction
pub const EXPRESSION_CONTROLLER_LSB: ControlFunction
pub const EFFECT_CONTROL_1_LSB: ControlFunction
pub const EFFECT_CONTROL_2_LSB: ControlFunction
pub const UNDEFINED_14_LSB: ControlFunction
pub const UNDEFINED_15_LSB: ControlFunction
pub const GENERAL_PURPOSE_CONTROLLER_1_LSB: ControlFunction
pub const GENERAL_PURPOSE_CONTROLLER_2_LSB: ControlFunction
pub const GENERAL_PURPOSE_CONTROLLER_3_LSB: ControlFunction
pub const GENERAL_PURPOSE_CONTROLLER_4_LSB: ControlFunction
pub const UNDEFINED_20_LSB: ControlFunction
pub const UNDEFINED_21_LSB: ControlFunction
pub const UNDEFINED_22_LSB: ControlFunction
pub const UNDEFINED_23_LSB: ControlFunction
pub const UNDEFINED_24_LSB: ControlFunction
pub const UNDEFINED_25_LSB: ControlFunction
pub const UNDEFINED_26_LSB: ControlFunction
pub const UNDEFINED_27_LSB: ControlFunction
pub const UNDEFINED_28_LSB: ControlFunction
pub const UNDEFINED_29_LSB: ControlFunction
pub const UNDEFINED_30_LSB: ControlFunction
pub const UNDEFINED_31_LSB: ControlFunction
Sourcepub const DAMPER_PEDAL: ControlFunction
pub const DAMPER_PEDAL: ControlFunction
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.
Sourcepub const PORTAMENTO_ON_OFF: ControlFunction
pub const PORTAMENTO_ON_OFF: ControlFunction
[MIDI 1.0] Turns the Portamento effect on (value >= 64) or off.
Sourcepub const SOSTENUTO: ControlFunction
pub const SOSTENUTO: ControlFunction
[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.
Sourcepub const SOFT_PEDAL: ControlFunction
pub const SOFT_PEDAL: ControlFunction
[GM2] Notes played while this switch is on (value >= 64) should be played at a reduced volume.
Sourcepub const LEGATO_FOOTSWITCH: ControlFunction
pub const LEGATO_FOOTSWITCH: ControlFunction
[MIDI 1.0] This switch turns on (value >= 64) the monophonic legato response mode for that channel, where receiving 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 envelopes).
Sourcepub const HOLD_2: ControlFunction
pub const HOLD_2: ControlFunction
[MIDI 1.0] Additional controller for hold functions that don’t match the specified definition of DamperPedal (64).
Sourcepub const SOUND_CONTROLLER_1: ControlFunction
pub const SOUND_CONTROLLER_1: ControlFunction
[MIDI 1.0] Remappable Sound Controller, Default Name: “Sound Variation”
Sourcepub const SOUND_CONTROLLER_2: ControlFunction
pub const SOUND_CONTROLLER_2: ControlFunction
[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.
Sourcepub const SOUND_CONTROLLER_3: ControlFunction
pub const SOUND_CONTROLLER_3: ControlFunction
[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.
Sourcepub const SOUND_CONTROLLER_4: ControlFunction
pub const SOUND_CONTROLLER_4: ControlFunction
[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.
Sourcepub const SOUND_CONTROLLER_5: ControlFunction
pub const SOUND_CONTROLLER_5: ControlFunction
[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.
Sourcepub const SOUND_CONTROLLER_6: ControlFunction
pub const SOUND_CONTROLLER_6: ControlFunction
[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.
Sourcepub const SOUND_CONTROLLER_7: ControlFunction
pub const SOUND_CONTROLLER_7: ControlFunction
[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.
Sourcepub const SOUND_CONTROLLER_8: ControlFunction
pub const SOUND_CONTROLLER_8: ControlFunction
[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.
Sourcepub const SOUND_CONTROLLER_9: ControlFunction
pub const SOUND_CONTROLLER_9: ControlFunction
[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.
Sourcepub const SOUND_CONTROLLER_10: ControlFunction
pub const SOUND_CONTROLLER_10: ControlFunction
[MIDI 1.0] Remappable Sound Controller, no default
Sourcepub const GENERAL_PURPOSE_CONTROLLER_5: ControlFunction
pub const GENERAL_PURPOSE_CONTROLLER_5: ControlFunction
[MIDI 1.0] 1 byte general-purpose controller for device-specific features.
Sourcepub const GENERAL_PURPOSE_CONTROLLER_6: ControlFunction
pub const GENERAL_PURPOSE_CONTROLLER_6: ControlFunction
[MIDI 1.0] 1 byte general-purpose controller for device-specific features.
Sourcepub const GENERAL_PURPOSE_CONTROLLER_7: ControlFunction
pub const GENERAL_PURPOSE_CONTROLLER_7: ControlFunction
[MIDI 1.0] 1 byte general-purpose controller for device-specific features.
Sourcepub const GENERAL_PURPOSE_CONTROLLER_8: ControlFunction
pub const GENERAL_PURPOSE_CONTROLLER_8: ControlFunction
[MIDI 1.0] 1 byte general-purpose controller for device-specific features.
Sourcepub const PORTAMENTO_CONTROL: ControlFunction
pub const PORTAMENTO_CONTROL: ControlFunction
[MIDI 1.0] Specifies the starting MIDI note from which the next NoteOn will slide.
pub const UNDEFINED_85: ControlFunction
pub const UNDEFINED_86: ControlFunction
pub const UNDEFINED_87: ControlFunction
Sourcepub const UNDEFINED_88: ControlFunction
pub const UNDEFINED_88: ControlFunction
[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
pub const UNDEFINED_90: ControlFunction
Sourcepub const EFFECTS_1_DEPTH: ControlFunction
pub const EFFECTS_1_DEPTH: ControlFunction
[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.
Sourcepub const EFFECTS_2_DEPTH: ControlFunction
pub const EFFECTS_2_DEPTH: ControlFunction
[MIDI 1.0] General-purpose effect depth Controller (default: “Tremolo Depth”)
Sourcepub const EFFECTS_3_DEPTH: ControlFunction
pub const EFFECTS_3_DEPTH: ControlFunction
[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.
Sourcepub const EFFECTS_4_DEPTH: ControlFunction
pub const EFFECTS_4_DEPTH: ControlFunction
[MIDI 1.0] General-purpose effect depth Controller (default: “Celeste (Detune) Depth”)
Sourcepub const EFFECTS_5_DEPTH: ControlFunction
pub const EFFECTS_5_DEPTH: ControlFunction
[MIDI 1.0] General-purpose effect depth Controller (default: “Phaser Depth”)
Sourcepub const DATA_INCREMENT: ControlFunction
pub const DATA_INCREMENT: ControlFunction
[RP-018] Increments the value of a RPN/NRPN by 1, regardless of the value byte. The actual behavior depends on the parameter.
Sourcepub const DATA_DECREMENT: ControlFunction
pub const DATA_DECREMENT: ControlFunction
[RP-018] Decrements the value of a RPN/NRPN by 1, regardless of the value byte. The actual behavior depends on the parameter.
Sourcepub const NON_REGISTERED_PARAMETER_NUMBER_LSB: ControlFunction
pub const NON_REGISTERED_PARAMETER_NUMBER_LSB: ControlFunction
[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
Sourcepub const REGISTERED_PARAMETER_NUMBER_LSB: ControlFunction
pub const REGISTERED_PARAMETER_NUMBER_LSB: ControlFunction
[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
pub const UNDEFINED_102: ControlFunction
pub const UNDEFINED_103: ControlFunction
pub const UNDEFINED_104: ControlFunction
pub const UNDEFINED_105: ControlFunction
pub const UNDEFINED_106: ControlFunction
pub const UNDEFINED_107: ControlFunction
pub const UNDEFINED_108: ControlFunction
pub const UNDEFINED_109: ControlFunction
pub const UNDEFINED_110: ControlFunction
pub const UNDEFINED_111: ControlFunction
pub const UNDEFINED_112: ControlFunction
pub const UNDEFINED_113: ControlFunction
pub const UNDEFINED_114: ControlFunction
pub const UNDEFINED_115: ControlFunction
pub const UNDEFINED_116: ControlFunction
pub const UNDEFINED_117: ControlFunction
pub const UNDEFINED_118: ControlFunction
pub const UNDEFINED_119: ControlFunction
Sourcepub const ALL_SOUND_OFF: ControlFunction
pub const ALL_SOUND_OFF: ControlFunction
[MIDI 1.0] Indicates that the receiver 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.
Sourcepub const RESET_ALL_CONTROLLERS: ControlFunction
pub const RESET_ALL_CONTROLLERS: ControlFunction
[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
Sourcepub const LOCAL_CONTROL: ControlFunction
pub const LOCAL_CONTROL: ControlFunction
[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.
Sourcepub const ALL_NOTES_OFF: ControlFunction
pub const ALL_NOTES_OFF: ControlFunction
[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.
Sourcepub const OMNI_MODE_ON: ControlFunction
pub const OMNI_MODE_ON: ControlFunction
[MIDI 1.0] Same as AllNotesOff (123), then set receiver 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.
Sourcepub const OMNI_MODE_OFF: ControlFunction
pub const OMNI_MODE_OFF: ControlFunction
[MIDI 1.0] Same as AllNotesOff (123), then set receiver 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.
Sourcepub const MONO_OPERATION: ControlFunction
pub const MONO_OPERATION: ControlFunction
[MIDI 1.0] Same as AllNotesOff (123), then set receiver 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.
Sourcepub const POLY_OPERATION: ControlFunction
pub const POLY_OPERATION: ControlFunction
[MIDI 1.0] Same as AllNotesOff (123), then set receiver 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§
Source§impl Clone for ControlFunction
impl Clone for ControlFunction
Source§fn clone(&self) -> ControlFunction
fn clone(&self) -> ControlFunction
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more