PDA

View Full Version : Acoustic piano latency



artsoundz
08-31-2005, 06:27 PM
What is the latency of a world class, perfect acoustic piano? My personal fav is a Yamaha C-7. Digperformer is 64 and anything above makes me uncomfy. Curious me. Thanks in advance! Kevin

Bruce A. Richardson
08-31-2005, 07:33 PM
What is the latency of a world class, perfect acoustic piano? My personal fav is a Yamaha C-7. Digperformer is 64 and anything above makes me uncomfy. Curious me. Thanks in advance! Kevin

64 refers to the number of samples in the buffer, not the latency, since latency is a factor of both clock speed and buffer size.

The "latency" of a grand piano is a rather misleading term. Literally, it would be a mechanical "none," except for the time it takes for the sound waves to travel from the body of the piano to your ears. Sound travels around 140 feet per second at average room temperatures.

artsoundz
08-31-2005, 08:04 PM
I understand that.I was using the 64 as a point of referance.(It takes longer to hear a sound at 128 ). But it seems that for most pianos there must be a certain time lag. After all, the piano key system is mechanical and the key to hammer mechanism isn't one piece. it must create some delay?I then wonder if it will ever be possible to match the piano with soft synths.So , does sound travel faster when it's warmer? cuz I could turn the heat on in my house.........Thanks, Bruce.

Hans Adamson
08-31-2005, 08:21 PM
Kevin,

Acoustic pianos in the "real" world normally have no latency as the hammer will hit the string pretty much exactly as the key hits the keybed. The downward motion by the key can be compared to a sledgehammer swung to hit an anvil - the sound comes when we would expect it - when the hammer strikes, not before. Therefore there is no "latency". Latency in a computer means that the sound will be generated very shortly after you would expect it when playing an acoustic instrument.

Hans Adamson
Art Vista Productions
http://www.artvista.net/

artsoundz
08-31-2005, 08:57 PM
Thanks,Hans. I understand what latency is in a puter. It's just that I always thought there was SOME measurable delay with a piano mechanism. But I get it. Thanks again! K

Paul Blankenau
09-01-2005, 12:15 AM
Actually, 1100 feet per second is a bit closer at room temps. Heating your studio another 30 F only gets you another 30 feet per second.

ohernie
09-01-2005, 03:59 AM
Interesting question. The latency would generally measured from the time one feels the bottoming out of the key. Since the hammer is already in motion and has such a short distance to travel the latency is low. One has to note, however, that the finger has to begin it's travel before the beat in order to get the key down in time. The note is selected before it is played.

So, on a piano the note selection and the note "trigger" or "play command" occur at two different times, giving it a latency advantage over a a synth - where they occur together.

Makes for an interesting observation. If one could develop a keyboard/softsynth system where, say the first 1/8" of travel caused a sample to be fetched and buffered but not played, then the latency could be on parity with an acoustic piano, especially with a weighted (slower) action. Obviously the prefetched sample would be played when the key bottomed out with the appropriate velocity.

Getting extreme about it, this could possibly be done with midi. The keyboard would send either a controller message indicating the selected key or a note on, note #, and a velocity of 1 at the start of travel. I am presuming that that velocity would not be heard. At the end of key travel it would send the note with the actual velocity.

(Just got off of my second gig - I'll read this again "tomorrow" to see if my lack of sleep has given me delusions)

Ernie

Chaim Goldman
09-01-2005, 09:58 AM
Great idea. I was reading Hans' post and thought about the same thing, just a slightly different approach.

Maybe we can make a keyboard that will 'see' the buffer setting of your sound card, and simply trigger the note earlier in the key travel according to the buffer.

But then the touch sensitivity of the keys wouldn't be so effective I guess.

And also some times the key is stroked fast and some times slow. So the amount of time from the beginning of the stroke to the bottom surface isn't the same always. Hmmm...

OK it's got to be figured out, but the concept I think is a good one.

Imagine your G5 (or PC) at a buffer of 1024 and running tons of polyphony! No rendering to audio. Freedom of endless touch ups on midi notes...

artsoundz
09-01-2005, 10:23 AM
to the previous 3 posts-Now THAT's what I was looking for! But Bruce, you need to turn up the heat! :) Thanks to all. Kevin

arwa02
09-01-2005, 02:12 PM
Well, considering the speed of sound at ~ 340 meters/second the delay is about 3 ms when sitting at a grand piano (1 meter to the strings). This is very comparable to the audio equipment used today (if you use headphones).

Also, a lot of the sound you hear when you play in a regular room have been reflected by a wall at least once. Sounds that have travelled 5 meters back and forth (~ 30 feet) have been delayed by 29 ms.

I guess people have different sensibility, but the only times I've experienced that I have latency AT ALL since I got my GSIF/ASIO card a couple of years ago, are when I play samples that haven't been trimmed down enough in the beginning, i.e. have a couple of milliseconds of silence before the actual SOUND starts.

Trivia is that in the nerves of your body, nerve signals travel with 120 m/s. So there's a delay of 4 ms from the time you KNOW you want to press that key to the time your finger at the end of your arm also knows about it.

There's also a 4 ms delay from the time your finger feels the bottoming out the key until your brain knows it it, and also starts believing it. So if the sound gets to your ears in 3 ms, but the sensation of a pressed key takes 4 ms, the sound actually arrives before you've pressed the key?

BUT! Luckily, if you have a big head, there's a delay of 1.5 ms from the time the sound hits the ear to the time your brain gets the message. :)

Also if you LOOK at the key while you play it, you'll know you've pressed the key almost instantly with the speed of light, so you'll reduce your latency by 4 ms by looking at your keyboard when playing it.

Confusing, yes, but the point is also that you aren't aware of all these latencies in your body, because the brain compensates for it. Your brain learned to deal with it. You have the sensation of no latency in your life in general, AND when playing your acoustic grand because you've always believed that everything you do is instant. Trying to get less than 5 ms latency out of your computer is virtually useless if you're further than a feet from the speaker.

But you know if you want to go really low latency hardcore, play your acoustic piano with your forehead, and feel the sound from the vibrations of your head on the keyboard. :)

/A

musikman
09-01-2005, 06:58 PM
Arwa, this has to be the MOST INTERESTING approach I have ever seen about latency! :D

Paul Blankenau
09-01-2005, 07:35 PM
Cranial pianists are justifiably proud of the low latencies they achieve, but considerable skill is required before the results are as good as those of standard piano technique, and chronic neck injuries are common. Increasingly, the favored solution is for the piano, pianist, and audience to be underwater, which provides an sonic velocity (at 20 Celsius) of 1480 meters per second, or 4855 feet per second.

artsoundz
09-01-2005, 07:48 PM
That's using your head. Sounds to me like a job for latent gay republicans. :)

Bruce A. Richardson
09-01-2005, 09:00 PM
Actually, 1100 feet per second is a bit closer at room temps. Heating your studio another 30 F only gets you another 30 feet per second.

Haha...yes, one of my "ones" didn't make it onto the post. I was computing at 80 degrees, which is about as cool a temperature as it gets indoors in Texas this time of year--1140 feet per second.

ohernie
09-02-2005, 12:46 AM
Confusing, yes, but the point is also that you aren't aware of all these latencies in your body, because the brain compensates for it. Your brain learned to deal with it. You have the sensation of no latency in your life in general, AND when playing your acoustic grand because you've always believed that everything you do is instant. Trying to get less than 5 ms latency out of your computer is virtually useless if you're further than a feet from the speaker./A

This is the area I've been thinking about - the subjective latency vs the real number. In other words, the effect of when one expects the sound to happen. The tie between the touch or bottoming out of the key and the sound itself. Why can I tolerate more latency with a weighted action than I can on my SY99's synth action? How is it that playing piano within feet of the speaker on the SY99 bothers me more than walking out 20' with my AX-7 (piece of junk heavily spring loaded action similar to EP series - my humble subjective opinion, of course).

(And I now have a wireless midi setup - playing piano from 75' away is a real "trip" - don't recommend it except as an experiment ;) )

On side aspect - when I have found at times that when going back and forth I can play some riffs faster on my weighted action than on a light synth action. Figured out that (for me) with the weighted action the endpoint is obvious and the finger goes straight to the next note. With the lighter action my finger hits bottom earlier than expected and waits until the brain goes "oh yeah, I'm there" and tells it to go to the next note. Since it's not as automatic it is slower.

The more I analyze this, the more I think a good keyboard should be based on energy transferred - pushing a mass rather than a spring. The finger transfers energy to a mass and that accumulated mass over whatever milliseconds it takes to get the key down becomes the "velocity" when the end of keystroke is reached. The player naturally compensates by playing slightly ahead of the beat and the small but finite amount of time over which the energy is accumulated gives the player a high resolution control over the "velocity" / "touch".

I like the idea of the maximum pressure coming at the beginning and the "release" (click?) at the end just before bottoming out. And on an acoustic piano the sudden lightening up of the pressure at the end acts as a cue to the senses that the stop is coming. The diminished force needed at bottom allows one to relax the finger once it's down leading to less fatigue.

I'm sure the wizards at Fatar, Yamaha, Roland, etc. have worked all these relationships out. None of this thinking is going to do me any good if I can't build my own keyboard. What I *am* getting out of this is a real respect for the developers of the acoustic piano action.

Ernie

arwa02
09-02-2005, 07:04 AM
Haha.. are people REPLYING? :P

No, but it's really kind of serious. The brain has like half a second latency compared to the world around you, but tricks you into believing you live here and now. There are lots of recourses on the web but you can read more at http://www.draminst.se/start/inenglish/articles/ljudartikel/ for instance.

The discussion about weighted vs. nonweighted is also relevant. Weighted keys carry a moment of inertia, so you don't need to push the key all the way to the bottom. Just hit it hard at the top and it will keep going straight down to the bottom. Although this doesn't work as well on my weighted keyboard/controller as it does on my parents acoustic grand piano. Of course the latency won't change, but it will allow you to play faster.


I'm sure the wizards at Fatar, Yamaha, Roland, etc. have worked all these relationships out. Probably the same applies as with most other handycraft. There are ton's of physics and science research to support different theories, but the best of the best is still produced by the people that have been doing it for generations, and have developed skills and intuition to simply know what sounds and feels right.

We've known more than we need (and want to know) about soundwaves, pressure, acoustics and material properties for hundreds of years. Doing fairly sophisticated computer simulations of, for instance, a violin might be possible, but to further ENHANCE the sound of a Stradivari by the use of computers and science is a whole other issue.

/Arne

baudio
09-02-2005, 04:15 PM
Thanks arwa02 for mentioning headphones. Using headphones instead of monitors is a good way to reduce latency. 1 meter distance to the monitors adds 3 ms latency. I often use Sennheiser HD-600 plus a good headphone amp.