-
Notifications
You must be signed in to change notification settings - Fork 98
MIDI Implementation
MiniDexed recognises the following MIDI commands (taken from the source file: https://github.com/probonopd/MiniDexed/blob/main/src/mididevice.cpp).
All channel voice messages will act on a specific MIDI channel and will thus apply to any Tone Generators (TGs) listening on that specific MIDI channel and any TGs in MIDI OMNI Mode.
MIDI Command | Hex | Values | Notes |
---|---|---|---|
Note Off | 0x80 | 0..127 | |
Note On | 0x90 | 0..127 | |
Control Change | 0xB0 | Various | See table below |
Program Change | 0xC0 | 0..127 | Only if MIDIRXProgramChange=1 in minidexed.ini. Responds to 0..127 if ExpandPCAcrossBanks=1 Responds to 0..31 if ExpandPCAcrossBanks=0 Can be configured to correspond to either voices or performances depending on the PerformanceSelectChannel (or PCCH in the Performance menu) setting. (More details here) |
Pitch Bend | 0xE0 | 0..16383 | |
Aftertouch | 0xD0 | 0..127 |
All channel control change messages will act on a specific MIDI channel and will thus apply to any Tone Generators (TGs) listening on that specific MIDI channel and any TGs in MIDI OMNI Mode.
MIDI CC | Decimal | Hex | Values | Notes |
---|---|---|---|---|
Bank Select (MSB) | CC#00 | 0x00 | 0..127 | Most significant 7-bits of the 14-bit bank number (0..16383). When received it is saved until a BANKSEL LSB is received. Can be configured to correspond to either voice or performance banks depending on the PerformanceSelectChannel or PCCH (see above). |
Mod Wheel | CC#01 | 0x01 | 0..127 | |
Breath Control | CC#02 | 0x02 | 0..127 | |
Foot Control | CC#04 | 0x04 | 0..127 | |
Channel Volume | CC#07 | 0x07 | 0..127 | Local volume for a specific MIDI channel |
Pan | CC#10 | 0x0A | 0..127 | |
Expression | CC#11 | 0x0B | 0..127 | Acts as a modulator for channel volume (or optionally system volume - see MIDIGlobalExpression). |
Bank Select (LSB) | CC#32 | 0x20 | 0..127 | Least significant 7-bits of the 14-bit bank number (0..16383) (see Voice Data Syx Files). Note the bank is changed as soon as the LSB is received using whatever MSB is remembered from the last MSB received (or 0 if no MSB was sent). |
Sustain | CC#64 | 0x40 | 0..127 | <=63 = OFF; >=64 = ON |
Sound Controller 2 | CC#71 | 0x47 | 0..127 | Filter resonance |
Sound Controller 5 | CC#74 | 0x4A | 0..127 | Filter cut-off |
Effects 1 Depth | CC#91 | 0x5B | 0..127 | Reverb level |
Effects 4 Depth | CC#94 | 0x5E | 0..127 | Detune |
All sound off | CC#120 | 0x78 | 0 | |
All notes off | CC#123 | 0x7B | 0 |
When in performance mode (i.e. all TGs are responding to the same MIDI channel) there is an option to provide control of the volume, pan and detune settings of each individual tone generator over MIDI.
Each parameter requires 8 MIDI CC values (one per tone generator) and several fixed CC maps are possible for use as shown below. Note that apart from the General Purpose controllers (16-19 and 80-83), all of the ranges are considered "undefined" in the MIDI spec.
Which map is used for each parameter depends on the setting of MIDISystemCCVol, MIDISystemCCPan, and MIDISystemCCDetune in minidexed.ini. The default is 0, i.e. not enabled.
Note: These are in addition to the above system-wide MIDI CC messages which will still acted upon, by all Tone Generators configured for the MIDI channel over which they are received. It is recommended that either the above common or the below individual scheme are used, but not both. Whilst combining the two is possible, sending the common "channel volume" (for example) will set the volume of all listening TGs back to the common setting regardless of what had previously been set individually. The same will apply for the pan and detune settings.
Map | CC Numbers | Hex | Usage |
---|---|---|---|
1 | CC#16-19,80-83 | 0x10-0x13,0x50-0x53 | TG 1-8 Volume, Pan or Detune |
2 | CC#20-27 | 0x14-0x1B | (as above) |
3 | CC#52-59 | 0x34-0x3B | (as above) |
4 | CC#102-109 | 0x66-0x6D | (as above) |
5 | CC#110-117 | 0x6E-0x75 | (as above) |
6 | CC#3,9,14,15,28-31 | 0x03,0x09,0x0E,0x0F,0x1C-0x1F | (as above) |
7 | CC#35,41,46,47,60-63 | 0x23,0x29,0x2E,0x2F,0x3C-0x3F | (as above) |
tbd
tbd
0x00
and 0x7F
(0–127).
F0 7F 7F 04 01 ll mm F7
ll (LSM) = ignored
mm (MSB) = master volume level
Byte | Value | Description |
---|---|---|
0 | F0 | SysEx start |
1 | 43 | Yamaha manufacturer ID |
2 | 10 | Channel number (0x10 = ch 1, 0x11 = ch 2, etc.) |
3 | 04 | Group (0x04 = performance parameter change) |
4 | p | Parameter number (see table below) |
5 | val | Value for parameter |
6 | F7 | SysEx end |
p | Parameter | val | Notes |
---|---|---|---|
0 | |||
1 | Source Select | 1–16 | Selects MIDI receive channel 1 to 16 |
2 | Poly/Mono | 0–1 | |
3 | Pitch Bend Range | 0–12 | |
4 | Pitch Bend Step | 0–12 | |
5 | Portamento Time | 0–99 | |
6 | Portamento/Glissando | 0–1 | |
7 | Portamento Mode | 0–1 | Sustain-key pitch 0: retain, 1: follow |
8 | |||
9 | Modulation Wheel Sensitivity | 0–15 | |
10 | Modulation Wheel Assign | 0–7 | Bit 0: Pitch, bit 1: Amplitude, bit 2: EG bias |
11 | Foot Controller Sensitivity | 0–15 | |
12 | Foot Controller Assign | 0–7 | Bit 0: Pitch, bit 1: Amplitude, bit 2: EG bias |
13 | After Touch Sensitivity | 0–15 | |
14 | After Touch Assign | 0–7 | Bit 0: Pitch, bit 1: Amplitude, bit 2: EG bias |
15 | Breath Controller Sensitivity | 0–15 | |
16 | Breath Controller Assign | 0–7 | Bit 0: Pitch, bit 1: Amplitude, bit 2: EG bias |
26 | Audio Output Level Attenuator | 0–7 | |
64 | Master Tuning | 0–127 | Concert Pitch at 64 |
NOTE: In Yamaha TX816/DX7 SysEx messages, the third byte after F0 43
specifies the MIDI channel using the formula 0x10 + (MIDI channel number - 1)
.
Examples:
MIDI Channel | SysEx Byte (hex) |
---|---|
1 | 0x10 |
2 | 0x11 |
... | ... |
16 | 0x1F |
NOTE: This is a Yamaha-specific quirk and is not the same as the standard MIDI channel numbering.
NOTE: On MiniDexed, there is the following exception: For the Source Select message, the third byte after F0 43
specifies the Tone Generator (TG), NOT the MIDI channel. This is useful to be able to assign MIDI channels to Tone Generators regardless of which MIDI channel they are currently set to.
The following commands illustrate this. They can be helpful to switch between addressing all TGs at once (e.g., for playing with a MIDI keyboard that sends on only one MIDI channel) vs. for programming (where you want to reach each channel separately).
# Set TG1 to MIDI channel 1, TG2 to MIDI channel 2, ..., TG8 to MIDI channel 8
F0 43 10 04 01 00 F7
F0 43 11 04 01 01 F7
F0 43 12 04 01 02 F7
F0 43 13 04 01 03 F7
F0 43 14 04 01 04 F7
F0 43 15 04 01 05 F7
F0 43 16 04 01 06 F7
F0 43 17 04 01 07 F7
# Set all TGs to MIDI channel 1
F0 43 10 04 01 00 F7
F0 43 11 04 01 00 F7
F0 43 12 04 01 00 F7
F0 43 13 04 01 00 F7
F0 43 14 04 01 00 F7
F0 43 15 04 01 00 F7
F0 43 16 04 01 00 F7
F0 43 17 04 01 00 F7