In my WIP CHEM plugin for VCV Rack, I’m adding a general MIDI Pad module that lets you define pads that send (almost arbitrary) MIDI. To configure this, you enter a text notation in what I’m calling Haken Control Language (HCL). This is similar to other text MIDI notations, but with stuff specific to the Eagan Matrix, such as the 14-bit protocols, extended macros, and stream pokes.
To get an idea of the context, here’s the editing UI for defining a pad in the module. Where it says “Pad Midi” is a text field where you can type or paste in HCL to define the midi that is sent when you click the pad. The palette lets you select a pad color, and the edit field next to is a name (“A1” here). The input ports below allow you to connect a trigger signal to activate the pad instead of clicking.
Here’s a one-page draft of the documentation for HCL. I’d appreciate a critical eye from the community to see if this looks usable, and if there’s something critical to add. Let me know what you think!
This is MVP. I’ve had thoughts of something more elaborate with lots of built-in symbols from HakenMidi.h for things like poke ids, with appropriate context-dependent checking, but I think this is a usable version 1.
HCL: Haken Control Language
The MidiPad (aka 4x4) module uses HCL - the Haken Control Language to define the MIDI data stream that will be sent when a pad is clicked.
-
No notes (there is no clock) or other music-related codes – only EaganMatrix controls.
-
Predefined ccTask is not useful for pad controls. Generic cc is always available.
-
Values out of range of 7-bit automatically generate the 14-bit MIDI.
For the specific values to send, see the HakenMidi.h
file included with the User Guides in the Haken Editor download.
CHEM performs only minimal validation on the form of the data that is sent.
Item | Syntax | Description |
---|---|---|
Comment | [ text] |
Comments are enclosed in square brackets. Comments cannot contain an ] . |
Variable | { name= value} |
Named values can be defined to make the MIDI definition more readable. Any place a value appears, you can use a variable name. |
Channel | ch 1-16 |
Sets the channel for the MIDI that follows. Macros, Pokes, and Streams are always sent on channel 16, ignoring the channel set by ch . |
Control Code (CC) | cc 0-127 value |
Sends the corresponding CC and value. If the CC supports 14-bits and the value is greater than 127, the corresponding LSB MIDI code is automatically sent. |
Macro value | m 1-90 value |
Sends a macro value. |
value | nnnn | If first char is a digit, it is a raw value in the range 0…16_256. Otherwise a signed value in the range -1 to 1. [+-](1 or .nnn) , that is: -1 … +1 : -1 , -.nnn , +1 or .nnn . An underscore can be used as a visual separator. The decimal point can be either . or , . For CCs and macros 1 … 6, only raw 14-bit values are supported. If a value greater than 7 bits is used with a CC that is 7-bit only, the least-significant byte (LSB) is ignored. |
pair | value7 value7 | Two 7-bit values to be sent in a poke or data stream. |
stream-data | pair [pair]* | List of pairs of 7-bit values for a poke or data stream. |
Begin stream | s stream-number |
Begins the specified data stream. |
End Stream | end |
Optional for poke streams. |
Matrix poke | mp stream-data |
Sends a list of Matrix pokes. |
Formula poke | fp stream-data |
Sends a list of Formula pokes. |
Graph poke | gp or gp1 or gp2 |
Sends a list of Graph pokes. |
Kinetic poke | kp stream-data |
Sends a list of Kinetic pokes. |
Biquad/Sine poke | bp stream-data |
Sends a list of Biquad/Sinbank pokes. |
Convolution poke | cv stream-data |
Sends a list of Convolution pokes |