Topic: Lattency. What you get ? What do you notice ?

Another users reasearch .

I would like to request what latency you get in your system (describe number of samples please) and at what point you notice latency and what number it needs to start feel confortable or inconfortable.

For example, if you start to notice some latency (delay) ate 4ms, or 5ms, or just at 9ms etc. And when you start to feel uncomfortable with noticed latency, and when pianoteq star to to feel "heavy" using low samples.


I got 10.2ms latency with 448 samples,  and 5.8ms with 256 samples, using dual core. I noticed some latency with 5,8 if pay a lot of attention, but don't anoy me. At 10ms it do not really much anoyme but I feel it could be better.
Who is used to play in digital piano onboard sound are used with very low latency.

Last edited by Beto-Music (17-07-2017 14:19)

Re: Lattency. What you get ? What do you notice ?

Note that number of samples is not the whole system latency. There is USB bus latency that audio applications are not showing to you, there's latency of digital-to-analog converter, plus there's also the (very small but still there) latency of your MIDI controller. That all adds up.

See this image:

https://www-media-presonus.netdna-ssl.com/uploads/news/media/images/LatencyChain_12-30-13_RR02.jpg


In our case where we just use MIDI controllers, we're not recording audio input directly, you can disregard ADC, USB Bus clock front and ASIO driver input numbers. But you can still see that just what audio driver reports to you in number of samples is just half of the story.


I'm using my RME UFX+ at 128 samples and I'm definitely not noticing any latency while playing Pianoteq via MIDI. Also, my audio interface is connected via Thunderbolt, not USB, so those USB figures don't apply here - Thunderbolt is a faster protocol, packets are smaller and its inherent latency is way less than USB.

Last edited by EvilDragon (17-07-2017 17:30)
Hard work and guts!

Re: Lattency. What you get ? What do you notice ?

If was that much a lot of people would be complaining...

USB 2.0 it's said to be 0,125ms

https://stackoverflow.com/questions/138...of-usb-3-0

Re: Lattency. What you get ? What do you notice ?

0.125 ms is best case scenario, and it also depends on how many USB devices you have hooked on to your computer. The more devices there are, the more the bus needs to scan through, etc.

In any case, the USB latency is there and it does exist. You can do loopback tests to see what your total round-trip latency is, but this is for the whole chain (audio input to audio output). And we only use half of the chain (audio output only).

Hard work and guts!

Re: Lattency. What you get ? What do you notice ?

This also includes the distance to the loudspeakers. As far as I know, the 4ms per meter. I have at 10ms with headphones no problem. If the speakers but 2m away from me it starts to disturb me.

Pianoteq 7 Pro with all pianos

Re: Lattency. What you get ? What do you notice ?

Will you add latency due the velocity of electrical signals travels along our nerves, from the brain (go as comand to press finger against key and back as pressure sensation on finger) to the finger, and from the ears to the brain ?   Or the time it take to our brain process sound signal...


Last edited by Beto-Music (17-07-2017 17:38)

Re: Lattency. What you get ? What do you notice ?

Urs Zimmermann wrote:

This also includes the distance to the loudspeakers. As far as I know, the 4ms per meter. I have at 10ms with headphones no problem. If the speakers but 2m away from me it starts to disturb me.

Are you sure of these numbers?

Re: Lattency. What you get ? What do you notice ?

Under Linux, I get a 100% stable system at 48KHz and 64 samples with the driver ALSA.
The indicative latency is 1,3 msec (2,7 msec in/out), the real latency is probably higher but I can't measure it.

At 48KHz, I definitely feel the latency at 256 samples, discrete but clearly felt. I feel frustrated at this level, unacceptabe for me.

At 128 samples, I don't feel it. I could play at 128 samples, but since my system is stable at 64 samples, I stay there. The connection is natural between the keyboard and the sound, no more no less than on my acoustic (about latency).

I can stress the computer at 128 voices of polyphony several minutes without dropouts. It is largely enough for my pianistic level.

Re: Lattency. What you get ? What do you notice ?

Sound speed=342 meters/second  or 0,342 meter in 1 milisecond or 2,923ms of latency per meter.

But I supose our brains are already trained to interpret real world latency as normal, and this incluse our nerve system latency.
I remamber Philippe once commented about the latency in a real piano, and it was usually higher than the pianoteq latency (not counting USB and digital - analogic conversion)

This makes think... If a concert grand piano would have latency difference from the front to the back, and the final sound heard by the player would be one, due delays related to his ditance to the several piano components and to large conmponents specific places (beging or end of soundboard and harp cabinet piano body)

PunBB bbcode test


While a distant audience would hear a more "normal" sound, since the distance between the piano components would be relatively irrelevant to the main distance of piano to audience.

On pianoteq I presume all this is simulated. So you could be able to get close to a "latency free" sound between piano components by increasing the sound speed adjust and placing the mics far away.
But the sound speed slider goes only up to 500meters/second.
Why not a option to turn sound speed almost infinity ?


Lucy wrote:
Urs Zimmermann wrote:

This also includes the distance to the loudspeakers. As far as I know, the 4ms per meter. I have at 10ms with headphones no problem. If the speakers but 2m away from me it starts to disturb me.

Are you sure of these numbers?

Re: Lattency. What you get ? What do you notice ?

Evildragon, I would like a little help about samples and latency. AUdio buffer size (pianoteq Options adjust) and asio4all buffer size and  In/Out samples.

I'm also confused about the asio4all driver I installed and the UM-1G driver I installed. Which one is working, or both works ?

Last edited by Beto-Music (17-07-2017 17:48)

Re: Lattency. What you get ? What do you notice ?

That's interesting, it is latency (sound) that we naturally (at least for me) don't take into account.

Re: Lattency. What you get ? What do you notice ?

Come to think of it, it could easily get complex. If placed mics on an acoustical Grand piano would record vibrations of strings all arriving from different regions... emulating that would be something (don't know if Pianoteq does that).

Last edited by Lucy (17-07-2017 18:00)

Re: Lattency. What you get ? What do you notice ?

Yes, Pianoteq does that. Causes delay in arrival of sound between different mics, which results in phase shifts. There's an option to compensate for that, though.

Hard work and guts!

Re: Lattency. What you get ? What do you notice ?

The first versions probably had a fixed mic setting.  But since version 3 (if I remamber well) pianoteq have the mic room that simulation real grand piano sound erradiation. So I presume it considers that.

But some people who used multiple speakers may want to compensate the speakers distance to be more coherent with mic distances, something like that. For example one mic in the rear end of a pianoteq concert piano and other mic in the front, but he places of speaker to each. That's why there is the sound speed slider, but I'm not sure if the minimal and maximal difference in tat slider is enough for all case scenarios.

And there will be always some fanatic people who will ask crazy things, like the latency or delay adjust  due mic's cable lenght.


Lucy wrote:

Come to think of it, it could easily get complex. If placed mics on an acoustical Grand piano would record vibrations of strings all arriving from different regions... emulating that would be something (don't know if Pianoteq does that).

Last edited by Beto-Music (17-07-2017 18:14)

Re: Lattency. What you get ? What do you notice ?

EvilDragon, what about FPT (Fast Processing Technology ):

https://www.cakewalk.com/Support/Knowle...Technology


My Midi-USB cable, Cakewalk UM-1G, uses this FPT

Re: Lattency. What you get ? What do you notice ?

That does not alleviate latency and jitter completely. USB has its rules, they cannot cheat against them.

Hard work and guts!

Re: Lattency. What you get ? What do you notice ?

Here is an article referenced by Philippe. (In the picture attracted attention rattling damper with 80 ms).

http://www.speech.kth.se/music/5_lectures/askenflt/images/42_03.gif

http://www.speech.kth.se/music/5_lectur...asure.html

And here the interaction of the delay between pressing and hitting the string depends on the dynamics is interesting.

http://www.speech.kth.se/music/5_lectures/askenflt/images/43_04.gif

http://www.speech.kth.se/music/5_lectur...ybott.html

At the fortissimo, the hammer strikes the string later than the key reaches its bottom. And the pianissimo delay between the sound and the bottom of the key can reach up to 20 ms (earlier) ..
Hmm .. how much is this dependence implemented in Pianoteq? I'll go play and listen ..

Apparently this is possible only with optical tracking of the hammers, but not with the sensors of conventional keyboards, which are located almost at the bottom of the key ..

Last edited by scherbakov.al (19-07-2017 11:28)

Re: Lattency. What you get ? What do you notice ?

So why everyone and every review about Cakewalk UM-1G give 5 star and a lot of elogies ?

Is all MIDI-USB convert cables slowe than the older one, the MIDI-joystick cables to connect in the game port of soundcards some years ago ?

EvilDragon wrote:

That does not alleviate latency and jitter completely. USB has its rules, they cannot cheat against them.


Philippe knows everything about real pianos.

The digital piano have some "mechanical lattency" too, since the hammer action key only start pressing the sensor (two sensor to define the note velocity) after  the key reach some depth, and there is a delay between for it hit each sensor, and this delay (from sensor 1 to sensor 2) creates a number that gives the key velocity.
In real pianos it's the time for the key to move the mechanism, that will impulse the hammer to hit the strings.  But I personally do not consider it as a real latency, despite it technically be correct, cause I only consider as delay, a feeling of delay, after the key reach the botton and give that "knock".
The "knock" feeling we get in the point of the finger, when the key reach the bottom, is the start to me, my brain do not intent the hear anything in the time between start pressing a key and the "knock"  sensation.  I presume for other people it's the same thing, otherwise much people would complaim about real pianos. 
Of course there is a very small space of time after the key reach the botton of the key dip, and the hammer hit the strings, since there is a point where the hammer is realeased and goes alone, but this short time appears to do not disturb anybody.
The higher velocity, the lower these latencies will be. Maybe the relation it's one thing that helps our brain to see it as natural in real pianos.

PunBB bbcode test

PunBB bbcode test

https://www.youtube.com/watch?v=aGY87KUuz8E



About the damper pedal, people would find strange if the damper effects would react imediatelly after the feet touch the pedal. Again it's logic to our brain wait some response only after some portion of the damper move. But I feel that real pianos are not like progressive digital pedals for digital pianos. I had not played many grand pianos, but in the few I palyed the sustein only started to work after the pedal have already move the majoroty of the portion it was able, so it worked very near the botton, and it make halp pedaling considerably more difficult in real grands than in digital pianos with progressive sustein pedals.


I was wondering. What about get a real concert grand piano action, adapt to PNOscan, and set pNOscan to the best latency, and use the best conncetion possible to competer, like EvilDragon use ?
PNOscan use velocity optical sensors that measures the velovity of the key. I imagine it do not need to wait until the wood key reach the deep bottom until send the MIDI signal.
So we would make a experiment:
We set PNOscan to have the best latency possible, probably better than real pianos, and get a pianist to play it . Would he imediately find it strange or not ? Better or worse to use ?
We then allow hin for 2 or 4 weeks, and no other real piano or other digital piano.  After that we allow hin play a real grand.  Would hin, after that, find the Grand piano latency anoying ?


scherbakov.al wrote:

Here is an article referenced by Philippe. (In the picture attracted attention rattling damper with 80 ms).

http://www.speech.kth.se/music/5_lectures/askenflt/images/42_03.gif

http://www.speech.kth.se/music/5_lectur...asure.html

And here the interaction of the delay between pressing and hitting the string depends on the dynamics is interesting.

http://www.speech.kth.se/music/5_lectures/askenflt/images/43_04.gif

http://www.speech.kth.se/music/5_lectur...ybott.html

At the fortissimo, the hammer strikes the string later than the key reaches its bottom. And the pianissimo delay between the sound and the bottom of the key can reach up to 20 ms (earlier) ..
Hmm .. how much is this dependence implemented in Pianoteq? I'll go play and listen ..

Apparently this is possible only with optical tracking of the hammers, but not with the sensors of conventional keyboards, which are located almost at the bottom of the key ..

Last edited by Beto-Music (19-07-2017 18:59)

Re: Lattency. What you get ? What do you notice ?

I'm curious to know if before the invention of scapment, the grand pianos have a little short lattency, understanding the lattency as sound response after the key reach the bottom of key dip.

I'm also curios if it's possible to adjust PNOscan to simulate the real piano latency, which is shorter for higher velocitie. Again, considering latency after the key reach key dip, since PNOscan use real piano actions (instaled on it) and thave the mechanic natural latency about the time required to the key go from the top to the bottom.

Yamaha Avantgrand have the sensor near the hammer, in the hammer's arm (shamk), so I believe it simulates all the natural grand piano latency, plus a electrical signal latency.

Last edited by Beto-Music (19-07-2017 18:46)

Re: Lattency. What you get ? What do you notice ?

I can't manage to use this software, supposed to measure latency :

https://expressiveelectronicsformusicia...y-analyser

Last edited by Beto-Music (20-07-2017 00:36)

Re: Lattency. What you get ? What do you notice ?

I know this is an old discussion, but I want to add something.

I work mainly as an audio engineer, both live and in recording. Note that today most mixing consoles are digital. Plus, in any larger venue you will encounter digital stage boxes that transmit the audio via an ethernet protocol of some sort. These things both also add latency. Thus, when you have a 1,3msec latency, you can add the round trip to the digital console and back to your stage monitor or in-ear plugs. Things start adding up!

Me and myself, I use 64 samples either with a Scarlett Solo USB interface or a very old RME Digi PCI card on kxStudio Linux 18.04. As others here, I can feel 256 samples as unacceptable, 128 is fine. But since other factors for latency might pop in (see above), I go for 64 samples, which is about the smallest buffer I can use without disaster. :-)

Plus, if you use PianoTeq not standalone but as an LV2 plugin within Carla, the MIDI processing inside Jack will also suffer from the same latency setting as the audio. Which perhaps even makes sense, as incoming MIDI and audio data may be guaranteed to arrive at a Jack client at the very same time. But it doesn't make much sense for playing software instruments realtime.

Best
Schwob

Last edited by Schwob (10-01-2020 01:09)

Re: Lattency. What you get ? What do you notice ?

Most imporant:
turn off any frequency throttling in the BIOS (Intel speed-up etc) - run every core at max non-turbo speed and enable multi-threading

Then:
for Windows install ASIO set buffer to 128 samples at 44.1 or 48 kHz
for Linux go with default (usually PulseAudio - JACK is old hat nowadays) and buffer 128 samples at 44.1 or 48 kHz
don't run other programs you don't need at the same time as using Pianoteq
for Linux you can install a low-latency kernel and run PTQ and audio stuff at high priority but I found no need for it lately (though I do run a low-latency kernel)

3/2 = 5

Re: Lattency. What you get ? What do you notice ?

SteveLy wrote:

for Linux go with default (usually PulseAudio - JACK is old hat nowadays) and buffer 128 samples at 44.1 or 48 kHz
don't run other programs you don't need at the same time as using Pianoteq
for Linux you can install a low-latency kernel and run PTQ and audio stuff at high priority but I found no need for it lately (though I do run a low-latency kernel)

Sorry, I strongly disagree on the PulseAudio thing. Did you know, that for example PulseAudio uses the crappiest sample rate conversion it has by default? Which is crazy when you run your sound card at 44,1khz, when most of YouTube is 48khz. Or you run it at 48khz and most of your music collection is 44,1...  When I first heard it I first tjought my digital console (which does the DA conversion) was broken.

On Linux, Jack still is #1 choice for pro audio, and in kxStudio is the default. PulseAudio is bridged to Jack for interoperability.

The low-latency kernel is good and I would generally advice to use it when doing realtime audio. However, it also consumes more computing power as the scheduler interrupts processes more often. (Processes get their turns faster, so that they can feed buffers in time.) You may notice that noisy fans turn on earlier when using a low-latency kernel.

I doubt that you will be able to go down to 64 samples without Jack and a low-latency kernel, the latter will be needed at least on slower machines. However, on kxStudio, one will notice that the PulseAudio bridge and even the ALSA bridge may screw up at 64 samples.