|
|
|
|
|
|
MIDI implementation
The MIDI input and MIDI output sections describe how MIDI input and output are configured generally.
This section is intended to provide additional reference for those building, buying or converting MIDI organ consoles for use with Hauptwerk. Please also consult the MIDI organ consoles section for suggestions and further information.
Hauptwerk's MIDI system is extremely flexible, designed to be compatible with almost all of the many diverse types of MIDI digital organs in existence, and any scheme by which an organ console may have been wired for MIDI. The MIDI implementation is also backwardly compatible with systems built for Hauptwerk version 1.
MIDI output is only available in the Advanced Edition of Hauptwerk, so the sections and references below that relate to MIDI output are not relevant for the smaller Hauptwerk Basic Edition.
Keyboards
Hauptwerk's virtual keyboards (manuals and pedalboards) respond to MIDI note-on/off messages with no restriction on MIDI port and MIDI channel for a keyboard as a whole. Theatre organ after-touch can be triggered by either:
- A second set of key contacts, sending MIDI note-on/off messages on a separate MIDI port or channel (the ideal method).
- Keys being played on a standard MIDI keyboard when their note-on velocity exceeds a specified threshold. Hauptwerk will release the virtual after-touch keys when the keyboard keys are released.
- Keys being played on a standard MIDI keyboard when their polyphonic after-touch (pressure) exceeds a specified threshold. Hauptwerk will release the virtual after-touch keys when their pressure falls below the threshold.
Some sample sets are able to respond to key velocity. Hauptwerk provides a tracker action model which enables key velocity to be used to adjust the initial speech of pipes, where it is included in a sample set. However, velocity-sensitive keyboards are not a requirement.
Hauptwerk can produce MIDI output from virtual keyboards using standard note-on/off messages, again with no restriction on MIDI port or channel for a keyboard as a whole. Key on and off velocity is sent, but no after-touch.
Keyboard inputs and outputs are connected before key-action coupling.
Rank and division inputs and outputs
Hauptwerk's virtual ranks (but not divisions) can respond to MIDI note-on/off messages directly, with no restriction on MIDI port and MIDI channel for a rank as a whole. It can produce MIDI output from virtual ranks or divisions using standard note-on/off messages, again with no restriction on MIDI port or channel for a rank or division as a whole. Key on and off velocity is sent, but no after-touch.
Division outputs are post-coupling, i.e. may be affected by any virtual couplers engaged.
Rank inputs and and outputs relate to single virtual ranks only, and are also post-coupling.
Rank input is entirely optional, and provides an alternative to input at the keyboard level. Unless Hauptwerk is to be used as a voice expander, the keyboard level would be the normal choice.
Switches
Hauptwerk's virtual switch inputs can be turned on or off by any of the following types of events, and the engaging and disengaging event types need have no relationship to each other. For example, if an engaging event was a MIDI note-on message, then it would be usual for the disengaging event to be a note-off message, but that is not a requirement; the disengaging event could instead be a program change if preferred. However, the one exception is that the engaging and disengaging events cannot both be 'auto'. The event types are:
- MIDI note-on.
- MIDI note-on with a velocity exceeding a specified threshold.
- MIDI note-on with a velocity below a specified threshold.
- MIDI note-off.
- MIDI program change.
- MIDI control change, controller value ignored.
- MIDI control change with specific controller value.
- MIDI control change with controller value exceeding a specified threshold.
- MIDI control change with controller value below a specified threshold.
- MIDI note polyphonic after-touch exceeding a specified threshold.
- MIDI note polyphonic after-touch below a specified threshold.
- Computer keyboard key pressed.
- Computer keyboard key released.
- MIDI system exclusive (up to 16 bytes in total).
- MIDI RPN, controller value ignored.
- MIDI RPN with specific controller value.
- MIDI RPN with controller value exceeding a specified threshold.
- MIDI RPN with controller value below a specified threshold.
- MIDI NRPN, controller value ignored.
- MIDI NRPN with specific controller value.
- MIDI NRPN with controller value exceeding a specified threshold.
- MIDI NRPN with controller value below a specified threshold.
- Auto (indicates that no message is sent by the hardware).
Note that the engaging and disengaging event details should never be identical. If a latching MIDI switch (such as a draw-knob) sends exactly the same MIDI message when it is engaged to when it is disengaged, instead tick Enagaging event toggles? and specify the message only for the engaging event. However, the setting should only be used in that situation. Please see the MIDI input section for more information on the setting. Never use it for momentary push-buttons; instead the 'automatic' disengaging event type should be used.
For MIDI event types, any MIDI port and channel can be used for the engaging and disengaging events, and they need not match, hence there are almost no restrictions on message type, port or channel for any switch. Hardware switches are listed in Hauptwerk with the General settings | Switch (MIDI) inputs screen:
Any configured switch input can be used to control any of Hauptwerk's switches, including, for example:
- Virtual stops.
- Virtual couplers.
- Virtual tremulants.
- Virtual pistons.
- Any other virtual switches in a sample set.
- Hauptwerk's menu functions.
Hauptwerk's virtual switch outputs can produce any of the following types of events, and again the engaging and disengaging event types need have no relationship to each other.
- MIDI note-on with a fixed specified velocity.
- MIDI note-on with the velocity of the virtual switch.
- MIDI note-off with a fixed specified velocity.
- MIDI note-off with the velocity of the virtual switch.
- MIDI program change.
- MIDI control change.
- MIDI system exclusive (up to 16 bytes in total).
- MIDI RPN.
- MIDI NRPN.
- None (indicates that no message is sent to the hardware).
As for input events, any MIDI port and channel can be used for the engaging and disengaging events, and they need not match, hence there are almost no restrictions on message type, port or channel for any switch. Hardware switches are listed in Hauptwerk with the General settings | Switch MIDI outputs screen:
Hauptwerk can send such switch output events from any of its logical switches, such as:
- Virtual stops.
- Virtual couplers.
- Virtual tremulants.
- Virtual pistons.
- Any other virtual switches in a sample set.
- Hauptwerk system states (such as whether Hauptwerk is active).
Although you are free to use any of the event types described above, if you are wiring a new console, for simplicity and consistency our recommendations would be:
- For MIDI switches which change state physically, such as solenoid-actuated/illuminated draw-knobs or tabs, use MIDI note-on/off messages for both input and output.
- Similarly control indicator lamps from Hauptwerk with note-on/off messages.
- For momentary push-buttons, such as non-latching pistons, send MIDI program change messages to Hauptwerk.
- For the capture/setter piston, use a momentary push-button which sends a MIDI note-on message as it is pressed in, and a MIDI note-off message as it springs back out, so that it must physically be held in whilst in capture mode, thus preventing accidental erasure of combinations or menu stand-by assignments.
For ease of diagnosing problems and wiring we would also recommend using the same MIDI port and channel and, where applicable, note number, for both engaging and disengaging events for a given MIDI switch or indicator lamp.
Please see the appendix below for a list of computer key codes recognised for switch (MIDI) input computer key events.
Continuous controllers
Hauptwerk's virtual continuous controls are used to represent swell pedals, crescendo pedals and any other entities that may take one of a continuous range of values, such as the extension of a bellows.
Virtual continuous controls can be controlled by MIDI control change messages. Any MIDI port, channel and controller number can be used for any virtual control. Likewise a virtual control can send MIDI control change messages to indicate its position using any desired MIDI port, channel and controller number. The only restriction is that only MIDI control change messages can be used.
LCD panel system
Hauptwerk is able to control 32-character LCD panels using custom MIDI system exclusive messages to show labels specific to the sample set loaded. Usually this would be used to show stop, coupler, piston and other control names next to MIDI draw-knobs/tabs on an organ console so that their function is clear when multiple sample sets are used. However, one LCD panel can also be designated as a status display panel, upon which Hauptwerk will display a summary of the information shown in its main window title and status bar, along with an indication of whether an error has occurred.
Each panel can be controlled from any MIDI output port with no restrictions. Full details of the LCD panel system, including the format of the custom system exclusive messages, are given in the MIDI output section.
Custom MIDI output messages
Custom MIDI output messages can optionally be sent from Hauptwerk whenever it is activated and/or deactivated. These messages can each be sent to any MIDI port without restriction, and are specified as a sequence of up to 16 raw MIDI bytes so that any custom type of message that may be required by your hardware can be sent, including system exclusive messages.
Again, full details are given in the MIDI output section.
Miscellaneous MIDI port/channel restrictions
As covered above, there are no formal restrictions on MIDI ports or channels for any of the supported types of communication. However, please note that the Transposer affects this path? setting on the General settings | MIDI input paths screen is used to prevent the transposer affecting MIDI input paths which are used for switch MIDI inputs. Note that for this reason, you may prefer not to mix MIDI keys and MIDI control switches on a single MIDI encoder, where the setting would affect all note-on/off messages on the MIDI channel.
Menu functions
Except for functions which require user input, all of the functions on the File, Organ, Combinations, Temperament and Functions menus can be triggered by MIDI. Any input switch (as above) can trigger any one of the functions.
System state output
The following Hauptwerk system states can be used to control external indicator lamps or other indicator devices via any output switch (see above):
- MIDI system ready.
- Sample set loaded.
- Sample set loading.
- Error.
- Audio output recording in progress.
- Capture mode (combination setter) active.
- Re-directable input 1 route 1 active.
- Re-directable input 1 route 2 active.
- Re-directable input 1 route 3 active.
- Re-directable input 1 route 4 active.
- Re-directable input 2 route 1 active.
- Re-directable input 2 route 2 active.
- Re-directable input 2 route 3 active.
- Re-directable input 2 route 4 active.
Appendix: computer key codes
The following key codes can be used for 'Computer keyboard key pressed/released' event types for the General settings | Switch (MIDI) inputs screen:
| Escape | | 16777216 |
| Tab | | 16777217 |
| Backtab | | 16777218 |
| Backspace | | 16777219 |
| Return | | 16777220 |
| Enter | | 16777221 |
| Insert | | 16777222 |
| Delete | | 16777223 |
| Pause | | 16777224 |
| Print | | 16777225 |
| SysReq | | 16777226 |
| Clear | | 16777227 |
| Home | | 16777232 |
| End | | 16777233 |
| Left | | 16777234 |
| Up | | 16777235 |
| Right | | 16777236 |
| Down | | 16777237 |
| PageUp | | 16777238 |
| PageDown | | 16777239 |
| Shift | | 16777248 |
| Control | | 16777249 |
| Meta | | 16777250 |
| Alt | | 16777251 |
| CapsLock | | 16777252 |
| NumLock | | 16777253 |
| ScrollLock | | 16777254 |
| F1 | | 16777264 |
| F2 | | 16777265 |
| F3 | | 16777266 |
| F4 | | 16777267 |
| F5 | | 16777268 |
| F6 | | 16777269 |
| F7 | | 16777270 |
| F8 | | 16777271 |
| F9 | | 16777272 |
| F10 | | 16777273 |
| F11 | | 16777274 |
| F12 | | 16777275 |
| F13 | | 16777276 |
| F14 | | 16777277 |
| F15 | | 16777278 |
| F16 | | 16777279 |
| F17 | | 16777280 |
| F18 | | 16777281 |
| F19 | | 16777282 |
| F20 | | 16777283 |
| F21 | | 16777284 |
| F22 | | 16777285 |
| F23 | | 16777286 |
| F24 | | 16777287 |
| F25 | | 16777288 |
| F26 | | 16777289 |
| F27 | | 16777290 |
| F28 | | 16777291 |
| F29 | | 16777292 |
| F30 | | 16777293 |
| F31 | | 16777294 |
| F32 | | 16777295 |
| F33 | | 16777296 |
| F34 | | 16777297 |
| F35 | | 16777298 |
| Extra: Super_L | | 16777299 |
| Extra: Super_R | | 16777300 |
| Extra: Menu | | 16777301 |
| Extra: Hyper_L | | 16777302 |
| Extra: Hyper_R | | 16777303 |
| Extra: Help | | 16777304 |
| Extra: Direction_L | | 16777305 |
| Extra: Direction_R | | 16777312 |
| ANSI: Space | | 32 |
| ANSI: Exclam | | 33 |
| ANSI: QuoteDbl | | 34 |
| ANSI: NumberSign | | 35 |
| ANSI: Dollar | | 36 |
| ANSI: Percent | | 37 |
| ANSI: Ampersand | | 38 |
| ANSI: Apostrophe | | 39 |
| ANSI: ParenLeft | | 40 |
| ANSI: ParenRight | | 41 |
| ANSI: Asterisk | | 42 |
| ANSI: Plus | | 43 |
| ANSI: Comma | | 44 |
| ANSI: Minus | | 45 |
| ANSI: Period | | 46 |
| ANSI: Slash | | 47 |
| ANSI: 0 | | 48 |
| ANSI: 1 | | 49 |
| ANSI: 2 | | 50 |
| ANSI: 3 | | 51 |
| ANSI: 4 | | 52 |
| ANSI: 5 | | 53 |
| ANSI: 6 | | 54 |
| ANSI: 7 | | 55 |
| ANSI: 8 | | 56 |
| ANSI: 9 | | 57 |
| ANSI: Colon | | 58 |
| ANSI: Semicolon | | 59 |
| ANSI: Less | | 60 |
| ANSI: Equal | | 61 |
| ANSI: Greater | | 62 |
| ANSI: Question | | 63 |
| ANSI: At | | 64 |
| ANSI: A | | 65 |
| ANSI: B | | 66 |
| ANSI: C | | 67 |
| ANSI: D | | 68 |
| ANSI: E | | 69 |
| ANSI: F | | 70 |
| ANSI: G | | 71 |
| ANSI: H | | 72 |
| ANSI: I | | 73 |
| ANSI: J | | 74 |
| ANSI: K | | 75 |
| ANSI: L | | 76 |
| ANSI: M | | 77 |
| ANSI: N | | 78 |
| ANSI: O | | 79 |
| ANSI: P | | 80 |
| ANSI: Q | | 81 |
| ANSI: R | | 82 |
| ANSI: S | | 83 |
| ANSI: T | | 84 |
| ANSI: U | | 85 |
| ANSI: V | | 86 |
| ANSI: W | | 87 |
| ANSI: X | | 88 |
| ANSI: Y | | 89 |
| ANSI: Z | | 90 |
| ANSI: BracketLeft | | 91 |
| ANSI: Backslash | | 92 |
| ANSI: BracketRight | | 93 |
| ANSI: AsciiCircum | | 94 |
| ANSI: Underscore | | 95 |
| ANSI: QuoteLeft | | 96 |
| ANSI: BraceLeft | | 123 |
| ANSI: Bar | | 124 |
| ANSI: BraceRight | | 125 |
| ANSI: AsciiTilde | | 126 |
| Latin1: nobreakspace | | 160 |
| Latin1: exclamdown | | 161 |
| Latin1: cent | | 162 |
| Latin1: sterling | | 163 |
| Latin1: currency | | 164 |
| Latin1: yen | | 165 |
| Latin1: brokenbar | | 166 |
| Latin1: section | | 167 |
| Latin1: diaeresis | | 168 |
| Latin1: copyright | | 169 |
| Latin1: ordfeminine | | 170 |
| Latin1: guillemotleft | | 171 |
| Latin1: notsign | | 172 |
| Latin1: hyphen | | 173 |
| Latin1: registered | | 174 |
| Latin1: macron | | 175 |
| Latin1: degree | | 176 |
| Latin1: plusminus | | 177 |
| Latin1: twosuperior | | 178 |
| Latin1: threesuperior | | 179 |
| Latin1: acute | | 180 |
| Latin1: mu | | 181 |
| Latin1: paragraph | | 182 |
| Latin1: periodcentered | | 183 |
| Latin1: cedilla | | 184 |
| Latin1: onesuperior | | 185 |
| Latin1: masculine | | 186 |
| Latin1: guillemotright | | 187 |
| Latin1: onequarter | | 188 |
| Latin1: onehalf | | 189 |
| Latin1: threequarters | | 190 |
| Latin1: questiondown | | 191 |
| Latin1: Agrave | | 192 |
| Latin1: Aacute | | 193 |
| Latin1: Acircumflex | | 194 |
| Latin1: Atilde | | 195 |
| Latin1: Adiaeresis | | 196 |
| Latin1: Aring | | 197 |
| Latin1: AE | | 198 |
| Latin1: Ccedilla | | 199 |
| Latin1: Egrave | | 200 |
| Latin1: Eacute | | 201 |
| Latin1: Ecircumflex | | 202 |
| Latin1: Ediaeresis | | 203 |
| Latin1: Igrave | | 204 |
| Latin1: Iacute | | 205 |
| Latin1: Icircumflex | | 206 |
| Latin1: Idiaeresis | | 207 |
| Latin1: ETH | | 208 |
| Latin1: Ntilde | | 209 |
| Latin1: Ograve | | 210 |
| Latin1: Oacute | | 211 |
| Latin1: Ocircumflex | | 212 |
| Latin1: Otilde | | 213 |
| Latin1: Odiaeresis | | 214 |
| Latin1: multiply | | 215 |
| Latin1: Ooblique | | 216 |
| Latin1: Ugrave | | 217 |
| Latin1: Uacute | | 218 |
| Latin1: Ucircumflex | | 219 |
| Latin1: Udiaeresis | | 220 |
| Latin1: Yacute | | 221 |
| Latin1: THORN | | 222 |
| Latin1: ssharp | | 223 |
| Latin1: division | | 247 |
| Latin1: ydiaeresis | | 255 |
| Multi-key: AltGr | | 16781571 |
| Multi-key: Multi_key | | 16781600 |
| Multi-key: Codeinput | | 16781623 |
| Multi-key: SingleCandidate | | 16781628 |
| Multi-key: MultipleCandidate | | 16781629 |
| Multi-key: PreviousCandidate | | 16781630 |
| Chararcter set mode switch | | 16781694 |
| Japanese: Kanji | | 16781601 |
| Japanese: Muhenkan | | 16781602 |
| Japanese: Henkan | | 16781603 |
| Japanese: Romaji | | 16781604 |
| Japanese: Hiragana | | 16781605 |
| Japanese: Katakana | | 16781606 |
| Japanese: Hiragana_Katakana | | 16781607 |
| Japanese: Zenkaku | | 16781608 |
| Japanese: Hankaku | | 16781609 |
| Japanese: Zenkaku_Hankaku | | 16781610 |
| Japanese: Touroku | | 16781611 |
| Japanese: Massyo | | 16781612 |
| Japanese: Kana_Lock | | 16781613 |
| Japanese: Kana_Shift | | 16781614 |
| Japanese: Eisu_Shift | | 16781615 |
| Japanese: Eisu_toggle | | 16781616 |
| Korean: Hangul | | 16781617 |
| Korean: Hangul_Start | | 16781618 |
| Korean: Hangul_End | | 16781619 |
| Korean: Hangul_Hanja | | 16781620 |
| Korean: Hangul_Jamo | | 16781621 |
| Korean: Hangul_Romaja | | 16781622 |
| Korean: Hangul_Jeonja | | 16781624 |
| Korean: Hangul_Banja | | 16781625 |
| Korean: Hangul_PreHanja | | 16781626 |
| Korean: Hangul_PostHanja | | 16781627 |
| Korean: Hangul_Special | | 16781631 |
| Multimedia: Back | | 16777313 |
| Multimedia: Forward | | 16777314 |
| Multimedia: Stop | | 16777315 |
| Multimedia: Refresh | | 16777316 |
| Multimedia: VolumeDown | | 16777328 |
| Multimedia: VolumeMute | | 16777329 |
| Multimedia: VolumeUp | | 16777330 |
| Multimedia: BassBoost | | 16777331 |
| Multimedia: BassUp | | 16777332 |
| Multimedia: BassDown | | 16777333 |
| Multimedia: TrebleUp | | 16777334 |
| Multimedia: TrebleDown | | 16777335 |
| Multimedia: MediaPlay | | 16777344 |
| Multimedia: MediaStop | | 16777345 |
| Multimedia: MediaPrevious | | 16777346 |
| Multimedia: MediaNext | | 16777347 |
| Multimedia: MediaRecord | | 16777348 |
| Multimedia: HomePage | | 16777360 |
| Multimedia: Favorites | | 16777361 |
| Multimedia: Search | | 16777362 |
| Multimedia: Standby | | 16777363 |
| Multimedia: OpenUrl | | 16777364 |
| Multimedia: LaunchMail | | 16777376 |
| Multimedia: LaunchMedia | | 16777377 |
| Multimedia: Launch0 | | 16777378 |
| Multimedia: Launch1 | | 16777379 |
| Multimedia: Launch2 | | 16777380 |
| Multimedia: Launch3 | | 16777381 |
| Multimedia: Launch4 | | 16777382 |
| Multimedia: Launch5 | | 16777383 |
| Multimedia: Launch6 | | 16777384 |
| Multimedia: Launch7 | | 16777385 |
| Multimedia: Launch8 | | 16777386 |
| Multimedia: Launch9 | | 16777387 |
| Multimedia: LaunchA | | 16777388 |
| Multimedia: LaunchB | | 16777389 |
| Multimedia: LaunchC | | 16777390 |
| Multimedia: LaunchD | | 16777391 |
| Multimedia: LaunchE | | 16777392 |
| Multimedia: LaunchF | | 16777393 |
| Multimedia: MediaLast | | 16842751 |
| Keypad navigation: Select | | 16842752 |
| Keypad navigation: Yes | | 16842753 |
| Keypad navigation: No | | 16842754 |
| Newer misc: Cancel | | 16908289 |
| Newer misc: Printer | | 16908290 |
| Newer misc: Execute | | 16908291 |
| Newer misc: Sleep | | 16908292 |
| Newer misc: Play | | 16908293 |
| Newer misc: Zoom | | 16908294 |
| Device keys: Context1 | | 17825792 |
| Device keys: Context2 | | 17825793 |
| Device keys: Context3 | | 17825794 |
| Device keys: Context4 | | 17825795 |
| Device keys: Call | | 17825796 |
| Device keys: Hangup | | 17825797 |
| Device keys: Flip | | 17825798 |
| Dead: Grave | | 16781904 |
| Dead: Acute | | 16781905 |
| Dead: Circumflex | | 16781906 |
| Dead: Tilde | | 16781907 |
| Dead: Macron | | 16781908 |
| Dead: Breve | | 16781909 |
| Dead: Abovedot | | 16781910 |
| Dead: Diaeresis | | 16781911 |
| Dead: Abovering | | 16781912 |
| Dead: Doubleacute | | 16781913 |
| Dead: Caron | | 16781914 |
| Dead: Cedilla | | 16781915 |
| Dead: Ogonek | | 16781916 |
| Dead: Iota | | 16781917 |
| Dead: Voiced_Sound | | 16781918 |
| Dead: Semivoiced_Sound | | 16781919 |
| Dead: Belowdot | | 16781920 |
| Dead: Hook | | 16781921 |
| Dead: Horn | | 16781922 |
| [Unknown key] | | 33554431 |
|
|
|