flat assembler
Message board for the users of flat assembler.

Index > Tutorials and Examples > Conversion of MIDI input into keystrokes

Author
Thread Post new topic Reply to topic
Tomasz Grysztar



Joined: 16 Jun 2003
Posts: 8356
Location: Kraków, Poland
Tomasz Grysztar 26 Nov 2013, 08:01
This is a research project that I wrote 10 years ago for the founder of flatassembler.net website. Since I got permission to reuse it for other purposes, I decided to release it as an example (though poorly commented).

This program detects chords pressed on MIDI keyboard and converts them into sequences of keystrokes. The mapping is defined with a simple text file, with definitions like:
Code:
0x4790,0x4490 = 0x54,0x48,0x45    
The left side defines the MIDI codes for the keys that have to be pressed simultaneously (a chord), and the right side defines the sequence of virtual keystrokes that will be generated. It is possible to convert key release, too - the default mapping which comes with the package translates many of the individual MIDI keys to a single keystrokes, and it includes Ctrl and Shift, which have to handle both the press and release events.

When the chord that is pressed on the MIDI keyboard is a superset of more than one chord defined in he mapping, the program uses the largest one. And no MIDI code can participate in more than one chord at the time.

The package also contains two additional simple tools that were written to help in preparing the mapping files. One of them captures the MIDI codes, and the other one captures the keystrokes, displaying their codes in a form that can be copied directly into the .SKL mapping file


Description: StormKey v1.0
Download
Filename: StormKey.zip
Filesize: 19.91 KB
Downloaded: 717 Time(s)

Post 26 Nov 2013, 08:01
View user's profile Send private message Visit poster's website Reply with quote
tom tobias



Joined: 09 Sep 2003
Posts: 1320
Location: usa
tom tobias 26 Nov 2013, 12:20
interesting...
Post 26 Nov 2013, 12:20
View user's profile Send private message Reply with quote
Display posts from previous:
Post new topic Reply to topic

Jump to:  


< Last Thread | Next Thread >
Forum Rules:
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Copyright © 1999-2024, Tomasz Grysztar. Also on GitHub, YouTube.

Website powered by rwasa.