MPL - MIDI Programming Language
Developed for Windows by Jos Maas

MPL is a tool to make changes to MIDI files in batch and to process (send and receive) MIDI messages in real time. You can use it to automate your MIDI file editing work. Or build your own real time MIDI tools, like sequencers or arpeggiators.

You can load and process up to 20 MIDI files at the same time. Open multiple input and output ports. Synchronise with other sequencers. Programming is extremely easy compared with other languages that are not specifically aimed at MIDI.

The program editor is in the lower half of the window. Here you can edit your program instructions. There are 5 sections in an MPL program: Main, MIDI In, MIDI Clocks, PC Key and Mouse. The Main section is executed when you press the run button and goes into a waiting state at the StartStandBy instruction. The MIDI In section is executed each time a MIDI message is received at the MIDI In ports. The MIDI Clock is executed for each MIDI clock, 24 times in a beat. The PC Key section is executed whenever you press or release a key on your PC keyboard. The Mouse section is executed for any mouse action performed on one of the 5 controls.

In the upper right is the dialog. Here you see messages appear when a program is running. Use the Display and Input instructions for run time interaction. You will also see error messages appear here if the instructions are not correct (syntax errors).

On the left of the dialog area is the folders area. Here you can select a list of folders. The folders are used in combination with the ForEachFile instructions. All the files in the selected folders are processed. The folder lists can be saved and restored seperately from the programs.

Below the folder area are the five controls. You can influence your program at run time by dragging the values up and down with the mouse. Right click on a control value (when the program is not running) to edit the properties of this control. When the lowest value is 0 and the highest value is 1 then the control acts as a switch, the value changes when you click on it.

MIDI files are loaded in chains of MIDI events. There are 20 chains available, each can contain a complete MIDI file with all channels and tracks. Chains are loaded and saved at run time or with the Chains menu. You can inspect and edit the contents of a chain in an events list or piano roll. In both windows you can also play the chain thru a selected output device.Use the settings menu to open multiple MIDI In and MIDI Out ports. The numbers of the ports can be used in a program with the MidiIn and MidiOut variables.

In the demo version of MPL real time processing is interrupted after 30 seconds and saved MIDI files contain only the first 1000 MIDI events (a note counts as 2 events, note on and note off). You can order MPL online. A demo version can be downloaded for free.

Bonus program examples:
lefthanded.zip Left-handed MIDI keyboard controller. This program reverses the pitch of MIDI notes in real-time. So the key on the left is the highest and de key on the right the lowest. The D-key on the right of the central C remains unchanged. The C and the E beside the D are switched and so on.

Tutorial: the sequencer program example
What it does
Main section
MIDI In section
MIDI Clocks section
PC Key section
Mouse section

More software from Jos Maas

 

E-mail: JosMaas@1manband.nl