MIDI keyboard : can we know keys depress state?

Hi,

This should help get you started. I do not use 127 global variable yet I bit map the key state of all notes into 4 global variables:

g0 - For notes 0-31
g1 - For notes 32-63
g2 - For notes 64-95
g3 - For notes 96-127

Every time I press a note (note-on), I check which global variable to use and set a bit.
Every time I release a note (note-off), I use the same logic to clear the bit.

So now in other translators (that I have not created), you should be able to look up the note’s on/off state by looking at a given bit in the appropriate global variable.

I’ve commented the rules to help you understand the logic.

You will need to use bit shifting logic to check if a bit is set (1) or clear (0).

This post should help with that.

Note-On-Off-Bitmap.bmtp (2.3 KB)

Steve Caldwell
Bome Customer Care


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