Midi Input Sequence to Trigger Single Keystroke Ouput

Is it possible to create a translation that requires a sequence of MIDI inputs to output a single keystroke

For example: I would like to play a C major scale on my MIDI piano and that would output a single “C” keystroke from my computer keyboard.

I know you can set multiple MIDI inputs to output the same keystroke output, but if I were to do that it would cause multiple keystroke outputs, where I am only looking for one.

Maybe I can mess around with a delay time or something?

Any help or suggestions appreciated.

Thank you for your help!

Best,
evil0

Hi and welcome to the Bome community!

You request is a bit complex, however it can be done. See the attached project file.

We have 6 translators that set or clear the 3 bits of a global variable ga with notes C,E and G. Bit 0 is C, bit 1 is E and bit 2 is G. The first 3 translators set the bits when a key is pressed. The second 3 translators clear the bits as the key is released. The rules are bitmapping rules that individually set of clear the bits.

Then we have 2 translators that look at any note within the range and trigger a timer with a delay of 8 ms to give time to evaluate the incoming value. It is likely that you will not press the 3 keys at exactly the same time so 8 ms might be good compromise for introduced latency.

Then the timers evaluate the value of ga to determine if to play a chord or to release it. If all keys are done the letter “A” is send as a key down message. All 3 keys will need to be released to trigger the letter “A” as a key up message.

Of course you can change the letter pressed and released to anything you want.
Also, I’m only evaluating the C major chord within one octave, Also you might want to tweak the delay to your needs. Too short of a delay may result in duplicate key message and too long result in too much latency.

I hope this helps or at least give you some ideas on where to go from here.

Chord-to-KeyStroke-Demo.bmtp (3.2 KB)

Steve Caldwell
Bome Customer Care


Also available for paid consulting services: bome@sniz.biz

Hello Steve,

Thank you for your response! I am looking at your demo file and it does seem to work as you explained.
Is there further documentation on the rules you used in this project file?

I am a little confused with bits, ga, etc…
I see C is 1, E is 2, and G is 4

Is this why the Evaluating On rule looks for ga!=7? because 1+2+4 = 7?

I know this is unnecessarily complex and probably not the intended use of the software, but it does seem like my idea is possible so I would like to continue looking into this!

Yes, I’m using a bitmap to reduce the number of global variables needed and to make it quicker to evaluate the cord. Yes binary 1,2,4,8,16,32 etc for bits 0 1 2 3 4 5 6. I’m just using the first 3 bits.

The rules are documented in the Bome MIDI Translator Guide. It is in PDF format and you can get to it by pressing F1 while in Bome MIDI Translator or going to the help menu. Normally I don’t answer in such a complex manner but indeed you had a complex question and solution so needed more complexity in the answer.

Steve Caldwell
Bome Customer Care


Also available for paid consulting services: bome@sniz.biz