The remaining unknown variables are the latency for processing a tone and the MIDI-signalling via USB from my Kawai to the subnotebook (Celeron N2930).
I have an estimation for the "unknown variables" eventually. I don't know, how to measure it exactly, but I compared the note-on-latency of my USB-keyboard with the fastest midi-keyboard I have: the virtual-keyboard inside pianoteq clicked with an USB-mouse!
From the noise of the mouseclick to the sound from the speaker I measured ~19 ms (average of five clicks). Example:
And then I repeated the same with my Kawai ES3 connected to the subnotebook with an USB-cable. The average response from 5 hits (forte) was ~35 ms. Example:
So triggering a midi note-on from my USB-keyboard lasts ~16 ms longer than triggering a note from the virtual-keyboard with my USB-mouse (on my system).
EDIT: Assumed that my overall latency is ~35 ms and ~19 ms is the best overall latency I can achieve with the virtual-keyboard, then ~16 ms are needed just to produce the midi-on-event in pianoteq with my real USB-keyboard.
Why is the virtual keyboard ~16 ms faster? Using the real keyboard the (USB) midi-signal has to pass the snd_usb_audio kernelmodule ("driver") on the notebook. Plus the mouse button has a shorter contact-distance than a key. Plus unknown initial latency for midi-note-processing inside the Kawai.
The only parameter that could be influenced is the performance of the snd_usb_audio "driver". With older 2.6x-linuxkernels there was an option 'nrpacks' for example, that could be reduced from 8 to 1, and this shorter chunks improved USB-latency. In newer kernels, like my 3.16x from this experiment, nrpacks is obsolete now and handled automatically AFAIK. BTW, does someone know, if USB-latency can be tweaked somehow nowadays in 3.x-kernels?
cheers
PS: Keep in mind, that the overall latency of course is influenced by the speed of the keypress. Hitting my test-key with ff I saw latencies down to 30 ms (rather than ~35 ms)
Last edited by groovy (19-02-2015 15:55)