MIDI-MT - Module for controlling the execution of user “Scripts”

MIDI-MT Documentation in English

Module for controlling the execution of user scripts

     The scripting core of MIDI-MT is ChaiScript
     ChaiScript is a typed declarative language with syntax similar to C++, TypeScript and JavaScript.

Assigning scripts to MIDI-MT

You can use your own scripts to automate management processes across different groups. Batch control via executable scripts can expand your capabilities, for example:

The scripting core is ChaiScript, an open source scripting language created by Jason Turner.
The syntax of ChaiScript scripts is almost identical to JavaScript, and in fact follows the ECMASCRIPT standard, with minor additions. Below are the main features of this scripting language.

“Audio Mixer” and “MIDI Control” groups

Scripts can be thought of as ‘macros’ when applied to the “Audio Mixer” group or the “MIDI Control” group to control Adobe products such as Premiere Pro, After Effects, Audition and so on. A sequential set of commands written in the script can be executed by pressing one button. This not only saves time, but also allows you to use fewer physical buttons while maintaining the same functionality.

Groups “Smart Home Device Control” and “Lighting Control”

Scripts can be used to create both “control scenarios” for the “Smart Home” group, and to create your own unique lighting effects and solutions for the “Lighting Control” and “Smart Home” groups.

Settings of the “Script Management” module

MIDI-MT Chaiscript assign

The maximum number of called scripts in the configuration settings is limited to 27.
There is no limit on the simultaneous launch of scripts, but it also cannot exceed the value 27.
Calling the script again leads to its completion if it was running at that moment. Each script can only be active in one instance.

To develop and test scripts, the distribution kit includes the MMTScriptTester.exe utility.
You can use it for debugging when writing your own scripts. The function of tracking changes in the script directory also works in MMTScript Tester; scripts are reloaded automatically if they change. If changes occur during the execution of any script, then the changes are postponed until the end of its execution.

Configuration file

The settings in the configuration file look like this:

{
    ...
    "vmscript": {
        "enable": true,
        "watch": true,
        "debug": false,
        "stringlib": true,
        "wstringlib": true,
        "matchlib": true,
        "directory": "C:\MIDI-MT\scripts",
        "scripts": [
           ...
        ]
    },
    ...
}

Brief information about the main characteristics of the ChaiScript language

supported types:

DebugView

DebugView is an application that allows you to monitor debug output on your local system.
It can display application debug output and also does not require applications to be modified to use the non-standard debug output API.
DebugView intercepts and displays debug output. Author Mark Russinovich, sysinternals.

ChaiScript documentation and examples

  1. Find out more in documentation and examples on the ChaiScript website.
  2. View more code examples ChaiScript.
  3. ChaiScript language reference.
  4. Getting started with ChaiScript:
  5. Specific MIDI-MT API objects in scripts.
  6. Example MIDI-MT API.
  7. Examples of RGB LED controls:
  8. Other examples:
  9. Useful additions: