BMTP Language syntax definition

mschnell

2014-02-07 13:42:25

Where can I find the complete syntax definition for the BMTP Language ? It does not seem to be included in the Manual PDF

-Michael

florian

2014-02-08 18:23:28

Hi Michael,

you probably mean the "Rules" in Midi Translator Pro? They're not a real language -- so the user manual actually does describe the full "syntax". Please see chapter 10 "Rules and Variables".
miditranslator_manual.pdf

We plan to add support for a real scripting language like LUA in a future version.

Regards,
Florian

mschnell

2014-02-08 21:21:16

I mean the text in the BMTP file(s) that obviously can be edited manually, if desired.

Of course I did read this chapter.

Seemingly the only additional thing that can be done in the BMTP file is the header to start each translator with.

Thy syntax supposedly can easily derived from an existing file.

Anyway, I don't find the syntax for the said actions such as "Jump", "Skip Next Rule", "Skip Next 2 Rules", "Exit Rules, Execute Outgoing Action", and "Exit Rules, Skip Outgoing Action".

Moreover I don't see why an "Assignment" is not just a simple "Expression", but I feel I should just ignore this.

Also I suppose outgoing actions are defined in the file as well.

I supposedly will find out all this by some testing.

-Michael

florian

2014-02-08 22:37:36

Hi Michael,

indeed, I misunderstood! The format of the .bmtp file is proprietary, i.e. we do not publish an official guide how to edit them files.

However, I don't mind people editing the files directly. In fact, sometimes it's easier to edit them directly in a text editor, and for that purpose I did choose a file format that is somewhat legible by humans. The general file format is a Microsoft INI file -- there is probably lots of information on the Internet. The rules part is somewhat complicated, I'm afraid. The example bmtp files delivered with MT Pro can give you quite a good overview -- for example the Tranzport file.

Also note that for version 2 we plan to switch to an XML file format which will be much easier to edit manually.

Hope that helps!

Regards,
Florian

mschnell

2014-02-09 07:52:40

My first post regarding the syntax was a reply in a thread in this forum, where long chunks of such text was exchanged. Even help for having a text editor do syntax highlighting was requested.

So it's not that "unofficial".

-Michael

e.g. DvlsAdvct nicely provided:

Code: Select all

Translator 1: Fader 1
Incoming Message: B0 07 pp
Rules: rr=595
qq=pp*0.95
if pp=127 then qq=85
vv=rr+qq
Outgoing Message: Mouse Absolute Position X Axis: 90 Y Axis: vv
Seems like a decently usable language

florian

2014-02-09 14:48:55

Hi Michael,

as you probably know already, there is a difference of how translator entries and the rules are displayed in the program, and how they are stored in the file.

If you copy a translator in MT Pro with Ctrl+C (Command-C on Apple), you can paste it as text e.g. into this forum. That's the format that we typically use in the forum -- unless you attach the full bmtp file.

The rules, as in DvlsAdvct's code above, can be copy/pasted "as is" from and to the rules editor in MT Pro. That's the "official" rules format, as explained in chapter 10 of the user manual. However, in the respective .bmtp file, the rules are stored slightly different. It's easy to mess up the .bmtp file so that it does not load anymore...

I'm not sure this is what you mean, but I thought I'd explain nonetheless :)
Florian

Sakis

2014-02-09 14:58:57

@ Florian:
Any chance for a release date of MT2? . I understand that MT2 will be major update and it takes hard work but after working on large projects I found MT a bit difficult to manipulate many presets and translators ,so can't wait for the next release :)

mschnell

2014-02-14 22:26:41

florian wrote: We plan to add support for a real scripting language like LUA in a future version.
I vote for Java Script (which you did mention in some other message here).

There are a lot more programmer who can do Java script and there are great open source java script interpreters around (supposedly the best performing being the one FireFox uses.)

Moreover if scripting might be too slow for certain applications real Java is around the corner which is compatible to a certain extend and supported by open source compilers (to byte code) and engines.

-Michael