Understanding the polling information from an xbox360 controller
Ive just created a Max patch to allow me to use an xbox360 controller to control sounds in max, using the ‘making connections’ tutorial (http://www.cycling74.com/story/2007/3/12/113645/135).
It worked well and i have sound, but i have two questions that im unsure about!
1) the tutorial reckoned i should get an output of 0-255 for the controls, unless i have a 10-bit precision device. Im assuming the xbox360 controller must be the 10-bit precision kind as i get outputs of up to around 30 thousand for the x-y joysticks. Is this right?
2) In trying to work out which hi index numbers relate to which controls, things seem a little more complicated than i expected. From what i understand from the tutorial if i press a button i should expect it to output two numbers – the first being the index number for that button and the second being the value of that control. However i think the controller must be outputting more than just the value of the button pressed, as when i hit the ‘A’ button for example i get an output of hi:21 1 and hi:21 0 (which i assume is the on/off for button A), but also i get hi values for index numbers 27, 28, 29 and 30. What i dont understand is what these index numbers represent, as they seem to be outputted whenever any of the controls on the controller are pressed.
My inclination so far is that perhaps these index numbers represent the x-y values for the two joysticks, and that they are outputted every time another button is pressed for some reason! Its strange though because i seem to get a random selection of the 27,28,29 or 30 index number values every time i press a button.
Anyone have any ideas about this?
i’ve never fully understood all the information coming out of hi. but the point is, i don’t need to. just isolate the numbers that are changing based on your controller movements, and seem to make sense based on those movements, and ignore the rest.
just my 2 cents.