Topic: Can the latency be too short?

Never thought, that I would acknowledge that question.

But today I had an Aha-effect. I'm testing another MIDI keyboard at the moment. All other parameters in my Laptop/Pianoteq environment were unchanged.

I noticed, that the sound appeared faster than with my older keyboard. The latency seemed to be shorter now, but to a point that it felt a little "too early"!

So I increased the latency in small steps. Start point was my usual buffer setting in qjackctl: buffersize 64, periods 2, samplefreq 44.1kHz. Then I increased the periods to 3 and to 4. In other words I played Pianoteq with three different nominal latencies:

a) 2.9 ms
b) 4.4 ms
c) 5.8 ms

To my surprise the middle latency (4.4 ms) felt just damn right! Most natural sync between tactile, mechanical feedback and piano tone.

My guess is that the older keyboard had another timing caused by the geometry of the keys/contacts OR slower key scanning OR a slower USB MIDI interface (non-exclusive OR).

Assuming the new keyboard has a shorter over-all latency, I can use bigger buffersizes now.

I have not measured the differences between the two MIDI keyboards so it is possible I'm just a victim of the placebo-effect.

Anyway, the immersion is amazingly better with that sync of tactile and audio latency.

cheers

Last edited by groovy (19-10-2020 21:44)

Re: Can the latency be too short?

Good observation and helpful notes groovy.

Absolutely if anyone hasn't tried what you described, it could be well worth it. For the sake of realism, it could be as important as a fitting velocity curve.

I like high latency numbers in Pianoteq for piano playing - PC/cable latency seems very low so I like to see 20ms in Pianoteq - and over time am fine with it for other music (like synths) too.

If anything some comfortable amount of extra latency and perceived "grand piano feel" has helped with musicality in my modern music types. Gives me a good neurological confirmation bias if this is set this way.

When playing some music requiring less kinetics, I find that it can be good to make the velocity curve a little quicker and play softer, rather than shortening latency.

Until I began to play piano, played some real grand pianos, got used to it, and coming from modern music in past years, I aimed for zero latency for some time in Pianoteq (can get 1.2ms)

Zero latency doesn't make sense to me, for physical piano playing.. that's some supposed baseline goal (since dawn of the MIDI age my music circles was awash with this talk). It was best for synth lines, bands and recording, playback and on - esp. simplistic pop lines and so on. But for solo piano, classical music etc. it's good to try different buffer sizes as groovy shows.

Would definitely encourage pianists to experiment with this - it can be a qualitative difference, in how realistic their dpiano feels.

Pianoteq Studio Bundle (Pro plus all instruments)  - Kawai MP11 digital piano - Yamaha HS8 monitors

Re: Can the latency be too short?

This is an interesting topic and I did a similar "discovery" as yours a while ago. I work as a piano teacher and this spring I was teaching online because of covid-19. I've always gone for lowest latency possible but this situation forced me to increase latency due to performance issues with my computer when streaming the sound through google meet and use webcams and other necessary programs at the same time. Surprisingly I found out that a latency around 5ms felt more "right" when playing with headphones and give me a more acoustic feel to the playing experience. The slightly higher latency also makes the keyboard feel a little heavier, especially when it comes to the percieved dynamic weight, which is something I've been wanting with my Yamaha N1. So I guess we are at a point where latency is no longer an issue.

Last edited by johanibraaten (20-10-2020 10:41)

Re: Can the latency be too short?

Yes, the timing is crucial. Some digital piano manufacturers such as Casio have cottoned on to this and use it in their boards

Warmest regards,

Chris

Re: Can the latency be too short?

Old topic, but some new observations that possibly fit here:

I'm testing another DP at the moment. The Korg D1 via 5-pin MIDI-out and a Roland UM-One Mk2 USB-interface to my lightweight Linux-laptop. The D1 with the Roland interface seems to have a shorter overall latency than my former setup. At the same time it has a louder mechanical key noise than I'm used to. This has two consequences in my opinion. The pianosound "feels" a tad too early and the attack of Pianoteq is unpleasently covered / overlapped by the acoustic key noise. I could face it with sheer volume boost like a real piano does, but I tried another strategy ...

Increasing the latency of Pianoteq.

Normally I used that laptop with 64 samples Buffersize at 44100 Hz. Given that Pianoteq 9 has latency of 3 times the buffer size [1] this means a latency of:

64 / 44100Hz * 3 = 4.4 ms

Now I have chosen 128 samples Buffersize at 48000 Hz. This means a slighly higher latency:

128 / 48000Hz * 3 = 8.0 ms

In other words the latency is 3.6 ms higher now.

It is not too much to be unacceptable in my opinion, but distant enough to better separate the mechanical key noise from Pianoteq's attack sound.


[1] Pianoteq 9 README_LINUX.txt
"* with Jack or Alsa, use buffer sizes that are multiple of 64, as Pianoteq prefers those sizes. With the Alsa driver, the latency is 3 times the buffer size (a buffer of 64 samples at 44100Hz gives a latency of 4.3 ms)."

Re: Can the latency be too short?

Doesn't an acoustic piano have a natural latency of close to 10 ms?

Re: Can the latency be too short?

groovy wrote:

Old topic, but some new observations that possibly fit here:

I'm testing another DP at the moment. The Korg D1 via 5-pin MIDI-out and a Roland UM-One Mk2 USB-interface to my lightweight Linux-laptop. The D1 with the Roland interface seems to have a shorter overall latency than my former setup. At the same time it has a louder mechanical key noise than I'm used to. This has two consequences in my opinion. The pianosound "feels" a tad too early and the attack of Pianoteq is unpleasently covered / overlapped by the acoustic key noise. I could face it with sheer volume boost like a real piano does, but I tried another strategy ...

Increasing the latency of Pianoteq.

Normally I used that laptop with 64 samples Buffersize at 44100 Hz. Given that Pianoteq 9 has latency of 3 times the buffer size [1] this means a latency of:

64 / 44100Hz * 3 = 4.4 ms

Now I have chosen 128 samples Buffersize at 48000 Hz. This means a slighly higher latency:

128 / 48000Hz * 3 = 8.0 ms

In other words the latency is 3.6 ms higher now.

It is not too much to be unacceptable in my opinion, but distant enough to better separate the mechanical key noise from Pianoteq's attack sound.


[1] Pianoteq 9 README_LINUX.txt
"* with Jack or Alsa, use buffer sizes that are multiple of 64, as Pianoteq prefers those sizes. With the Alsa driver, the latency is 3 times the buffer size (a buffer of 64 samples at 44100Hz gives a latency of 4.3 ms)."

It is a fascinating topic .  Now there is a difference between an acoustic grand piano and a digital piano :
in a digital piano the overall latency is essentially independent of note- on velocity . On the other end,  in an acoustic grand, academic research , the most known being Anders Askenfelt and A. G. Jansson documents , shows that delta time between key bottoming out and sound being heard  depends on dynamics,  due to speed of the hammer travelling on its own after escapement point;

at ppp , the hammer travels slowly and the sound arrives after the finger reaches the bottom of the key ; at fff its the opposite , the hammer travels very fast and sound is heard  before key touches the keyed bottom.   Depending on each grand piano , there is a specific point ( between mf and f ) where both sounds coincide.

In digital pianos, latency with internal sound is very low. Kawai has introduced a  specific parameter in virtual technical  called 'hammer delay' to specially delay sound for low velocities .  Given the fix nature of latency in digital keyboards and in absence of such parameter usable for external libraries such as pianoteq , the ideal would be to set up the latency low enough so that at fff , the sound is heard before key bottoms out  and to include a script in a DAW or VST host software that artificially adds delay for low velocities . 
One other variable to consider  is that  some DP makes more noise at key release that key bottoming out.  Anyway  just food for thoughts...

Last edited by Pianistically (11-10-2026 08:02)

Re: Can the latency be too short?

« …at ppp , the hammer travels slowly and the sound arrives after the finger reaches the bottom of the key ; at fff its the opposite , the hammer travels very fast and sound is heard  before key touches the keyed bottom. »

https://www.speech.kth.se/music/5_lectu...ybott.html

For me at ppp sound appears before key bottom and at fff sound appears after key bottom…

Re: Can the latency be too short?

YvesTh wrote:

« …at ppp , the hammer travels slowly and the sound arrives after the finger reaches the bottom of the key ; at fff its the opposite , the hammer travels very fast and sound is heard  before key touches the keyed bottom. »

https://www.speech.kth.se/music/5_lectu...ybott.html

For me at ppp sound appears before key bottom and at fff sound appears after key bottom…

You are correct . This is the correct normal behaviour . I got mixed up in my reply .but the variable delta is what matters here and that’s what is difficult to reproduce with dp

Last edited by Pianistically (11-10-2026 13:09)

Re: Can the latency be too short?

"...that’s what is difficult to reproduce with dp..."

Yes you're right, on DP the midi signal is sended at the end of the key stroke (sensor), so numeric latency is added to key press duration.
On accoustic piano hammer is launched from the start of the key stroke.
So the DP latency is close to accoustic piano at fff but different at ppp, I mean.
Besides, if you press a key only halfway on a digital piano—even at high velocity—you won't hear any sound. It's not true on accoustic.

Last edited by YvesTh (11-10-2026 13:28)

Re: Can the latency be too short?

YvesTh wrote:

"...that’s what is difficult to reproduce with dp..."

Yes you're right, on DP the midi signal is sended at the end of the key stroke (sensor), so numeric latency is added to key press duration.
On accoustic piano hammer is launched from the start of the key stroke.
So the DP latency is close to accoustic piano at fff but different at ppp, I mean.
Besides, if you press a key only halfway on a digital piano—even at high velocity—you won't hear any sound. It's not true on acoustic.

That's indeed one of the limitations of many DP's. A few of them with very low friction are capable of  reaching the bottom sensor with just enough impulse  just above  the middle sensor  and can produce a tiny sound  , but that's rather an exception rather than the norm and in all cases not comparable to leggiero playing on an acoustic .

Re: Can the latency be too short?

Kengrayfield wrote:

Doesn't an acoustic piano have a natural latency of close to 10 ms?

The already linked document shows an example of a Grand Piano action played staccato with (f)orte at note C4.

https://i.postimg.cc/TwWfRtdn/GP-action-latency-and-bottom.png

The over-all-latency of the GP seems to be around 30 ms. Over-all means from finger touches the key to string begins to vibrate (see my blue annotation). In this situation the key bottom is reached a few milliseconds earlier than the string (magenta arrows).

Eventually there is one more variable in Digital Piano actions. I read a post of a user somewhere, that the bottom felt is only reached in his DP if a key is pressed really hard. This would imply that at "normal" playing it is not the bottom that triggers the key noise but the weighted hammer knocking the upper felt.

Is there something like a general paradigma of these folded actions in this regard?
Hammer strikes the upper felt before the key bottoms?
Key bottoms first, then the hammer?
Key AND hammer "bottom" synchronously?

Last edited by groovy (11-10-2026 21:21)

Re: Can the latency be too short?

groovy wrote:
Kengrayfield wrote:

Doesn't an acoustic piano have a natural latency of close to 10 ms?

The already linked document shows an example of a Grand Piano action played staccato with (f)orte at note C4.

https://i.postimg.cc/TwWfRtdn/GP-action-latency-and-bottom.png

The over-all-latency of the GP seems to be around 30 ms. Over-all means from finger touches the key to string begins to vibrate (see my blue annotation). In this situation the key bottom is reached a few milliseconds earlier than the string (magenta arrows).

Eventually there is one more variable in Digital Piano actions. I read a post of a user somewhere, that the bottom felt is only reached in his DP if a key is pressed really hard. This would imply that at "normal" playing it is not the bottom that triggers the key noise but the weighted hammer knocking the upper felt.

Is there something like a general paradigma of these folded actions in this regard?
Hammer strikes the upper felt before the key bottoms?
Key bottoms first, then the hammer?
Key AND hammer "bottom" synchronously?

In non hybrid digital pianos the hammers and keys are linked together  with no degree of freedom  and cannot have independent stop positions. The only possible reasons  for  delta time of noise between the 2 mechanisms reaching their stop points would be mechanical tolerance and different compression of the felts ( hammer, key) . But also some DPs make more noise at key release because when the finger lifts the key accelerates on its own  and hits its upper stop, which is in some cases a thinner felt or even plastic contact. The later may bother as well because if may masks the subtle final release tail of the sound .

Re: Can the latency be too short?

With bottom out of a Digital Piano I meant the moment when a key is pressed and the first of the felts is touched. How is the timing normally in folded actions? Does the key or the hammer reach the felt at first? Or does a general construction paradigma exist, that key and hammer reach the felts at the same time?

For example/illustration a picture of an old Korg RH3 action (with grey rubbers, in new keybeds they are pink). Many folded actions are constructed similarly, a loose, lubricated touchpoint between key and hammer-seesaw (magenta arrows) and stop felts for keys and hammers (red arrows).

https://i.postimg.cc/8C9GVX5h/Old-RH3-with-grey-rubbers-touch-points.png

Re: Can the latency be too short?

groovy wrote:

With bottom out of a Digital Piano I meant the moment when a key is pressed and the first of the felts is touched. How is the timing normally in folded actions? Does the key or the hammer reach the felt at first? Or does a general construction paradigma exist, that key and hammer reach the felts at the same time?

For example/illustration a picture of an old Korg RH3 action (with grey rubbers, in new keybeds they are pink). Many folded actions are constructed similarly, a loose, lubricated touchpoint between key and hammer-seesaw (magenta arrows) and stop felts for keys and hammers (red arrows).

https://i.postimg.cc/8C9GVX5h/Old-RH3-with-grey-rubbers-touch-points.png

but the hammer is still linked to the key in a digital piano at all times .There no such thing as hammer free flight in digital pianos . Only hybrids are capable of that because they implement real acoustic actions . In traditional DP there is no need for escapement as the sensors performs that fonction . The hammers are just used for inertia and weight .  Most DP vendors are trying ( not always successfully) to minimise the key noise for the simple reason that key noise and hammer noise are already captured in the samples . Even Roland with its modelling technology in digital pianos have their own virtual key and hammer noise and hamner noise .

Last edited by Pianistically (12-10-2026 12:46)

Re: Can the latency be too short?

I guess I can answer my question myself based on an old post about a Kawai DP action here in the forum:

I saw a picture (from a service manual?) on the net. The "Key Switch Adjustment" seems to be a bit different.

https://imgur.com/Zmzty1l

In short:
The fullstroke / key dip of 10+/-0.6mm has to be adjusted with shims.
The capstan has to be adjusted, that the hammer touches the stopper cushion, when a 200 g weight is placed on the key.

The last sentence (bold) indicates, that key AND hammer have to be adjusted that both touch their stop felt at the same time when the key is in the bottom position. - Makes sense to me, because the energy is dissipated in both felts synchronously then. The "bottoming" sound is the sum of both felt stopper strikes at the same time.

If two separate acoustic sound events can be measured, a keybed is probably not well regulated.

Last edited by groovy (12-10-2026 15:57)

Re: Can the latency be too short?

Pianistically wrote:

but the hammer is still linked to the key in a digital piano at all times.

I know what you mean, but in this absolutism I disagree. The hammer can fly around the distance of the red arrow, WHEN the key is abruptly stopped before the note-on contact. You can simulate this by blocking the key with something, I used some cardboard on the following photo. Moving the key slowly to the cardboard note-on is not triggered (the second key contact is not reached). The same with key moved quickly and the note is triggered. The hammer has been "thrown".

This is not a typical key movement of course, agreed! ;-)

https://i.postimg.cc/TPYk6V5x/hammer-can-fly.png
https://i.postimg.cc/d019XJgM/key-stop-flying-hammer.jpg

Re: Can the latency be too short?

groovy wrote:
Pianistically wrote:

but the hammer is still linked to the key in a digital piano at all times.

I know what you mean, but in this absolutism I disagree. The hammer can fly around the distance of the red arrow, WHEN the key is abruptly stopped before the note-on contact. You can simulate this by blocking the key with something, I used some cardboard on the following photo. Moving the key slowly to the cardboard note-on is not triggered (the second key contact is not reached). The same with key moved quickly and the note is triggered. The hammer has been "thrown".

This is not a typical key movement of course, agreed! ;-)

https://i.postimg.cc/TPYk6V5x/hammer-can-fly.png
https://i.postimg.cc/d019XJgM/key-stop-flying-hammer.jpg

ok fair enough . Now on another topic , you will notice that in fig 5 in  the document posted above ,the latency at mf dynamic between key bottom and sound production is 0 . In a digital piano it takes roughly 2-3 ms at mf to travel from bottom sensor to keybed bottom . So a latency of 2- 3 ms in the audio chain+ midi jitter would get you there .Conceptually speaking I consider latency as detrimental for feedback in any musical instrument. It’s necessary in order to generate the sound with VSTis and for stability , but the lowest you can achieve with no glitches, the better .

Re: Can the latency be too short?

I think that perceived latency should be chosen, that works best with the owners Digital Piano (which is not a wooden Grand Piano).

In a DP roughly two times the energy is landing in the key noise (key stopper + hammer stopper, synchronous). In a GP roughly only one half lands in the key stopper and the other half in the vibrating strings and hammer noise.

Together with lower volume levels often used with DPs, it is another situation - on the timeline, on the volume levels and on the sound spectrum of the key noise. Eventually an additional workaround could be the individual reduction of Pianoteq's virtual hammer noise when playing at lower volume levels.

Re: Can the latency be too short?

groovy wrote:

I think that perceived latency should be chosen, that works best with the owners Digital Piano (which is not a wooden Grand Piano).

In a DP roughly two times the energy is landing in the key noise (key stopper + hammer stopper, synchronous). In a GP roughly only one half lands in the key stopper and the other half in the vibrating strings and hammer noise.

Together with lower volume levels often used with DPs, it is another situation - on the timeline, on the volume levels and on the sound spectrum of the key noise. Eventually an additional workaround could be the individual reduction of Pianoteq's virtual hammer noise when playing at lower volume levels.

volume is a key issue as most of DP owners use sampled libraries or modelling software based on concert grand pianos which produce 90 to 100+ dB at max which is not usable at home therefore DP key noise are proportionally more preponderant with some digital instruments . But increasing latency doesn’t seem like a good remedy to me . Of course as you say it should be adjustable by the user , but the primary driver should be based on stability and ability of the computer\OS\piano library to produce the sound in the slot of time determined by sample rate and buffer size. I can’t find a single good case for latency increase . Even an acoustic piano is not ideal given the negative and positive latencies observed in the ppp and fff . Our brain is made expect synchronism between action and reaction . Experiments made with finger tapping and a table and metronome rocks show that the brain tends to align the finger  neural sensation by modelling the neural sensation  of the finger  to align it the physical sound of the metronome ( search for negative mean asynchrony  NMA) this is due to slow transmission of nerves to the brain ~50ms. In other word our brain ‘hates’ latency . Also many users have reported that increasing latency makes the keyboard artificially heavier as it tends to create a feeling similar to inertia .

Re: Can the latency be too short?

I'm thinking of it more as an optimisation problem. Latency too high feels sluggish, horrible in my opinion, yes. Latency too low it feels wrong with the inertia of a hammer weighted keyboard and the key noise. IIRC some Kawai DPs have the option to choose just the first of three key contacts to trigger the note (to mimic a quick Hammond or Synth response). Would be interesting, how you like that modus together with a Piano sound and the smallest buffersizes your system allows.

That the buffersize has to be always enough to avoid underruns, is just a necessary technical prerequisite here I would say (personally I also need very low jitter, I'm running a self-compiled Realtime-Kernel with precise 1000 Hz systemtimer).

Last edited by groovy (13-10-2026 15:21)

Re: Can the latency be too short?

It's very interesting to try playing on a "silent" acoustic piano : playing both the acoustic and digital at the same time gives you clear indications on how they behave, relatively to each other.
I also scripted a MIDI script to emulate the delay (additional latency) occuring on an acoustic when playing forte.
But natively, the Yamaha Silent system is already very good at that and gives a feeling of better connection with the instrument.
Anyway, on a DP you can't "shorten" latency. So the best is probably to have the fastest setup and add articifially extra latency according to incoming velocity, if ever you find it too short (which I never do personally).

Re: Can the latency be too short?

Increasing the latency of Pianoteq.

Normally I used that laptop with 64 samples Buffersize at 44100 Hz. Given that Pianoteq 9 has latency of 3 times the buffer size [1] this means a latency of:

64 / 44100Hz * 3 = 4.4 ms

Now I have chosen 128 samples Buffersize at 48000 Hz. This means a slighly higher latency:

128 / 48000Hz * 3 = 8.0 ms

In other words the latency is 3.6 ms higher now.

It is not too much to be unacceptable in my opinion, but distant enough to better separate the mechanical key noise from Pianoteq's attack sound.


[1] Pianoteq 9 README_LINUX.txt
"* with Jack or Alsa, use buffer sizes that are multiple of 64, as Pianoteq prefers those sizes. With the Alsa driver, the latency is 3 times the buffer size (a buffer of 64 samples at 44100Hz gives a latency of 4.3 ms)."

Some reality check:
How much more latency does my system really have after increasing the buffering from  64@44100Hz to 128@48000Hz?

As quoted, I expected an increase of 3.6 ms based on Pianoteq's README_LINUX.txt.

With the internal Mono-Mic of a laptop I now recorded the key bottom noise and speaker output of Pianoteq's NY Steinway D Player at buffersize 64@44100 Hz and found:
6 ms time lag between key bottom and piano.

Then with increased buffer of 128@48000Hz I found a higher time lag of 12 ms between key bottom and piano.

So in this experiment the time lag increased by (12 ms - 6 ms) = 6 ms, which is more than the predicted 3.6 ms. Or more exactly 2.4 ms higher than the predicted increase of 3.6 ms. This is in the magnitude of one more buffer of 128 samples at 48000 Hz being 2.7 ms. Don't know, if this is coincidence.

https://i.postimg.cc/kgJNR9BS/key-bottom-vs-sound.png

Side notes:
-----------
- This is not a 2-channel-measurement, so the exact start of the pianosound is overlapped by the earlier key bottom sound and not so easy to guess. With key E6 (MIDI note#88) as shown it just seems to be good enough.
- I used a 500 g key weight to get a repeatable key movement of 9.81 m/s² ("1G").
- The key weight is a bottle with coins, so some of the recorded noise might be "Money, it's a gas ...".
- A small systematic error because the MIC distance to the speakers has been 30 cm more than to the white key. With speed of sound (343 m/s) the pianosound came 0.9 ms delayed.

Last edited by groovy (Yesterday 21:59)