Update of /cvsroot/pure-data/externals/hcs/hid In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv22992
Modified Files: TODO hid-help.pd hid.h hid_darwin.c hid_linux.c joystick-help.pd mouse-help.pd Added Files: buttongate-help.pd buttongate.pd Log Message: converted button codes to a numbered scheme; added [buttongate]
Index: TODO =================================================================== RCS file: /cvsroot/pure-data/externals/hcs/hid/TODO,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** TODO 14 Nov 2004 22:29:43 -0000 1.4 --- TODO 15 Nov 2004 04:05:39 -0000 1.5 *************** *** 78,88 ****
============================================================================== - = ditch x_devname in hid_linux.c - - - use sprintf(arg,"/dev/input/event%d",x_ddevice_number); instead - - - - ============================================================================== = consistent console output
--- 78,81 ---- *************** *** 97,108 **** = event name changes
! - make key/button Type ev_btn rather than ev_key
- - perhaps remove the "ev_" prefix on event Types for efficiency and clarity
============================================================================== = mapping object ideas
! - [mousefilter]-like object to easily control things with a button
______________________________________________________________________________ --- 90,100 ---- = event name changes
! - make key/button Type btn rather than key (undecided on this one)
============================================================================== = mapping object ideas
!
______________________________________________________________________________
Index: hid_darwin.c =================================================================== RCS file: /cvsroot/pure-data/externals/hcs/hid/hid_darwin.c,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** hid_darwin.c 14 Nov 2004 22:29:43 -0000 1.8 --- hid_darwin.c 15 Nov 2004 04:05:39 -0000 1.9 *************** *** 73,87 **** */
! void convertAxis(pRecElement element, char *linux_type, char *linux_code, char axis) { if (element->relative) { sprintf(linux_type,"rel"); ! sprintf(linux_code,"rel_%c",axis); } else { sprintf(linux_type,"abs"); ! sprintf(linux_code,"abs_%c",axis); } } --- 73,87 ---- */
! void convertAxis(pRecElement element, char *linux_type, char *linux_code, char *axis) { if (element->relative) { sprintf(linux_type,"rel"); ! sprintf(linux_code,"rel_%s",axis); } else { sprintf(linux_type,"abs"); ! sprintf(linux_code,"abs_%s",axis); } } *************** *** 104,113 **** switch (element->usage) { ! case kHIDUsage_GD_X: convertAxis(element, linux_type, linux_code, 'x'); break; ! case kHIDUsage_GD_Y: convertAxis(element, linux_type, linux_code, 'y'); break; ! case kHIDUsage_GD_Z: convertAxis(element, linux_type, linux_code, 'z'); break; ! case kHIDUsage_GD_Rx: convertAxis(element, linux_type, linux_code, 'x'); break; ! case kHIDUsage_GD_Ry: convertAxis(element, linux_type, linux_code, 'y'); break; ! case kHIDUsage_GD_Rz: convertAxis(element, linux_type, linux_code, 'z'); break; case kHIDUsage_GD_Wheel: sprintf(linux_type,"rel");sprintf(linux_code,"rel_wheel");break; --- 104,113 ---- switch (element->usage) { ! case kHIDUsage_GD_X: convertAxis(element, linux_type, linux_code, "x"); break; ! case kHIDUsage_GD_Y: convertAxis(element, linux_type, linux_code, "y"); break; ! case kHIDUsage_GD_Z: convertAxis(element, linux_type, linux_code, "z"); break; ! case kHIDUsage_GD_Rx: convertAxis(element, linux_type, linux_code, "rx"); break; ! case kHIDUsage_GD_Ry: convertAxis(element, linux_type, linux_code, "ry"); break; ! case kHIDUsage_GD_Rz: convertAxis(element, linux_type, linux_code, "rz"); break; case kHIDUsage_GD_Wheel: sprintf(linux_type,"rel");sprintf(linux_code,"rel_wheel");break; *************** *** 173,177 **** DEBUG(post("[hid] found %d elements:",numElements);); ! post("-----------------------------------------------------------"); post(" TYPE\t\tCODE\tEVENT NAME"); post("-----------------------------------------------------------"); --- 173,177 ---- DEBUG(post("[hid] found %d elements:",numElements);); ! post(""); post(" TYPE\t\tCODE\tEVENT NAME"); post("-----------------------------------------------------------"); *************** *** 185,189 **** pCurrentHIDElement = HIDGetNextDeviceElement (pCurrentHIDElement, kHIDElementTypeInput); } ! post("-----------------------------------------------------------");
return (0); --- 185,189 ---- pCurrentHIDElement = HIDGetNextDeviceElement (pCurrentHIDElement, kHIDElementTypeInput); } ! post("");
return (0);
Index: hid_linux.c =================================================================== RCS file: /cvsroot/pure-data/externals/hcs/hid/hid_linux.c,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** hid_linux.c 7 Nov 2004 16:28:25 -0000 1.4 --- hid_linux.c 15 Nov 2004 04:05:39 -0000 1.5 *************** *** 38,41 **** --- 38,101 ---- */
+ + /* ============================================================================== */ + /* LINUX-SPECIFIC SUPPORT FUNCTIONS */ + /* ============================================================================== */ + + void hid_list_devices(void) + { + int i,fd; + char device_output_string[256] = "Unknown"; + char device_name[20] = "/dev/input/event0"; + + post(""); + for (i=0;i<128;++i) + { + sprintf(device_name,"/dev/input/event%d",i); + if (device_name) + { + /* open the device read-only, non-exclusive */ + fd = open (device_name, O_RDONLY | O_NONBLOCK); + /* test if device open */ + if (fd < 0 ) + { + fd = -1; + } + else + { + /* get name of device */ + ioctl(fd, EVIOCGNAME(sizeof(device_output_string)), device_output_string); + post("Device %d: '%s' on '%s'", i, device_output_string, device_name); + + close (fd); + } + } + } + post(""); + } + + void hid_convert_linux_buttons_to_numbers(__u16 linux_code, char *hid_code) + { + if(linux_code >= 0x100) + { + if(linux_code < BTN_MOUSE) + sprintf(hid_code,"btn_%d",linux_code - BTN_MISC); /* numbered buttons */ + else if(linux_code < BTN_JOYSTICK) + sprintf(hid_code,"btn_%d",linux_code - BTN_MOUSE); /* mouse buttons */ + else if(linux_code < BTN_GAMEPAD) + sprintf(hid_code,"btn_%d",linux_code - BTN_JOYSTICK); /* joystick buttons */ + else if(linux_code < BTN_DIGI) + sprintf(hid_code,"btn_%d",linux_code - BTN_GAMEPAD); /* gamepad buttons */ + else if(linux_code < BTN_WHEEL) + sprintf(hid_code,"btn_%d",linux_code - BTN_DIGI); /* tablet buttons */ + else if(linux_code < KEY_OK) + sprintf(hid_code,"btn_%d",linux_code - BTN_WHEEL); /* wheel buttons */ + } + } + + /* ============================================================================== */ + /* Pd [hid] FUNCTIONS */ + /* ============================================================================== */ + t_int hid_get_events(t_hid *x) { *************** *** 61,65 **** SETSYMBOL(event_data, gensym(ev[hid_input_event.type])); /* code */ ! SETSYMBOL(event_data + 1, gensym(event_names[hid_input_event.type][hid_input_event.code])); /* value */ SETFLOAT(event_data + 2, (t_float)hid_input_event.value); --- 121,134 ---- SETSYMBOL(event_data, gensym(ev[hid_input_event.type])); /* code */ ! if (hid_input_event.type == EV_KEY) ! { ! char hid_code[7]; ! hid_convert_linux_buttons_to_numbers(hid_input_event.code,hid_code); ! SETSYMBOL(event_data + 1, ! gensym(hid_code)); ! } ! else ! SETSYMBOL(event_data + 1, ! gensym(event_names[hid_input_event.type][hid_input_event.code])); /* value */ SETFLOAT(event_data + 2, (t_float)hid_input_event.value); *************** *** 82,91 **** DEBUG(post("hid_open_device"););
! char arg[20]; struct input_event hid_input_event; unsigned long bitmask[EV_MAX][NBITS(KEY_MAX)]; char devicename[256] = "Unknown"; t_int event_type, event_code; ! char *event_typeName = ""; /* counts for various event types */ t_int synCount,keyCount,relCount,absCount,mscCount,ledCount,sndCount,repCount,ffCount,pwrCount,ff_statusCount; --- 151,160 ---- DEBUG(post("hid_open_device"););
! char device_name[20]; struct input_event hid_input_event; unsigned long bitmask[EV_MAX][NBITS(KEY_MAX)]; char devicename[256] = "Unknown"; t_int event_type, event_code; ! char *event_type_name = ""; /* counts for various event types */ t_int synCount,keyCount,relCount,absCount,mscCount,ledCount,sndCount,repCount,ffCount,pwrCount,ff_statusCount; *************** *** 94,108 ****
x->x_device_number = device_number; ! sprintf(arg,"/dev/input/event%d",x->x_device_number); ! x->x_devname = gensym(arg);
! if (x->x_devname) { /* open the device read-only, non-exclusive */ ! x->x_fd = open(x->x_devname->s_name, O_RDONLY | O_NONBLOCK); /* test if device open */ if (x->x_fd < 0 ) { ! error("[hid] open %s failed",x->x_devname->s_name); x->x_fd = -1; return 1; --- 163,176 ----
x->x_device_number = device_number; ! sprintf(device_name,"/dev/input/event%d",x->x_device_number);
! if (device_name) { /* open the device read-only, non-exclusive */ ! x->x_fd = open(device_name, O_RDONLY | O_NONBLOCK); /* test if device open */ if (x->x_fd < 0 ) { ! error("[hid] open %s failed",device_name); x->x_fd = -1; return 1; *************** *** 118,122 **** ioctl(x->x_fd, EVIOCGNAME(sizeof(devicename)), devicename); post ("\nConfiguring device %d as %s (%s)", ! x->x_device_number,devicename,x->x_devname->s_name);
/* get bitmask representing supported events (axes, keys, etc.) */ --- 186,190 ---- ioctl(x->x_fd, EVIOCGNAME(sizeof(devicename)), devicename); post ("\nConfiguring device %d as %s (%s)", ! x->x_device_number,devicename,device_name);
/* get bitmask representing supported events (axes, keys, etc.) */ *************** *** 137,157 **** switch(event_type) { ! case EV_SYN: event_typeName = "Synchronization"; break; ! case EV_KEY: event_typeName = "Keys/Buttons"; break; ! case EV_REL: event_typeName = "Relative Axes"; break; ! case EV_ABS: event_typeName = "Absolute Axes"; break; ! case EV_MSC: event_typeName = "Miscellaneous"; break; ! case EV_LED: event_typeName = "LEDs"; break; ! case EV_SND: event_typeName = "System Sounds"; break; ! case EV_REP: event_typeName = "Autorepeat Values"; break; ! case EV_FF: event_typeName = "Force Feedback"; break; ! case EV_PWR: event_typeName = "Power"; break; ! case EV_FF_STATUS: event_typeName = "Force Feedback Status"; break; } ! post(" %s (%s/type %d) ", event_typeName, ev[event_type] ? ev[event_type] : "?", event_type); /* get bitmask representing supported button types */ ioctl(x->x_fd, EVIOCGBIT(event_type, KEY_MAX), bitmask[event_type]); /* cycle through all possible event codes (axes, keys, etc.) * testing to see which are supported --- 205,229 ---- switch(event_type) { ! case EV_SYN: event_type_name = "Synchronization"; break; ! case EV_KEY: event_type_name = "Keys/Buttons"; break; ! case EV_REL: event_type_name = "Relative Axis"; break; ! case EV_ABS: event_type_name = "Absolute Axis"; break; ! case EV_MSC: event_type_name = "Miscellaneous"; break; ! case EV_LED: event_type_name = "LEDs"; break; ! case EV_SND: event_type_name = "System Sounds"; break; ! case EV_REP: event_type_name = "Autorepeat Values"; break; ! case EV_FF: event_type_name = "Force Feedback"; break; ! case EV_PWR: event_type_name = "Power"; break; ! case EV_FF_STATUS: event_type_name = "Force Feedback Status"; break; } ! // post(" %s (%s) ", event_type_name, ev[event_type] ? ev[event_type] : "?", event_type); /* get bitmask representing supported button types */ ioctl(x->x_fd, EVIOCGBIT(event_type, KEY_MAX), bitmask[event_type]); + post(""); + post(" TYPE\t\tCODE\tEVENT NAME"); + post("-----------------------------------------------------------"); + /* cycle through all possible event codes (axes, keys, etc.) * testing to see which are supported *************** *** 161,167 **** if (test_bit(event_code, bitmask[event_type])) { ! post(" %s (%d)", event_names[event_type] ? (event_names[event_type][event_code] ? event_names[event_type][event_code] : "?") : "?", event_code); /* post(" Event code %d (%s)", event_code, names[event_type] ? (names[event_type][event_code] ? names[event_type][event_code] : "?") : "?"); */ ! switch(event_type) { /* --- 233,252 ---- if (test_bit(event_code, bitmask[event_type])) { ! if ((event_type == EV_KEY) && (event_code >= BTN_MISC) && (event_code < KEY_OK) ) ! { ! char hid_code[7]; ! hid_convert_linux_buttons_to_numbers(event_code,hid_code); ! post(" %s\t\t%s\t%s", ! ev[event_type] ? ev[event_type] : "?", ! hid_code, ! event_names[event_type] ? (event_names[event_type][event_code] ? event_names[event_type][event_code] : "?") : "?"); ! } ! else ! post(" %s\t\t%s\t%s", ! ev[event_type] ? ev[event_type] : "?", ! event_names[event_type] ? (event_names[event_type][event_code] ? event_names[event_type][event_code] : "?") : "?", ! event_type_name); /* post(" Event code %d (%s)", event_code, names[event_type] ? (names[event_type][event_code] ? names[event_type][event_code] : "?") : "?"); */ ! switch(event_type) { /* *************** *** 228,234 **** --- 313,327 ---- * the current t_float, then this will probably need to be changed. */ + + hid_list_devices(); + return (0); }
+ void hid_platform_specific_free(t_hid *x) + { + /* nothing to be done here on GNU/Linux */ + } +
Index: joystick-help.pd =================================================================== RCS file: /cvsroot/pure-data/externals/hcs/hid/joystick-help.pd,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** joystick-help.pd 14 Nov 2004 22:29:43 -0000 1.2 --- joystick-help.pd 15 Nov 2004 04:05:39 -0000 1.3 *************** *** 1,4 **** #N canvas 96 237 669 433 10; ! #X obj 168 41 tgl 25 0 empty empty empty 0 -6 0 8 -225271 -1 -1 1 1 ; #X floatatom 63 184 7 0 0 3 Y-axis - -; --- 1,4 ---- #N canvas 96 237 669 433 10; ! #X obj 168 41 tgl 25 0 empty empty empty 0 -6 0 8 -225271 -1 -1 0 1 ; #X floatatom 63 184 7 0 0 3 Y-axis - -; *************** *** 36,41 **** 0; #X msg 215 43 open 1; - #X msg 220 62 open 2; - #X msg 225 81 open 3; #X text 1 382 (C) Copyright 2004 Hans-Christoph Steiner hans@at.or.at ; --- 36,39 ---- *************** *** 47,50 **** --- 45,50 ---- #X floatatom 225 184 5 0 0 0 - - -; #X floatatom 268 184 5 0 0 0 - - -; + #X msg 220 62 open 3; + #X msg 225 81 open 4; #X connect 0 0 14 0; #X connect 9 0 3 0; *************** *** 62,67 **** #X connect 14 2 7 0; #X connect 14 3 8 0; ! #X connect 14 4 31 0; ! #X connect 14 5 32 0; #X connect 14 6 19 0; #X connect 14 6 9 0; --- 62,67 ---- #X connect 14 2 7 0; #X connect 14 3 8 0; ! #X connect 14 4 29 0; ! #X connect 14 5 30 0; #X connect 14 6 19 0; #X connect 14 6 9 0; *************** *** 69,72 **** #X connect 19 1 18 0; #X connect 22 0 14 0; ! #X connect 23 0 14 0; ! #X connect 24 0 14 0; --- 69,72 ---- #X connect 19 1 18 0; #X connect 22 0 14 0; ! #X connect 31 0 14 0; ! #X connect 32 0 14 0;
Index: mouse-help.pd =================================================================== RCS file: /cvsroot/pure-data/externals/hcs/hid/mouse-help.pd,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** mouse-help.pd 14 Nov 2004 22:29:43 -0000 1.4 --- mouse-help.pd 15 Nov 2004 04:05:39 -0000 1.5 *************** *** 7,15 **** #X floatatom 85 218 7 0 0 3 Y - -; #X floatatom 31 218 7 0 0 3 X - -; ! #X obj 193 287 tgl 25 0 empty empty empty 0 -6 0 8 -195568 -1 -1 0 1; ! #X obj 238 287 tgl 25 0 empty empty empty 0 -6 0 8 -195568 -1 -1 0 1; ! #X obj 284 287 tgl 25 0 empty empty empty 0 -6 0 8 -195568 -1 -1 0 1; #X msg 175 43 open 0; --- 7,15 ---- #X floatatom 85 218 7 0 0 3 Y - -; #X floatatom 31 218 7 0 0 3 X - -; ! #X obj 193 285 tgl 25 0 empty empty empty 0 -6 0 8 -195568 -1 -1 0 1; ! #X obj 238 284 tgl 25 0 empty empty empty 0 -6 0 8 -195568 -1 -1 0 1; ! #X obj 283 284 tgl 25 0 empty empty empty 0 -6 0 8 -195568 -1 -1 0 1; #X msg 175 43 open 0; *************** *** 56,74 **** #X obj 211 191 unpack symbol float; #X text 282 234 buttons; ! #X obj 193 264 route btn_1 btn_2 btn_3 btn_4 btn_5 btn_6 btn_7 btn_8 ! ; ! #X obj 330 287 tgl 25 0 empty empty empty 0 -6 0 8 -195568 -1 -1 0 1; ! #X obj 376 287 tgl 25 0 empty empty empty 0 -6 0 8 -195568 -1 -1 0 1; ! #X obj 421 287 tgl 25 0 empty empty empty 0 -6 0 8 -195568 -1 -1 0 1; ! #X obj 467 287 tgl 25 0 empty empty empty 0 -6 0 8 -195568 -1 -1 0 1; ! #X obj 513 287 tgl 25 0 empty empty empty 0 -6 0 8 -195568 -1 -1 0 1; #X obj 2 2 cnv 15 650 20 empty empty [mouse] 2 11 1 18 -233017 -66577 0; ! #X obj 559 287 tgl 25 0 empty empty empty 0 -6 0 8 -195568 -1 -1 0 1; #X text 1 372 (C) Copyright 2004 Hans-Christoph Steiner hans@at.or.at --- 56,72 ---- #X obj 211 191 unpack symbol float; #X text 282 234 buttons; ! #X obj 329 284 tgl 25 0 empty empty empty 0 -6 0 8 -195568 -1 -1 0 1; ! #X obj 374 284 tgl 25 0 empty empty empty 0 -6 0 8 -195568 -1 -1 0 1; ! #X obj 419 284 tgl 25 0 empty empty empty 0 -6 0 8 -195568 -1 -1 0 1; ! #X obj 465 284 tgl 25 0 empty empty empty 0 -6 0 8 -195568 -1 -1 0 1; ! #X obj 510 284 tgl 25 0 empty empty empty 0 -6 0 8 -195568 -1 -1 0 1; #X obj 2 2 cnv 15 650 20 empty empty [mouse] 2 11 1 18 -233017 -66577 0; ! #X obj 555 284 tgl 25 0 empty empty empty 0 -6 0 8 -195568 -1 -1 0 1; #X text 1 372 (C) Copyright 2004 Hans-Christoph Steiner hans@at.or.at *************** *** 79,82 **** --- 77,84 ---- #X obj 526 340 all_about_hid; #X text 417 341 For more info:; + #X obj 601 284 tgl 25 0 empty empty empty 0 -6 0 8 -195568 -1 -1 0 + 1; + #X obj 193 264 route btn_0 btn_1 btn_2 btn_3 btn_4 btn_5 btn_6 btn_7 + btn_8; #X connect 1 0 18 0; #X connect 9 0 18 0; *************** *** 91,104 **** #X connect 18 2 3 0; #X connect 18 3 19 0; ! #X connect 18 3 21 0; #X connect 19 0 0 0; #X connect 19 1 2 0; ! #X connect 21 0 6 0; ! #X connect 21 1 7 0; ! #X connect 21 2 8 0; ! #X connect 21 3 22 0; ! #X connect 21 4 23 0; ! #X connect 21 5 24 0; ! #X connect 21 6 25 0; ! #X connect 21 7 26 0; ! #X connect 21 8 28 0; --- 93,107 ---- #X connect 18 2 3 0; #X connect 18 3 19 0; ! #X connect 18 3 35 0; #X connect 19 0 0 0; #X connect 19 1 2 0; ! #X connect 35 0 6 0; ! #X connect 35 1 7 0; ! #X connect 35 2 8 0; ! #X connect 35 3 21 0; ! #X connect 35 4 22 0; ! #X connect 35 5 23 0; ! #X connect 35 6 24 0; ! #X connect 35 7 25 0; ! #X connect 35 8 27 0; ! #X connect 35 9 34 0;
--- NEW FILE: buttongate.pd --- #N canvas 367 43 501 384 10; #X obj 224 82 hid $1; #X obj 224 24 inlet; #X obj 224 107 route key; #X obj 224 137 route $2; #X obj 104 26 inlet; #X obj 104 245 outlet; #X obj 104 214 spigot; #X text 9 278 (C) Copyright 2004 Hans-Christoph Steiner hans@at.or.at ; #X text 226 292 released under the GNU GPL; #X text 16 329 $Author: eighthave $; #X text 16 346 $Date: 2004/11/15 04:05:39 $; #X text 16 312 $Revision: 1.1 $; #X obj 319 21 loadbang; #X msg 319 42 1; #X obj 224 170 unpack f f; #X text 5 6 [buttongate]; #X connect 0 0 2 0; #X connect 1 0 0 0; #X connect 2 0 3 0; #X connect 3 0 14 0; #X connect 4 0 6 0; #X connect 6 0 5 0; #X connect 12 0 13 0; #X connect 13 0 0 0; #X connect 14 0 6 1;
Index: hid.h =================================================================== RCS file: /cvsroot/pure-data/externals/hcs/hid/hid.h,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 *** hid.h 7 Nov 2004 16:28:25 -0000 1.9 --- hid.h 15 Nov 2004 04:05:39 -0000 1.10 *************** *** 26,30 **** t_object x_obj; t_int x_fd; - t_symbol *x_devname; t_int x_device_number; t_clock *x_clock; --- 26,29 ----
Index: hid-help.pd =================================================================== RCS file: /cvsroot/pure-data/externals/hcs/hid/hid-help.pd,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 *** hid-help.pd 14 Nov 2004 22:29:43 -0000 1.9 --- hid-help.pd 15 Nov 2004 04:05:39 -0000 1.10 *************** *** 1,4 **** ! #N canvas 267 62 963 686 10; ! #X msg 430 325 rel rel_x 0 3.31743e+09; #X obj 430 304 prepend set; #X obj 149 473 route rel_x rel_y; --- 1,4 ---- ! #N canvas 148 25 908 628 10; ! #X msg 430 325 rel rel_y -6 1.10049e+09; #X obj 430 304 prepend set; #X obj 149 473 route rel_x rel_y; *************** *** 16,20 **** #X floatatom 206 454 7 0 0 0 - - -; #X floatatom 264 454 7 0 0 0 - - -; ! #X obj 86 81 tgl 35 0 empty empty empty 0 -6 0 8 -24198 -1 -1 0 25 ; #X floatatom 490 402 12 0 0 1 value - -; --- 16,20 ---- #X floatatom 206 454 7 0 0 0 - - -; #X floatatom 264 454 7 0 0 0 - - -; ! #X obj 86 81 tgl 35 0 empty empty empty 0 -6 0 8 -24198 -1 -1 25 25 ; #X floatatom 490 402 12 0 0 1 value - -; *************** *** 49,57 **** #X msg 336 113 refresh; #X text 397 111 refresh device list; ! #X obj 94 524 unpack s f f; ! #X obj 133 542 tgl 25 0 empty empty any_button 27 13 1 9 -195568 -1 ! -1 0 1; ! #X obj 746 556 all_about_hid; ! #X text 637 557 For more info:; #X text 49 588 (C) Copyright 2004 Hans-Christoph Steiner hans@at.or.at ; --- 49,54 ---- #X msg 336 113 refresh; #X text 397 111 refresh device list; ! #X obj 717 512 all_about_hid; ! #X text 608 513 For more info:; #X text 49 588 (C) Copyright 2004 Hans-Christoph Steiner hans@at.or.at ; *************** *** 70,88 **** #X obj 248 225 hid 1; #X obj 93 345 route key rel abs syn; #X connect 1 0 0 0; #X connect 2 0 3 0; #X connect 2 1 4 0; ! #X connect 5 0 61 0; ! #X connect 6 0 61 0; #X connect 8 0 19 0; #X connect 8 1 18 0; #X connect 8 2 17 0; #X connect 8 3 7 0; ! #X connect 9 0 61 0; ! #X connect 10 0 61 0; ! #X connect 11 0 61 0; ! #X connect 12 0 61 0; ! #X connect 13 0 61 0; ! #X connect 16 0 61 0; #X connect 37 0 36 0; #X connect 37 0 20 0; --- 67,108 ---- #X obj 248 225 hid 1; #X obj 93 345 route key rel abs syn; + #X obj 53 552 tgl 25 0 empty empty empty 0 -6 0 8 -195568 -1 -1 0 1 + ; + #X obj 93 552 tgl 25 0 empty empty empty 0 -6 0 8 -195568 -1 -1 0 1 + ; + #X obj 134 552 tgl 25 0 empty empty empty 0 -6 0 8 -195568 -1 -1 0 + 1; + #X obj 175 552 tgl 25 0 empty empty empty 0 -6 0 8 -195568 -1 -1 0 + 1; + #X obj 216 552 tgl 25 0 empty empty empty 0 -6 0 8 -195568 -1 -1 0 + 1; + #X obj 257 552 tgl 25 0 empty empty empty 0 -6 0 8 -195568 -1 -1 0 + 1; + #X obj 297 552 tgl 25 0 empty empty empty 0 -6 0 8 -195568 -1 -1 0 + 1; + #X obj 338 552 tgl 25 0 empty empty empty 0 -6 0 8 -195568 -1 -1 0 + 1; + #X obj 379 552 tgl 25 0 empty empty empty 0 -6 0 8 -195568 -1 -1 0 + 1; + #X msg 270 149 open 5; + #X obj 53 519 route btn_0 btn_1 btn_2 btn_3 btn_4 btn_5 btn_6 btn_7 + btn_8 btn_9; + #X obj 420 552 tgl 25 0 empty empty empty 0 -6 0 8 -195568 -1 -1 0 + 1; #X connect 1 0 0 0; #X connect 2 0 3 0; #X connect 2 1 4 0; ! #X connect 5 0 59 0; ! #X connect 6 0 59 0; #X connect 8 0 19 0; #X connect 8 1 18 0; #X connect 8 2 17 0; #X connect 8 3 7 0; ! #X connect 9 0 59 0; ! #X connect 10 0 59 0; ! #X connect 11 0 59 0; ! #X connect 12 0 59 0; ! #X connect 13 0 59 0; ! #X connect 16 0 59 0; #X connect 37 0 36 0; #X connect 37 0 20 0; *************** *** 91,109 **** #X connect 40 0 39 0; #X connect 41 0 40 0; ! #X connect 42 0 61 0; ! #X connect 43 0 61 0; ! #X connect 45 1 46 0; ! #X connect 53 0 14 0; ! #X connect 53 1 15 0; ! #X connect 53 2 54 0; ! #X connect 55 0 61 0; ! #X connect 56 0 61 0; ! #X connect 59 0 61 0; ! #X connect 61 0 37 0; ! #X connect 61 0 1 0; ! #X connect 61 0 8 0; ! #X connect 61 0 62 0; ! #X connect 62 0 45 0; ! #X connect 62 1 2 0; ! #X connect 62 2 53 0; ! #X connect 62 3 41 0; --- 111,139 ---- #X connect 40 0 39 0; #X connect 41 0 40 0; ! #X connect 42 0 59 0; ! #X connect 43 0 59 0; ! #X connect 51 0 14 0; ! #X connect 51 1 15 0; ! #X connect 51 2 52 0; ! #X connect 53 0 59 0; ! #X connect 54 0 59 0; ! #X connect 57 0 59 0; ! #X connect 59 0 37 0; ! #X connect 59 0 1 0; ! #X connect 59 0 8 0; ! #X connect 59 0 60 0; ! #X connect 60 0 71 0; ! #X connect 60 1 2 0; ! #X connect 60 2 51 0; ! #X connect 60 3 41 0; ! #X connect 70 0 59 0; ! #X connect 71 0 61 0; ! #X connect 71 1 62 0; ! #X connect 71 2 63 0; ! #X connect 71 3 64 0; ! #X connect 71 4 65 0; ! #X connect 71 5 66 0; ! #X connect 71 6 67 0; ! #X connect 71 7 68 0; ! #X connect 71 8 69 0; ! #X connect 71 9 72 0;
--- NEW FILE: buttongate-help.pd --- #N canvas 11 255 460 423 10; #X obj 5 2 cnv 15 450 20 empty empty buttongate] 2 11 1 18 -233017 -66577 0; #X obj 98 306 bng 25 250 50 0 empty empty empty 0 -6 0 8 -262144 -1 -1; #X obj 98 149 loadbang; #X msg 98 169 1; #X obj 98 197 metro 150; #X text 27 380 (C) Copyright 2004 Hans-Christoph Steiner hans@at.or.at ; #X text 244 394 released under the GNU GPL; #X obj 327 332 all_about_hid; #X text 218 333 For more info:; #X text 17 38 [buttongate] is a simple gate controlled by a HID button. You must specify the device and the button which controls the gate. The left inlet takes the data to be gated. The right inlet is for sending optional control messages to the HID.; #X obj 98 242 buttongate 0 btn_0; #X text 18 119 The first button on the first device controls this gate: ; #X connect 2 0 3 0; #X connect 3 0 4 0; #X connect 4 0 10 0; #X connect 10 0 1 0;