public class MetroMidiMessage extends java.lang.Object implements MetroMidiReceiver<byte[]>
Each of the constant objects has a method which name is "notifyMidiEvent". This method generates a byte array which contains MIDI message.
Since the parameters of a notifyMidiEvent method differ by the target MIDI messages of the method, we cannot define an abstract common method for the notifyMidiEvent method. Therefore, we merely defines a convention that the constant objects defined here must contain a method which name is "notifyMidiEvent".
See http://nickfever.com/music/midi-cc-list for further information about MIDI messages.
When I wrote this class, I was looking for the official specification of MIDI control change messages. But I could not find it. It seems that MIDI control change messages are implicitly defined between those commercial products and there is no officially declared specification for it.
Therefore, I referred http://nickfever.com/music/midi-cc-list.
This is a very good explanation about MIDI control change messages. But as this article is not official, this might contain mistakes.
The following table is a quotation from the site.
0 | "Bank Select" | "Allows user to switch bank for patch selection. Program change used with Bank Select. MIDI can access 16,384 patches per MIDI channel." |
1 | "Modulation" | "Generally this CC controls a vibrato effect (pitch, loudness, brightness ). What is modulated is based on the patch." |
2 | "Breath Controller" | "Often times associated with aftertouch messages. It was originally intended for use with a breath MIDI controller in which blowing harder produced higher MIDI control values. It can be used for modulation as well." |
4 | "Foot Controller" | "Often used with aftertouch messages. It can send a continuous stream of values based on how the pedal is used." |
5 | "PortamentoTime" | "Controls portamento rate to slide between 2 notes played subsequently." |
6 | "Data InitializerEntry Most Significant Bit(MSB)" | "Controls Value for NRPN or RPN parameters." |
7 | "Volume" | "Control the volume of the channel" |
8 | "Balance" | "Controls the left and right balance, generally for stereo patches.0 = hard left, 64 = center, 127 = hard right" |
10 | "Pan" | "Controls the left and right balance, generally for mono patches.0 = hard left, 64 = center, 127 = hard right" |
11 | "Expression" | "Expression is a percentage of volume (CC7)." |
12 | "Effect Controller 1" | "Usually used to control a parameter of an effect within the synth/workstation." |
13 | "Effect Controller 2" | "Usually used to control a parameter of an effect within the synth/workstation." |
64 | "Damper Pedal /Sustain Pedal" | "On/Off switch that controls sustain. (See also Sostenuto CC 66)0 to 63 = Off, 64 to 127 = On" |
65 | "Portamento On/Off Switch" | "On/Off switch0 to 63 = Off, 64 to 127 = On" |
66 | "Sostenuto On/Off Switch" | "On/Off switch – Like the Sustain controller (CC 64), However it only holds notes that were “On” when the pedal was pressed. People use it to “hold” chords” and play melodies over the held chord.0 to 63 = Off, 64 to 127 = On" |
67 | "Soft Pedal On/Off Switch" | "On/Off switch- Lowers the volume of notes played.0 to 63 = Off, 64 to 127 = On" |
68 | "Legato FootSwitch" | "On/Off switch- Turns Legato effect between 2 subsequent notes On or Off.0 to 63 = Off, 64 to 127 = On" |
69 | "Hold 2" | "Another way to “hold notes” (see MIDI CC 64 and MIDI CC 66). However notes fade out according to their release parameter rather than when the pedal is released." |
70 | "Sound Controller 1" | "Usually controls the way a sound is produced. Default = Sound Variation." |
71 | "Sound Controller 2" | "Allows shaping the Voltage Controlled Filter (VCF). Default = Resonance -also(Timbre or Harmonics)" |
72 | "Sound Controller 3" | "Controls release time of the Voltage controlled Amplifier (VCA). Default = Release Time." |
73 | "Sound Controller 4" | "Controls the “Attack’ of a sound. The attack is the amount of time it takes forthe sound to reach maximum amplitude." |
74 | "Sound Controller 5" | "Controls VCFs cutoff frequency of the filter." |
75 | "Sound Controller 6" | "Generic – Some manufacturers may use to further shave their sounds." |
76 | "Sound Controller 7" | "Generic – Some manufacturers may use to further shave their sounds." |
77 | "Sound Controller 8" | "Generic – Some manufacturers may use to further shave their sounds." |
78 | "Sound Controller 9" | "Generic – Some manufacturers may use to further shave their sounds." |
79 | "Sound Controller 10" | "Generic – Some manufacturers may use to further shave their sounds." |
80 | "General PurposeMIDI CC Controller" | "GenericOn/Off switch0 to 63 = Off, 64 to 127 = On" |
81 | "General Purpose MIDI CC Controller" | "GenericOn/Off switch0 to 63 = Off, 64 to 127 = On" |
82 | "General PurposeMIDI CC Controller" | "GenericOn/Off switch0 to 63 = Off, 64 to 127 = On" |
83 | "General Purpose MIDI CC Controller" | "GenericOn/Off switch0 to 63 = Off, 64 to 127 = On" |
84 | "Portamento CC Control" | "Controls the amount of Portamento." |
91 | "Effect 1 Depth" | "Usually controls reverb send amount" |
92 | "Effect 2 Depth" | "Usually controls tremolo amount" |
93 | "Effect 3 Depth" | "Usually controls chorus amount" |
94 | "Effect 4 Depth" | "Usually controls detune amount" |
95 | "Effect 5 Depth" | "Usually controls phaser amount" |
96 | "(+1) Data Increment" | "Usually used to increment data for RPN and NRPN messages." |
97 | "(-1) Data Decrement" | "Usually used to decrement data for RPN and NRPN messages." |
98 | "Non-Registered Parameter Number LSB (NRPN)" | "For controllers 6, 38, 96, and 97, it selects the NRPN parameter." |
99 | "Non-Registered Parameter Number MSB (NRPN)" | "For controllers 6, 38, 96, and 97, it selects the NRPN parameter." |
100 | "Registered Parameter Number LSB (RPN)" | "For controllers 6, 38, 96, and 97, it selects the RPN parameter." |
101 | "Registered Parameter Number MSB (RPN)" | "For controllers 6, 38, 96, and 97, it selects the RPN parameter." |
3 | Undefined | |
9 | Undefined | |
14 | Undefined | |
15 | Undefined | |
16 – 19 | General Purpose | |
20 – 31 | Undefined | |
32 – 63 | Controller 0-31 Least Significant Bit (LSB) | |
85 – 90 | Undefined | |
102 – 119 | Undefined | |
120 to 127 are “Channel Mode Messages.” | ||
120 | All Sound Off | Mutes all sounding notes. It does so regardless of release time or sustain. (See MIDI CC 123) |
121 | Reset All Controllers | It will reset all controllers to their default. |
122 | Local On/Off Switch | Turns internal connection of a MIDI keyboard/workstation, etc. On or Off. If you use a computer, you will most likely want local control off to avoid notes being played twice. Once locally and twice whent the note is sent back from the computer to your keyboard. |
123 | All Notes Off | Mutes all sounding notes. Release time will still be maintained, and notes held by sustain will not turn off until sustain pedal is depressed. |
124 | Omni Mode Off | Sets to “Omni Off” mode. |
125 | Omni Mode On | Sets to “Omni On” mode. |
126 | Mono Mode | Sets device mode to Monophonic. |
127 | Poly Mode | Sets device mode to Polyphonic. |
MetroMidiReceiver.Default<T>, MetroMidiReceiver.Formatter<T>, MetroMidiReceiver.LoggingToError
Modifier and Type | Method and Description |
---|---|
byte[] |
cc_allNoteOff(int channel) |
byte[] |
cc_allSoundOff(int channel) |
byte[] |
cc_balance(int channel,
int controlValue) |
byte[] |
cc_bankSelect(int channel,
int controlValue) |
byte[] |
cc_breathController(int channel,
int controlValue) |
byte[] |
cc_dataDecrement(int channel,
int controlValue) |
byte[] |
cc_dataEntryMsb(int channel,
int controlValue) |
byte[] |
cc_dataIncrement(int channel,
int controlValue) |
byte[] |
cc_effect1(int channel,
int controlValue) |
byte[] |
cc_effect2(int channel,
int controlValue) |
byte[] |
cc_effect3(int channel,
int controlValue) |
byte[] |
cc_effect4(int channel,
int controlValue) |
byte[] |
cc_effect5(int channel,
int controlValue) |
byte[] |
cc_effectController1(int channel,
int controlValue) |
byte[] |
cc_effectController2(int channel,
int controlValue) |
byte[] |
cc_expression(int channel,
int controlValue) |
byte[] |
cc_footController(int channel,
int controlValue) |
byte[] |
cc_generalPurpose01(int channel,
int controlValue) |
byte[] |
cc_generalPurpose02(int channel,
int controlValue) |
byte[] |
cc_generalPurpose03(int channel,
int controlValue) |
byte[] |
cc_generalPurpose04(int channel,
int controlValue) |
byte[] |
cc_hold2(int channel,
int controlValue) |
byte[] |
cc_legatoSwitch(int channel,
int controlValue) |
byte[] |
cc_localControls(int channel,
boolean value) |
byte[] |
cc_modulation(int channel,
int controlValue) |
byte[] |
cc_monoModeOn(int channel) |
byte[] |
cc_nrpnLsb(int channel,
int controlValue) |
byte[] |
cc_nrpnMsb(int channel,
int controlValue) |
byte[] |
cc_omniModeOff(int channel) |
byte[] |
cc_omniModeOn(int channel) |
byte[] |
cc_pan(int channel,
int controlValue) |
byte[] |
cc_pedalSwitch(int channel,
int controlValue) |
byte[] |
cc_polyModeOn(int channel) |
byte[] |
cc_portamento(int channel,
int controlValue) |
byte[] |
cc_portamentoSwitch(int channel,
int controlValue) |
byte[] |
cc_portamentoTime(int channel,
int controlValue) |
byte[] |
cc_resetAllControllers(int channel) |
byte[] |
cc_rpnLsb(int channel,
int controlValue) |
byte[] |
cc_rpnMsb(int channel,
int controlValue) |
byte[] |
cc_sostenutoSwitch(int channel,
int controlValue) |
byte[] |
cc_soundController1(int channel,
int controlValue) |
byte[] |
cc_soundController10(int channel,
int controlValue) |
byte[] |
cc_soundController2(int channel,
int controlValue) |
byte[] |
cc_soundController3(int channel,
int controlValue) |
byte[] |
cc_soundController4(int channel,
int controlValue) |
byte[] |
cc_soundController5(int channel,
int controlValue) |
byte[] |
cc_soundController6(int channel,
int controlValue) |
byte[] |
cc_soundController7(int channel,
int controlValue) |
byte[] |
cc_soundController8(int channel,
int controlValue) |
byte[] |
cc_soundController9(int channel,
int controlValue) |
byte[] |
cc_sustainPedal(int channel,
int controlValue) |
byte[] |
cc_volume(int channel,
int controlValue) |
byte[] |
channelPressure(int channel,
double value) |
byte[] |
channelPressure(int channel,
int value) |
byte[] |
clock() |
byte[] |
cont() |
byte[] |
controlChange(int channel,
int controlNumber,
int controlValue) |
byte[] |
end() |
boolean |
endCalled() |
byte[] |
endOfExclusive() |
byte[] |
error(java.lang.String string) |
static MetroMidiMessage |
getInstance() |
byte[] |
keyPressure(int channel,
int note,
double value) |
byte[] |
keyPressure(int channel,
int note,
int value) |
byte[] |
noteOff(int channel,
int note,
double velocity) |
byte[] |
noteOff(int channel,
int note,
int velocity) |
byte[] |
noteOn(int channel,
int note,
double velocity) |
byte[] |
noteOn(int channel,
int note,
int velocity) |
byte[] |
pitchBend(int channel,
double value) |
byte[] |
pitchBend(int channel,
int value) |
byte[] |
programChange(int channel,
int value) |
byte[] |
reset() |
byte[] |
songPositionPointer(int value) |
byte[] |
songSelect(int value) |
byte[] |
start() |
byte[] |
stop() |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
voidValue
public static final int CC_ALL_SOUND_OFF
public static final int CC_RESET_ALL_CONTROLLERS
public static final int CC_LOCAL_CONTROLS
public static final int CC_ALL_NOTE_OFF
public static final int CC_OMNI_MODE_OFF
public static final int CC_OMNI_MODE_ON
public static final int CC_MONO_MODE_ON
public static final int CC_POLY_MODE_ON
public static final int CC_BANK_SELECT
public static final int CC_MODULATION
public static final int CC_BREATH_CTRL
public static final int CC_FOOT_CTRL
public static final int CC_PORTAMENTO_TIME
public static final int CC_DATA_ENTRY_MSB
public static final int CC_VOLUME
public static final int CC_BALANCE
public static final int CC_PAN
public static final int CC_EXPRESSION
public static final int CC_EFFECT_CTRL_1
public static final int CC_EFFECT_CTRL_2
public static final int CC_SUSTAIN_PEDAL
public static final int CC_PORTAMENTO_SWITCH
public static final int CC_SOSTENUTO_SWITCH
public static final int CC_SOFT_PEDAL_SWITCH
public static final int CC_LEGATO_FOOTSWITCH
public static final int CC_HOLD_2
public static final int CC_SOUND_CTRL_01
public static final int CC_SOUND_CTRL_02
public static final int CC_SOUND_CTRL_03
public static final int CC_SOUND_CTRL_04
public static final int CC_SOUND_CTRL_05
public static final int CC_SOUND_CTRL_06
public static final int CC_SOUND_CTRL_07
public static final int CC_SOUND_CTRL_08
public static final int CC_SOUND_CTRL_09
public static final int CC_SOUND_CTRL_10
public static final int CC_GENERAL_PURPOSE_01
public static final int CC_GENERAL_PURPOSE_02
public static final int CC_GENERAL_PURPOSE_03
public static final int CC_GENERAL_PURPOSE_04
public static final int CC_PORTAMENTO_CC_CTRL
public static final int CC_EFFECT_1_DEPTH
public static final int CC_EFFECT_2_DEPTH
public static final int CC_EFFECT_3_DEPTH
public static final int CC_EFFECT_4_DEPTH
public static final int CC_EFFECT_5_DEPTH
public static final int CC_DATA_INCREMENT
public static final int CC_DATA_DECREMENT
public static final int CC_NRPN_LSB
public static final int CC_NRPN_MSB
public static final int CC_RPN_LSB
public static final int CC_RPN_MSB
public static MetroMidiMessage getInstance()
public boolean endCalled()
endCalled
in interface MetroMidiReceiver<byte[]>
public byte[] end()
end
in interface MetroMidiReceiver<byte[]>
public byte[] error(java.lang.String string)
error
in interface MetroMidiReceiver<byte[]>
public byte[] noteOn(int channel, int note, double velocity)
noteOn
in interface MetroMidiReceiver<byte[]>
public byte[] noteOn(int channel, int note, int velocity)
noteOn
in interface MetroMidiReceiver<byte[]>
public byte[] noteOff(int channel, int note, double velocity)
noteOff
in interface MetroMidiReceiver<byte[]>
public byte[] noteOff(int channel, int note, int velocity)
noteOff
in interface MetroMidiReceiver<byte[]>
public byte[] keyPressure(int channel, int note, double value)
keyPressure
in interface MetroMidiReceiver<byte[]>
public byte[] keyPressure(int channel, int note, int value)
keyPressure
in interface MetroMidiReceiver<byte[]>
public byte[] controlChange(int channel, int controlNumber, int controlValue)
controlChange
in interface MetroMidiReceiver<byte[]>
public byte[] programChange(int channel, int value)
programChange
in interface MetroMidiReceiver<byte[]>
public byte[] channelPressure(int channel, double value)
channelPressure
in interface MetroMidiReceiver<byte[]>
public byte[] channelPressure(int channel, int value)
channelPressure
in interface MetroMidiReceiver<byte[]>
public byte[] pitchBend(int channel, double value)
pitchBend
in interface MetroMidiReceiver<byte[]>
public byte[] pitchBend(int channel, int value)
pitchBend
in interface MetroMidiReceiver<byte[]>
public byte[] cc_allSoundOff(int channel)
cc_allSoundOff
in interface MetroMidiReceiver<byte[]>
public byte[] cc_resetAllControllers(int channel)
cc_resetAllControllers
in interface MetroMidiReceiver<byte[]>
public byte[] cc_localControls(int channel, boolean value)
cc_localControls
in interface MetroMidiReceiver<byte[]>
public byte[] cc_allNoteOff(int channel)
cc_allNoteOff
in interface MetroMidiReceiver<byte[]>
public byte[] cc_omniModeOff(int channel)
cc_omniModeOff
in interface MetroMidiReceiver<byte[]>
public byte[] cc_omniModeOn(int channel)
cc_omniModeOn
in interface MetroMidiReceiver<byte[]>
public byte[] cc_monoModeOn(int channel)
cc_monoModeOn
in interface MetroMidiReceiver<byte[]>
public byte[] cc_polyModeOn(int channel)
cc_polyModeOn
in interface MetroMidiReceiver<byte[]>
public byte[] songPositionPointer(int value)
songPositionPointer
in interface MetroMidiReceiver<byte[]>
public byte[] songSelect(int value)
songSelect
in interface MetroMidiReceiver<byte[]>
public byte[] endOfExclusive()
endOfExclusive
in interface MetroMidiReceiver<byte[]>
public byte[] clock()
clock
in interface MetroMidiReceiver<byte[]>
public byte[] start()
start
in interface MetroMidiReceiver<byte[]>
public byte[] cont()
cont
in interface MetroMidiReceiver<byte[]>
public byte[] stop()
stop
in interface MetroMidiReceiver<byte[]>
public byte[] reset()
reset
in interface MetroMidiReceiver<byte[]>
public byte[] cc_bankSelect(int channel, int controlValue)
cc_bankSelect
in interface MetroMidiReceiver<byte[]>
public byte[] cc_modulation(int channel, int controlValue)
cc_modulation
in interface MetroMidiReceiver<byte[]>
public byte[] cc_breathController(int channel, int controlValue)
cc_breathController
in interface MetroMidiReceiver<byte[]>
public byte[] cc_footController(int channel, int controlValue)
cc_footController
in interface MetroMidiReceiver<byte[]>
public byte[] cc_portamentoTime(int channel, int controlValue)
cc_portamentoTime
in interface MetroMidiReceiver<byte[]>
public byte[] cc_dataEntryMsb(int channel, int controlValue)
cc_dataEntryMsb
in interface MetroMidiReceiver<byte[]>
public byte[] cc_volume(int channel, int controlValue)
cc_volume
in interface MetroMidiReceiver<byte[]>
public byte[] cc_balance(int channel, int controlValue)
cc_balance
in interface MetroMidiReceiver<byte[]>
public byte[] cc_pan(int channel, int controlValue)
cc_pan
in interface MetroMidiReceiver<byte[]>
public byte[] cc_expression(int channel, int controlValue)
cc_expression
in interface MetroMidiReceiver<byte[]>
public byte[] cc_effectController1(int channel, int controlValue)
cc_effectController1
in interface MetroMidiReceiver<byte[]>
public byte[] cc_effectController2(int channel, int controlValue)
cc_effectController2
in interface MetroMidiReceiver<byte[]>
public byte[] cc_sustainPedal(int channel, int controlValue)
cc_sustainPedal
in interface MetroMidiReceiver<byte[]>
public byte[] cc_portamentoSwitch(int channel, int controlValue)
cc_portamentoSwitch
in interface MetroMidiReceiver<byte[]>
public byte[] cc_sostenutoSwitch(int channel, int controlValue)
cc_sostenutoSwitch
in interface MetroMidiReceiver<byte[]>
public byte[] cc_pedalSwitch(int channel, int controlValue)
cc_pedalSwitch
in interface MetroMidiReceiver<byte[]>
public byte[] cc_legatoSwitch(int channel, int controlValue)
cc_legatoSwitch
in interface MetroMidiReceiver<byte[]>
public byte[] cc_hold2(int channel, int controlValue)
cc_hold2
in interface MetroMidiReceiver<byte[]>
public byte[] cc_soundController1(int channel, int controlValue)
cc_soundController1
in interface MetroMidiReceiver<byte[]>
public byte[] cc_soundController2(int channel, int controlValue)
cc_soundController2
in interface MetroMidiReceiver<byte[]>
public byte[] cc_soundController3(int channel, int controlValue)
cc_soundController3
in interface MetroMidiReceiver<byte[]>
public byte[] cc_soundController4(int channel, int controlValue)
cc_soundController4
in interface MetroMidiReceiver<byte[]>
public byte[] cc_soundController5(int channel, int controlValue)
cc_soundController5
in interface MetroMidiReceiver<byte[]>
public byte[] cc_soundController6(int channel, int controlValue)
cc_soundController6
in interface MetroMidiReceiver<byte[]>
public byte[] cc_soundController7(int channel, int controlValue)
cc_soundController7
in interface MetroMidiReceiver<byte[]>
public byte[] cc_soundController8(int channel, int controlValue)
cc_soundController8
in interface MetroMidiReceiver<byte[]>
public byte[] cc_soundController9(int channel, int controlValue)
cc_soundController9
in interface MetroMidiReceiver<byte[]>
public byte[] cc_soundController10(int channel, int controlValue)
cc_soundController10
in interface MetroMidiReceiver<byte[]>
public byte[] cc_generalPurpose01(int channel, int controlValue)
cc_generalPurpose01
in interface MetroMidiReceiver<byte[]>
public byte[] cc_generalPurpose02(int channel, int controlValue)
cc_generalPurpose02
in interface MetroMidiReceiver<byte[]>
public byte[] cc_generalPurpose03(int channel, int controlValue)
cc_generalPurpose03
in interface MetroMidiReceiver<byte[]>
public byte[] cc_generalPurpose04(int channel, int controlValue)
cc_generalPurpose04
in interface MetroMidiReceiver<byte[]>
public byte[] cc_portamento(int channel, int controlValue)
cc_portamento
in interface MetroMidiReceiver<byte[]>
public byte[] cc_effect1(int channel, int controlValue)
cc_effect1
in interface MetroMidiReceiver<byte[]>
public byte[] cc_effect2(int channel, int controlValue)
cc_effect2
in interface MetroMidiReceiver<byte[]>
public byte[] cc_effect3(int channel, int controlValue)
cc_effect3
in interface MetroMidiReceiver<byte[]>
public byte[] cc_effect4(int channel, int controlValue)
cc_effect4
in interface MetroMidiReceiver<byte[]>
public byte[] cc_effect5(int channel, int controlValue)
cc_effect5
in interface MetroMidiReceiver<byte[]>
public byte[] cc_dataIncrement(int channel, int controlValue)
cc_dataIncrement
in interface MetroMidiReceiver<byte[]>
public byte[] cc_dataDecrement(int channel, int controlValue)
cc_dataDecrement
in interface MetroMidiReceiver<byte[]>
public byte[] cc_nrpnLsb(int channel, int controlValue)
cc_nrpnLsb
in interface MetroMidiReceiver<byte[]>
public byte[] cc_nrpnMsb(int channel, int controlValue)
cc_nrpnMsb
in interface MetroMidiReceiver<byte[]>
public byte[] cc_rpnLsb(int channel, int controlValue)
cc_rpnLsb
in interface MetroMidiReceiver<byte[]>
public byte[] cc_rpnMsb(int channel, int controlValue)
cc_rpnMsb
in interface MetroMidiReceiver<byte[]>