Xbox 360 controller and hi object - problem with triggers

    Oct 31 2012 | 12:50 pm
    Im trying to hook up the 360 controller to Max and send OSC messages to a audio engine called wwise. The connection works well, but I have a problem with the data comming from the triggers on the back of the controllers.
    When I press the right trigger it sends the message "8" with a value from 32767 to 127. When I press the left trigger it sends the same message "8" but with values going from 32767 to 65407.
    Right now I just look at the number and if its bigger than the initial value 32767 I know that the left trigger is pressed and if its smaller the right trigger is pressed. But how am I supposed to know if both are being pressed simultaneously?
    This might be a problem with the hi device not being fully compatible with the controller, or maybe Im missing something..
    Any help would be very appreciated.
    Max Patcher
    In Max, select New From Clipboard.
    This is the patch im working on:

    • Jul 28 2013 | 9:28 pm
      It's a Windows driver problem. The Mac driver reads both triggers as separate elements, but with PC we have the problem of them being the same element.
      I'm working on porting my Mac Xbox patch to PC, so I just ran into this issue recently. Have you been able to find a work-around?
    • Jul 29 2013 | 10:23 am
      No, unfortunately I never found a solution for this problem. So this is caused by the windows driver I guess?
    • Jul 29 2013 | 2:55 pm
      That's a bummer. The windows driver combine the two triggers as one element, the Z-axis. It's odd, but apparently that's how it is for Xbox too. The hardware itself reads it as two separate elements, that's how the fan-made driver for Mac was able to separate the two.
      I guess when programming the controller to work with games there's always some kind of work around. I don't know if it'll work in Max, but if I find a solution I'll post it here!
      Let me know if you're able to find some kind of solution.
    • Jul 29 2013 | 3:47 pm
      give me ten minutes . . .
    • Jul 29 2013 | 4:38 pm
      Ok, more like twenty minutes :) The solution assumes that your incoming data is formatted as follows:
      "8 leftTrigVals" "8 rightTrigVals" ....etc
      Max Patcher
      In Max, select New From Clipboard.
      The challenge is to remove unwanted data and to identify and tag wanted data. If the two separate streams are coming in as one combined then, this may not be what you seek and I will need more time. . . . HTH:
    • Aug 02 2013 | 3:47 pm
      I tested out your patch by adding it to mine. It works a lot better than what I had for the triggers and it's a good enough work-around for now, but I was wondering if there is anyway that the data values could be sent more smoothly. They seem to jump over some values as the triggers are pressed down. Also, pressing both of the triggers at the same time kind of works now, but every so often their values jump back down to zero.
      I really appreciate that you took the time to write out this patch. Again, it's a good work-around and I'm satisfied for now. Let me know if you're able to make it more smooth. I'll be testing it more too. Thanks!
    • Aug 02 2013 | 4:25 pm
      Hi If you're getting what sounds like foldover behaviour, use the zmap or scale plus clip objects. As for smoothing, type that word into the forum search box for a universe of solutions
    • Aug 02 2013 | 6:46 pm
      Thanks, Brendan! I appreciate your help!
    • Jan 13 2016 | 12:53 am
      Any new info on this problem, Moded drivers? New techniques" The problem is still pending? Can't find any solution or explanation why the output data is so weird on windows.
    • Aug 16 2017 | 2:42 am
      could you please teach me how to connect Wwise and Max with OSC???I'm a game audio designer and try to do some intereactive works but struggled in this such things .