[PD] labeling buttons for [hid]
Hans-Christoph Steiner
hans at eds.org
Sun Nov 14 21:48:54 CET 2004
The USB HID spec is ugly, classic Microsoft design, so I wouldn't want
to go with for that reason alone. I am looking to make this event
system clear and consistent. The [hid] object just provides raw data
in an clear and easy to use format, so you can make your own labels or
OSC scheme with the [hid] data within Pd.
I think button numbers is probably the way to go. But with button
numbers, there is a certain amount of guesswork for knowing which
button number represents which button. btn_trigger is quite
straightforward, btn_1 not as much so.
.hc
On Nov 14, 2004, at 9:14 AM, Macciza Macpherson wrote:
> Hi
> I'd go with the numbering system if that is the USB HID Spec] but I
> also like the idea of the descriptive names as well. How about using
> names but translating ultimately into numbers? Can OSC be worked in
> here somehow so we can deal with descriptive hierarchies and broadcast
> our actions easily?? Is there any way to query the devices and get
> them to tell you what the buttons do?? Just a few thoughts.
> Cheers
> Macca
>
> On 14/11/2004, at 4:30 PM, pd-list-request at iem.at wrote:
>>
>> Message: 4
>> To: PD List <pd-list at iem.at>
>> From: Hans-Christoph Steiner <hans at eds.org>
>> Date: Sat, 13 Nov 2004 18:02:43 -0500
>> Subject: [PD] labeling buttons for [hid]
>>
>>
>> --Apple-Mail-12--326803946
>> Content-Transfer-Encoding: 7bit
>> Content-Type: text/plain;
>> charset=US-ASCII;
>> delsp=yes;
>> format=flowed
>>
>>
>> So I wanted to throw out an idea to see what people think. I am
>> working on a cross-platform scheme for naming the buttons on devices
>> like mice, joysticks, tablets, etc. Each OS has its own scheme, with
>> some similarities. But I am making a common scheme so that patches
>> that use [hid] will work on all platforms. Right now, I am wondering
>> how I should label buttons.
>>
>> MacOS X HID Manager simply numbers the buttons, I think Windows does a
>> similar thing since both are based on the USB HID spec. The Linux
>> input event system uses button names, like btn_left, btn_middle
>> (mice);
>> btn_trigger, btn_base (joysticks); btn_a, btn_select (gamepads);
>> btn_tool_pen, btn_stylus (tablets); with a different naming scheme
>> for
>> each device type.
>>
>> I started out just copying the Linux system outright for a number of
>> reasons, but now I am thinking that button numbers probably make a lot
>> more sense. Here are some advantages/disadvantages that I see:
>>
>> button numbers:
>> advantages:
>> more efficient to use floats rather than symbols
>> much easier to implement on MacOS X
>> patches written for buttons on one device would work for other
>> devices (i.e. a patch written
>> for a mouse could be triggered by the buttons of a joystick,
>> tablet,
>> etc.)
>> disadvantages:
>> user has to test the device to find the numbering scheme, rather
>> than
>> reading the label
>> slightly harder to implement on GNU/Linux
>>
>> Any thoughts, comments, feedback, etc would be appreciated.
>>
>> .hc
>>
>> ______________________________________________________________________
>> __
>> ____
>>
>> There is no way to peace, peace is the way.
>> -A.J. Muste
>
>
> _______________________________________________
> PD-list at iem.at mailing list
> UNSUBSCRIBE and account-management ->
> http://iem.at/cgi-bin/mailman/listinfo/pd-list
>
________________________________________________________________________
____
"Information wants to be free."
-Stewart Brand
More information about the Pd-list
mailing list