Ignoring key combinations with HI object.

    Jun 02 2011 | 12:41 pm
    Hi all, I'm new here, and was hoping i could ask few questions.
    I'm trying to make a DIY controller that offers solo,mute and record x 8 for use with Protools.
    I have a patch that currently uses keystrokes to trigger buttons in 'midi learn' capable plugins. This used the 'key' object, but i found that max has to be the active window for this to work.
    I've switched to the 'HI' object, but have now found that it doesn't work the same as 'key' If i hit two trigger buttons together, there is often a problem.
    If i press H (11) to trigger one command, and J (13) to trigger another simultaneously, (for example, solo track1 and unsolo track 2) HI will output the following in order
    0, 11, 13, 3339 13 0; or 0, 13, 11, 3339, 11 0
    Depending which key is let off first.
    I've filtered out numbers above say,,200 but then i'll still get
    0, 11, 13, 13, 0 or 0, 13, 11, 11, 0.
    Either way, one of the commands is going to happen twice for one keystroke.
    Is there an alternative way of handling this?
    Thanks in advance, i hope i've given enough info.

    • Jun 02 2011 | 1:04 pm
      If you look in what is present in the Max window, there is not only the key value, like 11 or 13. You also have number 29 and 31 (third in the list). I always rather use these 3rd values : they don't get repeated in case of key combinations.
    • Jun 02 2011 | 1:20 pm
      thanks for the reply..it sounds great, but...
      i don't see any print in my max window. i had a look under HItester but i don't see it there either..
      how do you harness these 3rd values yourself?
      Thanks again.
    • Jun 03 2011 | 10:00 am
      go in the [hi] maxhelp file or plug a print in first outlet ...
    • Jun 03 2011 | 2:11 pm
      hmm..i thought that might be what you meant.
      using HI and unpack is printing me the 2 values that are 4th in the list. like this
      10 22 10 0
      10 24 10 0
      looking at the max window, the 3rd element is exactly what i want, so how do i unpack that?
    • Jun 04 2011 | 5:50 pm
      Ok, i got it sorted...
      Used hi -> pack -> route (*) where * is the number i want from this list.
      thanks for your help :)