============================================================================== = define generic event timestamp struct (probably Pd-ized input_event ) The question is whether the timeval is needed at all. Linux and Darwin support it. Currently, I can only think of UPS PWR events actually using timevals. =============================================================================== = HID Manager Type/Usage/UsagePage -> Linux Type/Code mapping UsagePage LED UsagePage => ev_led LED Usages == Linux ev_led codes ============================================================================== = device selection by # (1,2,...), generic name (mouse1, joystick2, tablet3...), or device name ("Trackpad", "Microsoft 5-button Mouse with IntelliEye(TM)", etc.) first get # working, that's probably the easiest by # ------------------------------ GNU/Linux sprintf(x_devname->s_name,"/dev/input/event%d",deviceNum + 1); Darwin prHIDBuildDeviceList(); currentHIDDevice = discoveredDevices[gNumberOfHIDDevices]; ============================================================================== = figure out how to store device ID in obj struct (in SC_HID.c its locID and cookie) - it should probably just store the Pd arguments - this will have to be dealt with when the "mouse0", "joystick2" arguments are implemented ============================================================================== = pollfn for mouse-like devices - determine whether using a pollfn is actually better than using a t_clock - any device that acts like a system mouse can be used with a pollfn, since the mouse data will go thru Pd's network port, triggering the pollfn. - this is probably unnecessary since the t_clock seems to run well at 1ms delay ============================================================================== = function return values - most functions probably do not need return values - return (1) seems to be the default on many functions ============================================================================== = control input messages - the [delay( message should be replaced by the [poll( msg - should [poll( also start things, or should it just set polling time? - are [start( and [stop( needed? is 0/1 enough? ============================================================================== = consistent console output void hid_post(const char *format, const char *); ============================================================================== = if device is closed and obj is started, open device and start ============================================================================== = catalog Linux device behavior - more data needed to make the proper [hid] output for MacOS X - catalog hatswitch behavior - catalog axis directions: right/down positive? left/up negative? ============================================================================== = event name changes - make key/button Type btn rather than key (undecided on this one) ============================================================================== = make [macosxevent] - so much info is lost in the translation to a common event scheme that it would be quite handy to have a [macosxevent] object. This would give access to the entire range of devices supported by HID Manager. ============================================================================== = device 0 gets events for all available devices - it might be useful to have device #0 open all available devices and output the events. ============================================================================== = mapping object ideas - log - exponential - [noterange] scale an input range to an output range of MIDI note #s ______________________________________________________________________________ ------------------------------------------------------------------------------ BUGS ______________________________________________________________________________ ------------------------------------------------------------------------------ ______________________________________________________________________________ - BUG x->x_delay reset to default when device is opened ______________________________________________________________________________ - BUG: [mouse] and [joystick] arguments don't work to open device ______________________________________________________________________________ - BUG: [open('ing a device causes all other active [hid] objs to have their devices closed - this means only one [hid] object can have an open device at one time - I thought this was due to the hid_close_device() call in hid_open(), which releases the device list, but this doesn't seem to be the case. ______________________________________________________________________________ - BUG: getting events from the queue doesn't output a 0 value event when the motion stops, so when the mouse stops, the sound keeps playing. This is probably only a problem on relative axes. This will probably have to be implemented on a platform-specific level: - On Darwin/MacOSX, I think that the HIDGetEvent() loop will have to be followed by one call to HIDGetElementValue() ______________________________________________________________________________ - BUG: hatswitches on MacOS X output an event without a change in value Because of the currnently implementation of the conversion of the MacOS X style event to the Linux style event, an event with a value of zero is output on the unchanged axis when the hatswitch is moved in along the X or Y axis (as opposed to diagonally).