Live data from Hacker News

Keyboard latency

danluu.com

261–270 of 274 posts

Re: Keyboard latency

#261
So.. I noticed the huge latency difference between (Alt+Ctrl+F1) tty1 and Gnome with X11. After some tests using "Is it snappy?" app and my das keyboard I decided to check if Wayland had similar latency problems. After switching to Wayland I cut 40ms off my keyboard latency.. hmm. I don't know why that is but I assume there's some sort of frame buffer latency. The only thing I miss now is Plank :[

Re: Keyboard latency

#262
post #197

Earlier quoted context omitted.

"To my eyes, the delay is obvious at 100 ms, noticeable at 50 ms, barely perceptible at 20 ms, and unnoticeable at 10 ms." That's how it goes with my ears when recording as well. Most "Live feedback" mechanisms for guitar programs (heck even computer-made guitar hardware) have about 50ms of latency, which is quite disconcerting when you're doing something heavily timing-based. 10ms is almost imperceptible to me (soun…

This is why I'll never buy a DAC that doesn't have a headphone monitor output on the front panel! The performance of low-latency audio has gotten worse over time, not better, at least on the Mac. (It was better under OS 9 than anytime since, I think.) Another fun test you can do, if you have an analog mixer, is to run some input signal into the mixer, then to the PC, and then from the PC back out, and monitor both th…

Sorry for off-topic.

What reasonably-priced DAC would you recommend?

In the market for one currently.

Re: Keyboard latency

#263

Earlier quoted context omitted.

I immediately switched to skeptic mode when I saw no actuation points or normalization for travel distance. All this is showing is that to move further it takes longer. Duh. Why even bother pointing out the polling rate? That's like setting up runners at random places on the racetrack to measure who's faster. The guy/gal that starts closest to the finish line isn't necessarily faster. I'm using Cherry MX Speed switch…

Your criticism is harsh by pointing out a (debatable) point, key travel, using a certain amount of rationale and suddenly concluding ‘every step’ has flaws. Point out those flaws! Furthermore, the OP is the first one doing real measurements on keyboard latency, so perhaps you should trust the article to hint towards a previous unnoticed problem. Anyways, your comment is totally missing the point and makes generalizat…

TFA would have been more convincing if the author used consistent capitalization of products.

Also his table lacks whether the keyboard is mechanical and the type of switch used.

This subject needs more research.

Re: Keyboard latency

#264
post #68
post #60

Earlier quoted context omitted.

I'm currently using a mechanical 60% keyboard with the following layout: http://www.keyboard-layout-editor.com/#/gists/c7f9f0ac904b21... Truth be told, I also prefer scissor switch keyboards, but there aren't any on the market that support the features I'd like: - configurable keys & layers on a hardware level - 60% layout - NKRO Apple's magic keyboard would be great if it supported configuration/NKRO and didn't cost…

Custom build at wasd keyboards work? I love that place.

Alas, they don't offer scissor switches.

Re: Keyboard latency

#265
post #103

I think this was posted to HN before, but in any case, related: http://isitsnappy.com/ It's an iOS video app for measuring latency. The page has this about Apple keyboards: "This one’s bizarre: the onboard keyboards on both the 2015 Macbook Pro and Macbook Air have worse latency than an external keyboard. Plugging in an external wireless keyboard improves response latency by 40 ms."

The MacBook Pro 2015 doesn't use an USB connection to connect the internal keyboard when using macOS. Instead it uses SPI. Unlike the newer MacBook Pros it still has the keyboard wired to USB, but doesn't use that because of power saving reasons.

Re: Keyboard latency

#266
post #147

Earlier quoted context omitted.

Do they spec the force in newtons? Without mass, g’s don’t really say much except as maybe a relative measure between things of the same mass.

'g' is gram-force. It's the weight required to "click" the switch over it's actuation point. 1 Gram is equivalent to 0.980665 centinewton, so for most measurements of keyboard switches, g's and cN's are used interchangeably.

Wow, ok. Never heard of g in that sense. I work in aerospace, so that is probably why.

Re: Keyboard latency

#267
post #231
post #101

Earlier quoted context omitted.

even the difference between 30 and 60 is pretty clear to most, I find watching movies at 60fps reeeally weird, it feels too real... I never actively look for the video framerate before, i just notice it, it's that obvious.

I, on the other hand, having grown up with mostly playing games at 60 FPS (the PS2 ran the games I played at 60 FPS, back when console games prioritized gameplay over looking pretty in screenshots), and have moved on the 144 FPS on PC, find the 24 FPS used in cinemas to feel agonizingly choppy. Especially when there’s a big sweeping paniramic shot. It sometimes takes me out of the experience. I really liked the 48 FP…

I've grown up with FPS games too so it's not like i'm not used to 60FPS... i'm just saying from a film watching perspective, it starts feeling game like. There's been a number of articles dedicated to this perception, the general preference (whether you are consciously aware of it or not) is for <60FPS in film, the reasoning is that it gives this sort of dreamy state of perception, much like an animation, it relies on your subconscious to fill in the gaps, it makes a film feel more like a story than a documentary. On the other hand I agree that in some scenes this doesn't work well, fast moving wide angle shots of landscapes look awful. It will be interesting if film makers care enough about this detail in the future to play with it, perhaps as a newly adjustable dimension to film making (variable frame rate). So long as you don't consciously perceive the low frame rate (i.e it's matched to the movement of the scene) I think 24fps is ok, and preferable when it somehow activates that visually creative part of your visual perception. This would even be compatible with existing tech if you simply chose a high frame rate which is a multiple of the various frame rates you want to choose for different scenes.

Re: Keyboard latency

#268
post #92

Earlier quoted context omitted.

> strike a key less than 100 ms after some visual stimuli, I'm sure I couldn't do it The video game "Super Hexagon"[1] is a surprisingly interesting demonstration of this limitation, and how the mind tries to workaround the problem. The higher difficulties ("hexagonest"[2]) seem impossible at first. In the easier levels you can react , but now the time it takes to see the scree, parse the simple graphics, recognize t…

This is also clear on rhythm games like Stepmania. Here's a random video from a keyboard user: https://youtu.be/TWiMnENdcyY?t=56 At this speed the player is reacting (and hitting with correct timing) about ten notes (arrows) per second. This is possible by memorizing and reacting to group patterns instead of individual notes, but more importantly, reacting unconsciously. A player can play at this level without consci…

>At this speed the player is reacting (and hitting with correct timing) about ten notes (arrows) per second. This is possible by memorizing and reacting to group patterns instead of individual notes, but more importantly, reacting unconsciously.

You've just described how people play music in general :P the patterns trigger memory and other internal processes (whether it's recalling verbatim or dynamically based on a new pattern from some combination of scales), this escapes the limitation of input output response time because it's all internal with some arbitrary output delay which we account for by "leading" whatever the physical action is (for an exaggeration think about percussion instruments).

If you are at all musical it's fun to do a bit of introspection here... with anything slightly complicated where you do not have time to think about the position of each note (a pretty unnatural way to perform) you will realise that your fingers (or toes in some strange cases), react to a sort of stream of signals internally... it's probably not even a stream but more of a parallel matching against the pattern from which you pick a stream of notes internally because this is right brain stuff.

Disclaimer: i'm not a neuroscientists or musicologists, I just like thinking about the brain and am slightly musical.

Re: Keyboard latency

#269
post #199

Earlier quoted context omitted.

Likely forking sleep takes time.

I would be extremely surprised if fork on a unix-like takes 1ms.

Be horrified, then. https://redislabs.com/blog/testing-fork-time-on-awsxen-infra... https://www.cs.indiana.edu/~adkulkar/papers/pspawn.pdf

Re: Keyboard latency

#270

I'm surprised the "humans don't notice 100 ms" argument is even made. That's trivially debunkable with a simple blind A/B test at the command line using `sleep 0.1` with and without `sleep` aliased to `true`. To my eyes, the delay is obvious at 100 ms, noticeable at 50 ms, barely perceptible at 20 ms, and unnoticeable at 10 ms. Not to mention that 100 ms is musically a 16th note at 150 bpm. Being off by a 16th note e…

As a pianist, latency of 20ms makes an electronic keyboard instrument unplayable for me. I wasted lots of time messing around with different drivers for soft synths trying to get below that number. 100 ms is a lot. In audio, a 8ms delay has an effect you can clearly hear, and can be used to "widen" tracks or simulate stereo from mono sound sources, since 8ms corresponds roughly to the amount of time it takes a sound wave to travel from one side or your head to the other.
Post reply on HN