An Idea For How To Sample A Piano


So I have downloaded a lot of the Pianobook pianos and have noticed one thing about the wav files ,specially the loud register up and down the length of the piano.
As you go up the scale on the louder velocity, there are differences in the actual tone of the piano as in when you play the note to sample it, although you are hitting the note harder, some notes sound softer because the notes are not being hit at the same pressure.

What I mean is, the idea is to sample the piano not the performance of the one sampling. So if we get every note to be hit at exactly the same pressure for both soft § and loud (f) takes.
So I was thinking, what about using weights to play the notes.
So you get a weight that when placed on a key, it will play that note, which means that weight will play every note at the same pressure.
You could hold the note with a finger, place the weight then when you move your finger the weight plays the note. One weight heavy enough to play loud and one for soft.

This idea is to try and sample the ‘true’ sound of the piano, if you know what I mean then when you play it, there are no tone variations in the velocities like if playing the piano live.

This is just an idea but as I don’t have a piano, I can’t try it out but would be great if someone could try this to see how the notes compare.
The reason why I thought of this is, as I am playing some of the pianos, if I am playing loudly, say going up a scale, some of the notes sound crisp as they should be at that velocity then all of a sudden a couple of notes will sound loud but dull so that means those notes were not sample at the same finger pressure.
I hope this makes sense what I am trying to explain :slight_smile:


I’m not sure that just using a weight is the best way to do this. Pianos are designed to respond to the ‘speed’ at which you press the note down (this is what MIDI velocity represents) and to how hard you press (‘pressure’ seems like the wrong word for this… ‘weight’ might be a better term), and so the ideal automatic device should be something that plays the key with a controllable set of preset velocities and ‘weights’- thus achieving consistent speeds and pressure of pressing the keys on the piano. This is going to involve a weight or a spring, plus levers and pivot points, maybe pulleys too. In fact, I suspect that it may be a little bit similar to the mechanics inside a piano action in some ways. [An ‘over-the-top’ solution might move the device across the keyboard so that the multi-samples are easy to make, but this isn’t essential for the first prototype.]

I don’t recall ever seeing a device like this… Any mechanical engineers reading this?


@synthesizerwriter Yes I understand what you are saying as that is the sort of thing I had in mind and I was going to mention that as the idea but then I thought it may be a bit complicated to create such a devise unless it is someone who samples multiple pianos, that is why I thought just the weight idea would be more practical and easier lol

The idea would be to use the weights for the first two passes of soft and loud to get the uniform sound of the piano then the round robins if used could be recorded using the finger.


Every piano (real piano) is a different story. They usually are very different from midi keyboards or digital pianos. For example the feeling of the keys in the lower range may be little heavier than the high range.
You probably need a robot-mechanism to have absolute control, but I would prefer a more musical approach with velocity layers.


@Quetzal Yes indeed, I just noticed that if I was playing a chord, sometime I don’t hear all four notes even though I am playing that chord with the same velocity. So I thought that by sampling all the keys both hard and soft with the exact velocity, then when you played a chord, all the notes played would be the same level then it is up to you how you want that chord to sound.
Although I used to have a piano years ago, I am not too hot on the technical workings of a piano, I just learnt how to play one lol


(I used MIDI as a way of illustrating the parameters, not as any suggestion for how to do this…)

The weights idea depends on the way that an object accelerates as it falls, and so the height above the keys needs to be constant. The speed with which it hits the keys will then be constant… But the speed at which the piano key will move will depend on the mass of the key itself, the friction of the action, etc. So you would need a weight (presumably covered in a soft material to protect the keys), a ruler to set the height above the keys, and some way of compensating for different frictional resistance in the piano action (I’m assuming that the weight of the keys is going to be similar across pianos and across the keyboard, but I’m not sure if this is always the case).

So it seems to me that a mechanical engineer is required, plus more information on the weight of piano keys, and the details of the friction in a piano key action, plus…


Here’s a quick sketch of one possible approach, as the starting point for discussion…


Maybe a good solution is to “normalise” (not an auto normalisation) every sample of the same dynamic group.
After all we are playing with samples!


@synthesizerwriter I was thinking more in terms of the weight sitting on the key as like if you put your finger on the key, then depressed the key. So for e.g. you have a weight that is strong enough to depress they key for a loud vel so with your left finger under the key with pressure holding it in place while you put the weight on the key, then when you are ready to record that note, you take your left finger away. I wouldn’t dream of dropping a weight on a key nor would anyone want too, also that noise would be recorded too so that would be no good.
The note should be played as if your finger was resting on the note, then you depress the note.
I would love to try this theory out but I just havn’t got access to a piano.
Two weights, one pretty heavy for the loud velocity and one light with just enough weight to play the note softer.
I can see it in my head but weather it would work, i’m note sure :slight_smile:


@Quetzal That is a good solution but I did think of that too and the thing with that would be, if you hit a note hard, the sound is chrisp but when you hit the same note but slightly softer, when you normalise that note, it will be louder but still at the same slight dullness, it won’t make the sound as bright as the first one.
Ok we are only messing around with sampling here for the fun of it but the way I see it is, if you can record the instruments true sound so every note has the same tonal quality depending on how hard you hit it, then surley the whole sampled wavs would sound as close as possible to the actual piano.

So what I am getting at is on the piano, if you use the heavy weight on C1 then use it on C3, the tone of them two notes should sound similar and then if you do the same thing using the sampled piano in say Kontakt on your midi keyboard, those two sounds should in theory have the same tonal quality and intensity.
What I did wen I put the Broadwood wavs in Kontakt was the set the vel of the soft wavs form 1 to 63 then set the louder notes from 64 to 127.
Although there are some notes that when played hard, are not as bright as others played at the same pressure. This is what I am trying to see if it is possible to sample precise pressures for loud and same for soft.


@synthesizerwriter You been busy lol.
Pretty good diagram. It looks good, all we would have to worry about is not making a noise as the key is pressed.


Maybe @christianhenson might have some views or ideas on this.
I have the Hans Zimmer Piano and when I play that, every note sounds perfectly weighted for however hard or soft the keys are pressed. Don’t know how they managed that if it was just by using a finger.


I suspect that Hans’ people have all sorts of devices at their fingertips!

Based on the ‘open mic’ approach of Spitfire’s recent BBC Orchestra library, then the noise of the finger hitting the key is exactly what a ‘Pianobook’ piano could capture as additional ‘realism’, alongside a ‘the other side of the room’ mic.

I might even go so far as to say that a really interesting project would be a percussive instrument (a ‘Finger Piano’, perhaps, to go with the ‘felt piano’!) made up from (as far as possible) ONLY the close-up noise of the finger hitting the piano key (plus all the ‘piano’ sound/noise from the piano itself that is going to spill into the gun mic that would probably have to be used…). Anyone got a gun mic to see if this is possible?

This separation of the harmonic and inharmonic content is something I’ve been looking at (in the digital domain) for some time. Doing it physically with actual audio is a fascinating revelation to me!


If I was approaching this professionally, then I would be looking at ways to get consistency and repeatability of recorded material, and would probably use spectral plots of each sample so that the various key press weights could be varied to match the natural change of spectral content across the range of the piano, and for different weights of playing (at least two levels, and beyond four sounds like it is going to be lots of work for diminishing returns). Capturing a piano at this level is a lot of work, but from the description of the Hans Zimmer material (plus everything I’ve ever heard about how Spitfire approach things) then this can be done if you want ‘leading edge, state-of-the-art’ samples.

For the ‘Pianobook’ community, then maybe applying this level of rigour to a single key might be interesting - and possible with limited resources. We would end up with a multi-‘velocity’-sampled single key that consists of maybe four (or eight?) ‘soft’ through to ‘loud’ normalised samples (with a smooth graduation in brightness), and then we could see what this sample sounds like when transposed over a limited range - a ‘narrow’ piano?


@synthesizerwriter I suppose there may be many ways of sampling a piano from very basic to very extreme.
It is all fun and also it gives these pianos a new lease of life being used in our music that would otherwise be impossible.
It is a funny sort of feeling that when I use the HZP, I am actually (sort of) playing Hans Zimmers piano or I am playing Christians Schimmel lol


I think due to the (not exactly progressively) graded action of a real piano, a purely mechanical solution will not be sufficient. Unless you adjust the weight manually every time, but I suppose that would defeat the purpose of the exercise.
Some sampling companies (probably most that offer 50+ velocity layers) use robots. You can see VSL’s here. But of course such a technology is hardly feasible for the pianobook community. Although it would be a really neat Arduino project.

Slightly off topic: As a general rule, I think the single best thing one can do to make a sampled piano more consistent and natural sounding is to record an extra velocity layer or to sample the piano in smaller intervals. So IF the kind people sampling their pianos were willing to spend some extra time and effort, that’s where I’d hope it went towards. And since we already have so many pianos in the library, maybe it’s worth considering to raise the standards in this regard: maybe major thirds and three velocity layers?


@Peter Yes very good points and I would say the last point you mentioned would be the ideal way to sample.
If we look at it this way, you own a piano or have access to one and you want to sample it. You are only going to sample it once so you would want to do the best you could so if it took 5 hours to sample using the major thirds and three velocity idea, then that is not really that bad if the end result is a better sounding replica of that piano.
It is up to you how you sample an instrument but the more work involved, the better the result. :slight_smile:


Although i am unable to sample a piano, I did sample my acoustic guitar and put it on the Pianobook site Epiphone Hummingbird Pro.
Now, as that was my first attempt at sampling, it is not really that great and I only sample the 6 open strings.
I am trying to find a way of sampling it better as when you play it like a strummed guitar chord or finger picked chord, it is not too bad but if you try to play a guitar style melody line, it sounds rubbish as all the notes where recorded open.
I have looked for vids on how to sample a guitar but they are all mainly how to sample guitar parts into music, not how to actually make a guitar instrument.
When i have managed to work out how to make it sound more realistic I will sample it again properly.


@Peter Thanks for the link to the VSL robot. Very interesting!

I’m not sure that this type of device is beyond this community. There’s a lot of rapid prototyping technology around, and replacing the weight in my quick diagram with a solenoid driven from a DAC or Arduino (or maybe even just simple analogue electronics) would give repeatability and precision. I’ve made all sorts of electro-mechanical devices over the years, so I will have a think about it… A loan device that members of the community can use would be a great asset!


@Peter Here’s an interesting paper that contains lots of useful numbers and techniques:

It looks like we need a solenoid that can deliver up to 60N in about a tenth of a second… ( This is where I really need a mechanical engineer! ) But on Amazon, then 10mm throw, 60N push solenoids are available for less than £15, and require about a third of an amp of current. So it looks like it is relatively easy to get enough force and enough movement - which leaves timing, which I think is related to how quickly you can move current (magnetic circuits hate change!). Time for some experimentation, I think…