2 summary:: pattern that polls values from an OSX hid device
3 related:: Classes/PhidKey, Classes/PhidSlot
4 categories:: Streams-Patterns-Events>Patterns>User Input
9 This class is OSX specific. Please use the cross platform versions (based on link::Classes/GeneralHID::), link::Classes/PhidKey:: or link::Classes/PhidSlot::, instead.
17 one element of the interface of the device, like a button or an axis. Can be an index or, if the devicespec is present, also a symbol.
20 the index of the device, defaults to 0 (first device).
23 number of values to return.
28 // while this is running, test your device
40 // for example wingman. for other specs see HIDDeviceService
42 HIDDeviceService.deviceSpecs.put('WingMan Action Pad',
45 \a -> 0, \b-> 1, \c-> 2,
46 \x-> 3, \y-> 4, \z-> 5,
51 \xx-> 10, //analog controller x axis
52 \yy-> 11, //analog controller y axis
59 // then you can use the named key:
74 \freq, Pseq([Phid(\x,0,8),Phid(\y,0,8)],inf) * 500 + 200,
75 \dur, Phid(\slider) + 0.02,
76 \pan, Phid(\hat) * 2 - 1