MIDI-MT Documentation in English
Scenarios in the “Smart Home Device Control” and “Lighting Control” groups
Brief information about the main characteristics of the ChaiScript language
The scripting core of MIDI-MT is ChaiScript
ChaiScript is a typed declarative language with syntax similar to C++, TypeScript and JavaScript.
You can use your own scripts to automate management processes across different groups. Batch control via executable scripts can expand your capabilities, for example:
Adobe
products..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.
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.
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.
The “Available Scripts” list displays all
available scripts in the selected directory. Script files must have the
extension .mmts
. For each script file, its size and last
modification time are displayed. Please note that the modification time
is set to the current time when the program starts. These changes do not
affect the actual files on the disk.
Selecting “Script Directory” allows you to select the path where the scripts to be executed are located.
The option “Monitor changes in the script directory” enables tracking of changes to script files in the selected directory. If one of the scripts is changed, added or deleted, the list of scripts is automatically reloaded.
The “Debug mode” option allows you to redirect the output of the script from the log file to a specialized program, for example DebugView or Visual Studio Code.
The options “Don’t use … libraries” allows you to disable libraries you don’t use.
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.
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": [
...
]
},
...
}
{ ... };
.++value
variable.attr, auto, break, case, catch, class, continue, def, default, else, finally, for, global, if, return, switch, try, var, while
.? || && | ^ & == != < <= > >= << >> + - * / % ++ -- ! ~
.Nan, Infinity, false, true, __CLASS__, __FILE__ , __FUNC__, __LINE__
.auto, var
.def
-
def my_function() { ... }
.C++
, more details in the
original documentation.${ ... }
.//... /* ... */ #
.bool
.int, long, unsigned_int, unsigned_long, long_long, unsigned_long_long, size_t, int8_t, int16_t, int32_t, int64_t, uint8_t, uint16_t, uint32_t, uint64_t
.double, long_double, float
.char, wchar_t, char16_t, char32_t
.string
(C++ std::string
).Vector, Map, Pair
.promise, future
.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
website.ChaiScript
.ChaiScript
language
reference.ChaiScript
:
DebugView
x64 | x32 | ZIP
from sysinternals.