Xbox 360 controller and hi object - problem with triggers

vesslan's icon

Hi,

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 Patch
Copy patch and select New From Clipboard in Max.

This is the patch im working on:

Sol's icon

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?

vesslan's icon

Hi!

No, unfortunately I never found a solution for this problem. So this is caused by the windows driver I guess?

Sol's icon

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.

brendan mccloskey's icon

edit:

give me ten minutes . . .

brendan mccloskey's icon

Ok, more like twenty minutes :)
The solution assumes that your incoming data is formatted as follows:

"8 leftTrigVals"
"8 rightTrigVals"
....etc

Max Patch
Copy patch and select New From Clipboard in Max.

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:

Brendan

Sol's icon

Brendan,

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!

brendan mccloskey's icon

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

Brendan

Sol's icon

Thanks, Brendan! I appreciate your help!

vincentrieuf's icon

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.

Chen Liu's icon

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 .