Impact a class for playing with the Saitek Impact game controller-based instruments


Impact is a subclass of GamePa. It knows the cookie numbers for the 

Saitek Impact X6-38U Game controller, a good controller for music.


It knows how the scale the ctl values into a range of 0 - 1: 


GamePad.normMaps[Impact.vendorID].postcs;


For using a different brand of controller, you can just add a similar map 

to GamePad.normMaps at that controllers vendorID (description to follow..)

see also Betop.help.


A newer generation of Saitek Impact has joystick values from -128 to 127. 

To adjust for, do the following:


// check the current map

Impact.normMaps[Impact.vendorID].postcs; 


( // if it uses { |val| val / -255 } etc, put these new functions in the map:

Impact.normMaps[Impact.vendorID].putAll(

( 'joyRX': { |val| val - 127 / -255 }, 

'joyLY': { |val| val + 128 /  255 }, 

'joyLX': { |val| val - 127 / -255 }, 

'joyRY': { |val| val + 128 /  255 }

   )

   // postcs to check that the new functions are there: 

).postcs;

)


A documentation image for the GamePad control layout:


unixCmd("open" + Document.current.path.dirname.quote +/+ "impact.jpg");