mouse time resolution, ?

Started by
7 comments, last by jbadams 10 years ago

Im wondering what is the mouse resolution (I mean mouse move events)

when i draw something like circle gesture it generates a series of points

in mouse move,

Is there some setting or something that say how dense (in time) is this point stream? Is this customizable? How order of sampling is that? What it depends on?

Is there a way of saying that when i do with my mouse 'circle gesture'

(dont know how long it takes say 1/4 os secont there is X points in this?

How many 7 ? 10 ? Is it some time sampling say 100Hz or domething?

Advertisement

Mousemove gets dispatched at least once every time a pointer position change "in pixels" is detected. Use a high-resolution timer to obtain temporal information. Some "legacy" timers might also do it in theory but in practice their granularity is insufficient.

Raw input is dispatched every time the controller reports a state change. Because it is unfiltered, this will be much, much higher frequency.

As far as I've understood, the device produces a constant stream of data (to its integrated controller) at a steady rate, but I doubt the data to be steadily streamed to host. This is very likely implementation-dependent and you're not really concerned with this anyway.

Previously "Krohm"

Mousemove gets dispatched at least once every time a pointer position change "in pixels" is detected. Use a high-resolution timer to obtain temporal information. Some "legacy" timers might also do it in theory but in practice their granularity is insufficient.

Raw input is dispatched every time the controller reports a state change. Because it is unfiltered, this will be much, much higher frequency.

As far as I've understood, the device produces a constant stream of data (to its integrated controller) at a steady rate, but I doubt the data to be steadily streamed to host. This is very likely implementation-dependent and you're not really concerned with this anyway.

I did not understood how you see it, If once a position change it pixels is detected imo it brings to

1) frequenzy resolution at which it is detected

2) if no it would be mean (as mouse ball move is probably continuous not hard jumps) that the mouse move should appear

afret each one pixel change, so gesture 400 pixels long should

move 400 mouse move events 1 pixel long each

?

(though i must rethink the answer a bit yet)

Ps when i did some test it shows that mouse move events

seem to depend on frame time, if I run my app with 100 ms

frame time It seem I got only one mouse move with sum up values - It seemed like windows would queue the mouse moves internally and on each query at message pump gives only one

sume up value - so it seem just that mouse reselotion depends on frame time (this is for normal wm_mousemove events,

I dont know how it is for rawinput)

if no it would be mean (as mouse ball move is probably continuous not hard jumps) that the mouse move should appear afret each one pixel change, so gesture 400 pixels long should move 400 mouse move events 1 pixel long each
I don't know of any system giving granting this. You will get your messages in order and, by walking them first to last, you can reconstruct the total movement (which is just the difference end - start).

This is what you can assume.

when i did some test it shows that mouse move events seem to depend on frame time, if I run my app with 100 ms frame time It seem I got only one mouse move with sum up values...
I also observed this. I don't see much use in accumulating the results as it's counter-productive with regards to incremental movements. I'm not saying it's not happening, but it seems much more reasonable to think the device driver gets probed less often at high CPU load. I haven't investigated the issue in detail as I don't really care.

By the way, I haven't seen a mouse with the ball in a decade I think - they have sensors anyway and they are not necessarily continuous in nature as this would imply they would need to be finite range. Even if data is produced continuously, they would have to be converted to digital and this will have a non-continuous update.

Previously "Krohm"

Different mice (and input connection methods) will report their data at different rates.

Most "gaming" mice are configurable and can be set to crazy frequencies like 1000Hz. I've seen these settings actually overwhelm some older games which I guess assumed that they would get 1 or less events per frame -- it caused these games to have serious delays input lag as their message buffers just filled up continually.

Different mice (and input connection methods) will report their data at different rates.

Most "gaming" mice are configurable and can be set to crazy frequencies like 1000Hz. I've seen these settings actually overwhelm some older games which I guess assumed that they would get 1 or less events per frame -- it caused these games to have serious delays input lag as their message buffers just filled up continually.

Where i san set? can i set it in windows? If this mouse frequenzy is setteble how is it set by default?

As i said, It seems to me from my test that when i drain queue

i got only one mouse move message per draining session, like

if windows internally has even 100 points for frame it will sum it up to one

I would like to get higher resolution to get smooth mouse cursor paths not 100 pixel jumps... How to obtain this?

(I will do some test with drawing this and can post the results

to show )

EDIT

i found something in mouse advanced settings

[attachment=20620:mouse.jpg]

stiil not sure what it can mean

the first value i can set form 20 up to 200

the second (buffer) up to 300

not saying it's not happening, but it seems much more reasonable to think the device driver gets probed less often at high CPU load. I haven't investigated the issue in detail as I don't really care.

dont think so, for me its almost obvious that win is probably receiving more points in given frame time but it just adds it

and gives to me added result in one query (one per frame) instetad of sending whole bunch of it

but unknow is how often it probes the movement in underlying

window subsystem

Other related question is mouse pointer question - On my eye it

does large jumps

- are those jumps equal to this mouse position probing frequenzy?

- or this is some rendering probing results (at how frequenzy windows draws mouse cursor? screen freguenzy? 70 Hz here for example?)

i made some simple test how 'dense ' this point streem is like

https://www.dropbox.com/s/4rxqsxoxg5i7gmx/mouse_points_stream.zip

[attachment=20659:mousepointstream.jpg]

the highest resolution i can set in here is 200 points/per second
and this drawing and test seem to confirm this to,
i dont know if this 200 points/s is stable 200 Hz probing but probably
if so the times between two points here is 5 milisekonds, this is normal
fast but not so fast mouse moving (I can probably make 3-4 faster mouse gestrures) so it shows that this probing is not so crazy dense * - I would like to be really 1000 Hz not 200 Hz, though slower gestures are quite well probed
(with deltas of 5 pixels or less)
* and this is 200 Hz so it is probably 2x of the default 100 Hz, which is acceptable but weak imo


I would like to be really 1000 Hz not 200 Hz, though slower gestures are quite well probed

This is less about the operating system, and more about the hardware and drivers of the specific mouse in question. A cheap, basic mouse will report at a similar frequency to what you're describing, whilst as Hodgman said above a high-precision gaming mouse will report at a much higher frequency.

If you want higher precision, buy a higher precision mouse -- you cannot get higher precision out of a lower-precision mouse.

Complicating this slightly, issues have been reported where higher precision mouses are capped to a lower precision on some versions of Windows 8.

- Jason Astle-Adams

This topic is closed to new replies.

Advertisement