An Idea For How To Sample A Piano


Those robots look pretty good.
As a simple idea to my original weight idea, a load of pound coins taped together with a little felt base.
Then when the loud pass is done, take some coins away for the soft pass.


A solenoid sounds like a nifty solution. Was thinking of a linear motor, but the self-noise alone would render the thing useless for sampling.


Again, this wouldn’t work because of the graded action of a piano. 10 coins in the lower register would hardly generate a pianissimo and in the higher register the exact same weight would generate a fortissimo sound. So you would have to adjust the weight with every key, and that’s much harder to get right than to actually play it with your fingers.


The way that the action of a piano varies across the keyboard is presumably why a ‘robot’ is used by library-makers. I see a solenoid ‘device’ as being part of a sampling solution…

One possible solution would first find the minimum and maximum points for each key (p min and f max) by recording each key at a variety of weights, and then extract the desired number of multi-samples for each key - I’m assuming that the curve will be constant for a given piano action. If we record all of these ‘calibration’ events, then we have all of the required samples, we just need to select the right samples.

So the workflow would be something like: for each key, start at the lowest weight, increasing the weight until a sound is produced that reaches p min, then increase the weight until a sound is produced that reaches f max. Then repeat for the other keys. For each recording of a key, the post-processing selects the first sample that gets to the p min level, as well as the first sample that gets to the f max level, and then selects the desired number of interstitial samples, based on the level that they produce. There are a number of refinements that could be made to this. but this simplistic approach would produce all of the required samples with pretty good consistency and reliability, and editing the output recording is then just handle-turning (that might be subject to automation…).

This workflow effectively sets what the ‘solenoid’ device specification looks like: a ‘latched’ mode where the key stays depressed for n seconds (for held keys); and a ‘momentary’ mode where the key is pressed and immediately released (for releases), repeated at a number of different weights (probably less than 127!), and then post-processed to extract the p min, f max and the other required interstitial samples. So we will need some sort of programmable current source to drive the solenoid, and a bit of experimentation to set the minimum and maximum currents.


Well to be honest, I didn’t expect it all to be so complicated for un commercial samplers like us and I think most would agree.
We are doing this for fun and for everyone to share their sampled instruments for free so maybe it is a bit too much to ask and although it would be nice to have near perfectly sampled pianos, we should just make do with the simple version.
Most of the pianos have come out pretty well considering so maybe just a few tweaks here and there would be fine.

I didn’t expect a full blown sampling gadget to be created lol but it is great that you lot are thinking and trying to work out solutions :slight_smile:


I don’t think it’s the most practical way to go about it, but it’s a really interesting engineering problem and would certainly be a fun build. But it would take many (wo)man hours and in the end the gadget would probably slow down the recording process rather than simplifying it. So it would only “make sense” for samples with more than 10 velocity layers, and those will probably be too large for the pianobook servers. More practical, again, would be the recording of one or two extra velocity layers (and a possible software application that helps to coordinate and attune them, but that’s a different story).

With all that said: It would just be fun, and I’m itching for my soldering iron.


I was thinking of only a few velocity layers, and the idea was to provide a practical solution to recording consistent levels given the graded action. I’m happy to build a simple prototype and go from there.

(I included details of the workflow because I’ve seen too many designs think about that afterwards!)


OK. The first solenoid sample arrived just now from China. Bigger than I expected, and there’s a spring in one direction, but in the other the core just falls out. There’s a thread in the core for an M3 bolt, but this seems to make a clicking sound when the spring pulls it to the rest position, and there’s also some noise as the thread rubs on the hole. I’m thinking of trying a nylon bolt and a soft washer next.

I’m considering putting the gathered information into my Github as I proceed, but I know that the main Pianobook samples are shared on Dropbox. Is there any forum rule about where to store external files?


@synthesizerwriter I’m not very engineer minded but what about the solenoid from a car’s central locking. I suppose that would make some noise too.


What I’m going to do is get several solenoids, then see how quiet I can make them. The one I currently have is a general purpose industrial version that you find in all sorts of industrial control situations: pinball/slot machines, production lines in factories, car doors, etc.

My preference would be to try and make the solenoid as quiet as possible, rather than try and remove it from the recorded sample via processing in RX7 et al!

Of course, the noise of the solenoid itself could be an interesting percussive sound as well!