What is MidiAlert2?
MidiAlert is a little utility that can display pop-up message boxes triggered by MIDI commands (note and controller). MidiAlert2 is (duh) a second, re-worked version of it (more on the changes later).
I built it as a companion to Cantabile, my favorite live VST host. When playing live with VST instruments, I sometimes felt the need to flag some status information very visibly, for example to remind me that an effect is momentarily muted by a controller, or that a state change has happened.
The original MidiAlert was limited in that you could only define 10 pre-defined alerts that could be triggered. In Version 2, I changed its behavior so that it can now receive SysEx messages, so every alert can be different, depending what you send.
MidiAlert2 allows you to specify different behaviors of your alerts in your message: “open”, “close”, “toggle” or “flash” (display for a certain time and close then). Beware: MidiAlert2 message boxes are exclusive – while one is displayed, no other can be triggered! No alert box madness with this tool 😉
I’ve built MidiAlert for my own use – hope it can also be useful to other VST musicians. Surprise me with the creative uses you find for it!
Installation and Configuration
You will find MidiAlert on the Download page – just grab it there and get going.
MidiAlert comes with an installer; just install it into a folder of your choice, and you are (almost) ready to rock! Important: since MidiAlert’s settings are controlled by an .ini file in the program folder, it is important to install everything into a folder for which you have write access rights (which isn’t usually the case for the “Program Files” folder). So: best to use your own folder outside the “Program Files” folder (e.g. C:\LiveTools\MidiAlert\). If you really, really want to install into the “Program Files” folder, then make sure that you give yourself write access for the MidiAlert subfolder.
The MidiAlert folder contains:
- MidiAlert.exe – the actual program file
- MidiAlert.ini – the configuration file (see below)
- MidiAlert Manual.pdf – a PDF version of the manual
To run the program, you need to specify a MIDI port (and optionally channel) that MidiAlert will receive commands from, and of course your messages. Things won’t work without this, so this is the first thing we need to configure after installation!
Simply open MidiAlert.ini with any text editor (e.g. Notepad) and edit the settings – the file is commented in detail, so you should find your way around. But you’ll find some detail on the settings in the next section.
When you start MidiAlert, it simply creates a friendly orange circular icon in your system tray. Right-click it and you can exit MidiAlert. The rest happens automatically.
The Configuration File: MidiAlert2.ini
LivePrompter’s settings are stored in traditional .ini files. This has proven pretty robust and useful; plus it has saved me from having to code a settings GUI.
The format of MidiAlert2.ini is simple:
At the beginning of the line, you type the name for the specific settings (upper/lower case IS important!), then, WITHOUT A SPACE INBETWEEN, an “=”, and after that, ALSO WITHOUT A SPACE, the value for this setting up to the end of the line.
Now the individual settings:
|WindowWidth, WindowHeight||Size of the alert window in pixels|
|TextSize||Font size in points|
|DisplayNumber||For multi-monitor setups set this to the number of the display you want to show alerts on. You can find the correct number in the Windows display properties (“Identify”).|
|SplashDuration||How long should “splash” alerts be displayed before closing automatically. Has no effect on “toggle” or “momentary” alerts|
|MidiInPort||Name of the MIDI port MidiAlert should receive commands on. It is important to type the name correctly (case matters!). You can use MidiEnum (contained in LivePrompter) to find the correct name and copy it directly to your MidiAlert.ini|
The SysEx message
A SysEx message recognized by MidiAlert2 looks like this (in hex):
F0 7D 4D 41 <num> <type> <color> <message> F7
The first four bytes just need to be there; F0 is the MIDI command for SysEx, 7D is a universal manufacturer code, and 4D 41 stand for “MA” (MidiAlert), so MidiAlert2 knows that this message is meant for it.
<num> is a number from 0 to 127 to identify the alert. Identifying the alert is necessary to make sure that MidiAlert2 knows what alert a “toggle” or “close” message belongs to – if it didn’t, funny things could happen when alerts overlap.
<type> has four options, coded in one single letter (ASCII):
- S: show – the alert gets displayed (unless another one is currently open) and stays open
- H: hide – if an alert with the number <num> is open, it gets closed
- T: toggle – if no alert is open, the alert gets displayed and stays open; if an alert with the number <num> is open, it gets closed
- F: flash – the alert gets displayed and closes on its own after the time set in MidiAlert2.ini
<color> defines the color of the alert box:
- B: blue
- G: green
- R: red
- Y: yellow
- O: orange
- P: purple
- E: grey
- W: white
- K: black
The message is simply an ASCII string containing the message you want displayed. At the end of the message, 0xF7 is mandatory, so MIDI (and MidiAlert) know that the SysEx message ends
In Cantabile, it’s pretty easy to create SysEx message, especially for bindings: you set the binding target to a MIDI output port, the action to Sysex, then enter your SysEx string in the SysEx editor (you may need to widen the “Action” column a bit to see the SysEx data!). You don’t need to enter everything in hex, but you can also use strings, so you may enter a message like this:
0xf0 0x7d 0x4D 0x41 1 "S" "R" "Hello World!" 0xF7
This will show alert #1 in red with the message “Hello World!”. The corresponding hex sysex looks like this:
F0 7D 4D 41 01 53 52 48 65 6C 6C 6F 20 57 6F 72 6C 64 21 F7
Since this message only opens alert #1, you’ll need another one to close it (this time, we’ll use “MA” instead of 0x4D 0x41, just because we can 😉)
0xf0 0x7d "MA" 1 "H" "R" 0xF7
This one doesn’t need a message, since it only closes the box.
In Cantabile, you can also use variables to define your strings, which is super-powerful. For example, the following Sysex message in a SongStateàOnLoad binding will display the currently loaded song and state in an alert for some seconds (the number 4 is simply an example – choose a unique one so this doesn’t conflict with another alert with a different number):
0xf0 0x7d "MA" 4 "F" "G" SongTitle " - " State 0xF7
Give it a try and experiment!