Topic: Velocity-Curve by Statistics

Hello,

calibrating an individual velocity-curve can be very difficult. There is an experimental software at https://github.com/localh0rst/Velograph which helped me a lot to analyze my keyboard. That program counts and graphs the played velocities in realtime.

Because the velocity counts can be dumped to a textfile, I was able to import it into a spreadsheet (LibreOffice Calc) and to find a statistical method to optimize the response of my elderly Kawai ES3.

It has a narrow range between ppp and fff (somwhere between 25 and 104) and the bell-like curve of a moderately played ballad shows an even shallower range between 31 and 91 in real life. I found five points in the velocity curve, which are sufficient for a good calibration.

a) The "median" velocity (50% of all counted velocities are below this value).
b) The both extreme velocities (the minimum and the maximum that can be reached).
c) The 15%-quantile (15% of all counted velocities are below this value).
d) The 85%-quantile (85% of all counted velocities are below this value).

Having found these 5 velocities on the x-axis of the verlocitiy-curve, I just had to vary the vertical position of the three middle values:

A) For the median (x=65) a good average like y=71 (mf) seems to be a good choice. This provides the basic sound character of the piano. (yellow dot)
C) The y-value at the 15%-quantile determines the expressivness of soft playing. (orange dot left)
D) The y-value at the 85%-quantile characterizes loud playing. (orange dot right)

With this simple method I found the best velocity-curve for my Kawai ES3 I ever had:

Velocity = [25, 52, 65, 73, 104; 0, 33, 71, 84, 127]

Interesting is, that one single velocity step in y- or x-direction can be heard and is important for the heard and "felt" sound. It is worth to do this finetuning with every of the three middle points of the developed curve.

Some room is left for further optimization, the fixed extreme points (minimal/maximal velocity, see b) could be varied in their x-position.

Cheers

http://s1.directupload.net/images/140822/32j6k7tz.png

Last edited by groovy (22-08-2014 06:39)

Re: Velocity-Curve by Statistics

Interesting. The link to the software seems to be dead, however. Can it be found elsewhere? I did a search in Google and came up empty-handed.

EDIT: Now I see--you have to do a search for Velograph on the page that says you're on the wrong page.

Is this for Linux only? Uses Alsa MIDI, so I guess so.

Last edited by Jake Johnson (22-08-2014 02:32)

Re: Velocity-Curve by Statistics

Hello All,

Personally, with a real grand piano, I would hope we would adapt our fingers to the instrument, rather than the other way around.  It is for this reason that I consistently leave Pianoteq's velocity curves intact as a straight line from 0 to 127.

Now, I suppose if one had an inexpensive keyboard with plastic keys that felt more like a Hammond organ than a piano, that the given keyboard would be "too hot" for Pianoteq (i.e. fire too many velocities above, say, 100), then there might be reason to tame down the velocity curve, but I do not understand how on might adopt "someone elses" curve to your own keyboard/Pianoteq combination.

Cheers,

Joe

Re: Velocity-Curve by Statistics

Jake Johnson wrote:

Interesting. The link to the software seems to be dead, however. Can it be found elsewhere? I did a search in Google and came up empty-handed.

EDIT: Now I see--you have to do a search for Velograph on the page that says you're on the wrong page.

Is this for Linux only? Uses Alsa MIDI, so I guess so.

Sorry, Jake, I corrected the link now (there has been a comma at the end), thank you.

https://github.com/localh0rst/Velograph

The software is just a perl-script with a few prerequisites (libs for midi and graphics-interface). Its author is using Ubuntu, I am running it on Debian (Jessie) together with Pianoteq 5.

Cheers

Re: Velocity-Curve by Statistics

I see that there are versions of Perl that will run in Windows 8 (at http://www.perl.org/get.html ). Does anyone know which is needed, or will run better, or has the best features? Active State, Strawberry, DWIM? Obviously, I'm not familiar with Perl.

Last edited by Jake Johnson (22-08-2014 07:58)

Re: Velocity-Curve by Statistics

jcfelice88keys wrote:

Personally, with a real grand piano, I would hope we would adapt our fingers to the instrument, rather than the other way around.  It is for this reason that I consistently leave Pianoteq's velocity curves intact as a straight line from 0 to 127.



Joe


I think you are right.
It is the same problem with all the softwares. Too much time spent to tweak... and not to play.

Re: Velocity-Curve by Statistics

stamkorg wrote:

Too much time spent to tweak... and not to play.

Not that dramatic ;-) Tweak the velocity 1 day and be very happy playing a wonderful expressive instrument 364 days of the year ...

Cheers

Re: Velocity-Curve by Statistics

I would love to be able to run that software. Perfect for geeking out.

My keyboard does not transmit a velocity under 23. 23 is the softest I can play and get a sound reliably. Since I am a conservatory trained classical pianist, I am confident that it is a limitation of the keyboard and not of my technique. On the other hand, I can get it to transmit 127 quite reliably. SO, my curve is a straight line from 23 to 127. If you are interested in cultivating good control of your fingers, I do think a straight line is the way to go. I like how pianoteq shows a line on the velocity curve graph representing the velocity of the note you play. That has helped me to really learn how to get each dynamic level on my keyboard reliably.

Now, if you are not already a pianist able to control the full dynamic range of a piano, then any velocity curve you come up with based on your own playing is going to be comfortable for you, yes, but not a good representation of how you would sound on a real grand. Narrow dynamic range is something I am always helping my students to overcome, so if you have aspirations to play well on an acoustic grand, I would say make sure you are not using the velocity curve to mask your weaknesses!

Last edited by rjpianist (24-08-2014 03:38)
Rachel Jimenez
Classical pianist and teacher
http://fundamentalkeys.com

Re: Velocity-Curve by Statistics

rjpianist wrote:

[...], I would say make sure you are not using the velocity curve to mask your weaknesses!

I would say a bad velocity curve can mask your strength and potential! :-) If it does not let you control the dynamics right, you loose expressiveness and inspiration.

If you like your velocity curve starting at x=23, you would not go back to (0,0) (127,127), just because this would be a more linear curve, I guess ;-)

Re: Velocity-Curve by Statistics

rjpianist wrote:

Now, if you are not already a pianist able to control the full dynamic range of a piano, then any velocity curve you come up with based on your own playing is going to be comfortable for you, yes, but not a good representation of how you would sound on a real grand. Narrow dynamic range is something I am always helping my students to overcome, so if you have aspirations to play well on an acoustic grand, I would say make sure you are not using the velocity curve to mask your weaknesses!


Hello Racher,

Truer words were never written, well at least as they apply to velocity curves.  I was dismayed to read that your personal keyboard did not generate note-on velocities below 23, as that has reduced your workable dynamic range by approximately 20%.

Cheers,

Joe

Re: Velocity-Curve by Statistics

rjpianist wrote:

If you are interested in cultivating good control of your fingers, I do think a straight line is the way to go.

Depends entirely on your Keyboard.  If a linear approach to playing gives a linear result for dynamics, then fine.

My own keyboard was not designed at all for playing Grand Piano (rather for controlling a Pipe Organ or its digital equivalent), but it IS "touch sensitive".  Dynamic range from below 10 up to easily 127 is regularly attainable, but does not map linearly.  Better to program the Curve to match the Keyboard's response.  So if I strike a note "just so much harder", it will sound "just so much louder", rather than horribly louder or perhaps nearly unchanged.

Obviously there would be better "carry over" if I had a more realistic Keyboard.  But as it now stands, I can enjoy beautiful sound AND cultivate expressive playing.  What more would I need for a Home Entertainment System?

-- OrganoPleno

PS -- I very much enjoyed your Book, "Fundamental Keys", which contains a lot of very enjoyable Music.  Perhaps now I am no longer a "Rank Beginner" but perhaps actually the "Advanced Beginner" which I have always dreamed of becoming.  Thanks for the Help!

Re: Velocity-Curve by Statistics

Interesting! I assumed all keyboards would have a linear response. They don't??? Why would a maker do that? Hmmm...

OK, so I amend my previous statement as follows:

If you are interested in cultivating good control of your fingers, I do think a velocity curve that makes your keyboard respond linearly is the way to go. Narrow dynamic range is something I am always helping my students to overcome, so if you have aspirations to play well on an acoustic grand, I would say make sure you are not using the velocity curve to mask your weaknesses!

Thanks, guys!

Rachel Jimenez
Classical pianist and teacher
http://fundamentalkeys.com

Re: Velocity-Curve by Statistics

rjpianist wrote:

[...], I do think a velocity curve that makes your keyboard respond linearly is the way to go.

Maybe, but we don't even know actually, if a "linearly" response is, what a human body likes or prefers. We like to play guitar and its response to the player - but is a guitar a linear system with all those bending material, resonances and attack-phases? I don't know.

What humans like, are simple solutions and a simple straight line is appealing, yes. But alas often it is just an oversimplified model.

The best, we can hope for is, that a keyboard provides the full resolution of 127 discrete velocity values. Everything else can be tweaked afterwards to achieve the best response for an individual person and an individual instrument. The only problem is, that the trial & error method for the best curve can be a little time consuming, as there are 127^127 possibilities ;-)

Last edited by groovy (25-08-2014 11:51)

Re: Velocity-Curve by Statistics

I have used the Pianoteq calibration function multiple times on the velocity curve for my keyboard, a casio PX-780, each time is slightly different.  The curve has become more regular each time.  Is this an indication that I am learning some control of dynamics?  But in all cases it is not a linear response.  It looks a lot like the preset curve that Pianoteq recommends for a slow keyboard.  As I go on learning the curve may flatten out more.
Maybe some day I will be able to work with a straight line, until then I'll trust the calibration function.

Bill

Re: Velocity-Curve by Statistics

Eventually it is of interest, what a velocity-mapping (Velocity = [26, 52, 65, 73, 105; 0, 33, 71, 84, 127]) changes in my example. In Libreoffice I calculated, how the velocity-distribution changes, if exactly the same MIDI-Events would have been played "thru" that customized curve (which is not more than a simulation):

http://s7.directupload.net/images/140825/h2lztoh9.png

The limitations of a narrow native resolution do not disappear by stretching of course. Blowing it up produces gaps and some velocities cannot be reached any longer. This is the price to pay for an extended dynamic range.

The distribution-sum (where the quantiles can be picked from) would change like the following (blue):

http://s14.directupload.net/images/140825/m8pvxmdd.png

You can see the steps ("stair") in the distribution-sum too.

Cheers