This forum is read-only. Please post new topics in our Q&A forum.

Print-out of BMTP file

General discussion about MIDI Translator

Moderators: florian, DvlsAdvct

Post Reply
Peter Nicholson 2
New User
Posts: 4
Joined: Mon Apr 02, 2007 8:35 pm

Print-out of BMTP file

Post by Peter Nicholson 2 » Tue Apr 24, 2007 9:19 pm

Hi Florian

I have printed out one of my BMTP files, and would like to understand several sections of the translator code.

1.Incoming Keystrokes—KeyDown SHIFT
I have, for example:
I have been looking at this, and others, to see if I could spot links to KeyNumber and KeyCode, but I couldn’t!

I thought that KAM10000, KAM11000, and KAM12000, might be codes for Key Up/Down, KeyDown and KeyUp, but I’m guessing.

When I looked at this, I thought the last two characters might be the KeyCodes in Hex.

I would be most grateful if you would explain these to me Florian.

(a)StMa00000001-------what does this mean?

By the way, is there an easy to use ‘utility’ I could use to print out the keycodes for my keyboard?



User avatar
Bome Software: Founder
Posts: 2436
Joined: Thu Apr 28, 2005 10:09 pm
Location: Munich, Germany

Post by florian » Thu Apr 26, 2007 12:04 pm

well, this is really quite internal stuff and not meant for human editing...

Some info:
KAM1 and KAM2 are "magics" to denote the start of key actions: "Key Action Magic". KAM1 is a simple version, KAM2 a more flexible one.

1 byte KeyType: 0: normal, 1: down, 2: up
1 byte Repeat: 1 yes, 0 no
2 bytes reserved (must be 0)

1 byte KeyType: 0: normal, 1: down, 2: up
1 byte Repeat: 1 yes, 0 no
2 bytes repeat speed (0..255)
4 bytes repeat delay (0..60000)

KeySequence is the definition of the key(s):
KSQ1 magic
4 bytes: number of following key events
per Key Event 3 bytes:
bit 9: Extended flag,
bit 10: key release
bit 11: use scan code
lower 8 bits: virtual key code, or scan code (depending on bit 11)

All numbers are hexadecimal encoded.

StMa is the magic for the Rules (internally called "Step Math").

Hope that clarifies a little...

Btw, the next version of MT will feature a "human readable" export feature, plus probably a sort of Excel export/import.


Post Reply