[PD] Re: [hid] question...
hans at eds.org
Mon Dec 6 17:33:01 CET 2004
On Dec 6, 2004, at 10:07 AM, Johannes M Zmoelnig wrote:
> i am just trying to understand [hid] and have problems...
> well, not real problems, just some remarks on "why are things like
> this and not different ?"
> most of them are probably just my way of thinking, but i'd like to
> learn why i think so differently ...
> 1) what is the "timestamp"-field for ? on my system it is always a big
> number (1.10234e+09) which does not seem to change at all (probably
> pd's range is too small; should i set my hw-clock to 1970 ?)
Pd's range is too small. I haven't figured out what to do with this
yet, so its just very low resolution right now.
> 2) how do i get the absolute position of my mouse ? i mean, it is
> relatively simple to calculate the relative movement data out of 2
> consecutive mouse-posisitions, however it is infinetely harder to get
> the absolute position out of movement data...
[hid] treats the devices as sensors. Mice output relative data.
Also, absolute data for mice is very limiting for designing
instruments. Screen resolution is quite low as compared to what the
mouse puts out. Besides, the mouse isn't outputting absolute coords,
the OS is. I plan on making an [mousepointer] object for that info.
> 3) the route-labels seem to define things double: why are there
> messages like [rel rel_y 1 1.10234e+09 ( instead of [rel y 1 1.123e+09
> ( ?
> i think if you have a "rel" than everything afterwards will be
> "relative", so there is no need in having to prepend "rel_" to "y".
> if you want destinguish between relative and absolute coordinates on a
> second level, then why is there a first layer at all ?
I am merely emulating the Linux input event system. They have thought
long and hard about the design, and know quite a bit more about that
topic than I do, so I figure I should follow their wisdom. Standing on
the shoulders of giants... Plus, from my experience, I think this
scheme gives more flexibility.
> 4) more annoying i find the behaviour with (mouse-)buttons.
> is there some real reason why the identifier is like "key btn_0" ?
> i would prefer something like "key 0" with "0" being a real number
> (why: because pd handles numbers better than symbols in general; you
> don't pollute the hash-tables with "btn_0" symbols (ok, not that much
> pollution); it is faster to make floats than symbols; it is very
> simple to create "btn_0" out of "0", while it is hard to get "1" out
> of "btn_1" in a generic way)
If you have the buttons named as floats, then you will have an outlet
that sometimes outputs symbols and sometimes floats. This would be a
major pain in the ass to deal with.
> 5) keyboard doesn't seem to work at all (keyboard is detected; i get
> button-presses; but i do not get which key is pressed: the label is
> very empty: '')
Its still alpha, lots of stuff isn't implemented yet. Like that.
> just my 2 cent
"The arc of history bends towards justice."
Martin Luther King, Jr.
More information about the Pd-list