Simple Piano Emulation

Dr. Manny Fernandez has an interesting series of videos in which he details how he constructed a grand piano emulation using a Yamaha Montage: the building blocks there being 8 independent layers of 8-operator FM synthesis, each layer having access to its own pair of insertion effects and separate send levels for the two system effects.

Even if you aren’t planning to follow his structure or use FM at all, it’s still interesting to see the different elements of a piano’s sound which he picks out for modelling. This includes the inharmonicity of the strings as well as what he affectionately calls “the stuff”: sounds such as the thunks of the hammers. This provides a lot of ideas for ways to expand on a simple piano emulation.

The total run time is ~70 minutes. There’s also an accompanying series of articles.

5 Likes

That’s completely incorrect about pianos. I wonder where you obtained that idea. The trichord set is tuned very precisely in unison to a high degree of accuracy. I speak as a former professional piano tuner and instrument maker. On a piano octaves are always true and beatless, but due to the departure from ideal infinitely thin strings of the relatively thick steel wire in pianos, tuners make the octaves ever so slightly sharp and increasingly so in the upper range, and likewise modify the bass, but it is a very small effect. Find a grand piano, and pluck the individual strings. You will see. And there are no exceptions to this, either now or historically. Harpsichords had registers of single strings at 8 foot, 4 foot, and sometimes 16 foot pitch. A piano is not a harpsichord.

If you have questions about how pianos actually work you are welcome to contact me.

Most pianos are sampled, as the synthesis of the complexity across the compass is overwhelming. There are very successful piano models achieved with Physical Modelling technique, such as Pianoteq. Nearly indistingishable from a sampled instrument. The Sound on Sound article is very simplistic. Nevertheless interesting.

8 Likes

Thanks for this - I will definitely check this out.

Thank you very much for your insight. I have obviously made several mistaken assumptions here. Your advice will help me improve my modelling. I am very grateful for your expertise.

You can use Soundcloud and link it here.

That’s a fairly low bar. Nearly indistinguishable from a recording of the real thing, I’d say, but you’ll probably disagree.

1 Like

OK I figured out how to load it up to Patch Storage so you can hear it for yourselves. Slightly revised version without the hubris.

By no means perfect, this is to my ears at least a good approximation of a piano sound. Most definitely a work in progress.

Polyphonic so chords sound good.

Detuning the High and Low strings by moving the Fine Tuning on the XCOs can approximate an honky-tonk piano, or bar room upright.

Feel free to make improvements and let me know.

2 Likes

A little fiddling and I got a much better sound; Upped the triangle wave on the low string, maxed the sine on the high string, some saw on mid and low, no square on any strings. A tiny bit of attack helps with the hammer action, less on the high string, more on the low string.

The high notes (octave 5 and above) need to be softer and the low notes (octave1+2) need to resonate more - suggestions welcome.

It wouldn’t be simple anymore, but you could always do it the same way a real piano does: each note has its own set of hardware tuned in frequency (and in this case amplitude).

I am working on a version with 88 sets of 3 XCOs, but I need to stabilise this one first. It’s great for the middle range, but sometimes when I come back to it, it sounds different (a quarter tone sharp, even).

1 Like

I had the best results for piano sounds with FM synthesis. My tip would be to take NYSTHI TZ-OP and modulate it with 3 more TZ-OP’s with Ratios 1, 1.5 and 3. Then bathe everything in reverb and you might get pretty close to a piano experience. And if you want to have it velocity sensitive modulating the FM offers some good options to make it dynamic.

Try this stoermelder Strip for a start and play a bit with the levels and feedback on the modulators… piano starter.vcvss (13.3 KB)

1 Like

This is great - I will definitely have a play with this :slight_smile:

Here’s mine (I can’t work out how to embed a sound file). Simple Piano Emulation.vcv (31.6 KB)

Link to SoundCloud audio test file (I’m not a piano player).

Screenslave · Piano Test

Could it have been conflated with this business from Piano - Wikipedia ? …

All else being equal, longer pianos with longer strings have larger, richer sound and lower inharmonicity of the strings. Inharmonicity is the degree to which the frequencies of overtones (known as partials or harmonics) sound sharp relative to whole multiples of the fundamental frequency. This results from the piano’s considerable string stiffness; as a struck string decays its harmonics vibrate, not from their termination, but from a point very slightly toward the center (or more flexible part) of the string. The higher the partial, the further sharp it runs. Pianos with shorter and thicker string (i.e., small pianos with short string scales) have more inharmonicity. The greater the inharmonicity, the more the ear perceives it as harshness of tone.

The inharmonicity of piano strings requires that octaves be stretched, or tuned to a lower octave’s corresponding sharp overtone rather than to a theoretically correct octave. If octaves are not stretched, single octaves sound in tune, but double—and notably triple—octaves are unacceptably narrow. Stretching a small piano’s octaves to match its inherent inharmonicity level creates an imbalance among all the instrument’s intervallic relationships. In a concert grand, however, the octave “stretch” retains harmonic balance, even when aligning treble notes to a harmonic produced from three octaves below. This lets close and widespread octaves sound pure, and produces virtually beatless perfect fifths. This gives the concert grand a brilliant, singing and sustaining tone quality—one of the principal reasons that full-size grands are used in the concert hall. Smaller grands satisfy the space and cost needs of domestic use; as well, they are used in some small teaching studios and smaller performance venues.

Not that I believe that Wikipedia is the final authority on everything, but some version of that may account for “that idea”.

Even so, tuning real strings “slightly out of phase with each other” does not sound possible to me, unless the second and third are struck with very short delays after the first one by two more hammers. Out of tune, yes, but not out of phase.

I started playing with Bacon Music’s “KaprlusStrongPoly” module, and came up with this minimal patch that sounds surprisingly good (considering how few modules it uses).

Let’s see… KarplusStrongPoly module settings (starting from initialized state): Freq = 0 // Packet = NOISYSAW // Filter A= 0.5 (you cannot change the “WGT 1SAM” thing, and according to the author, B and C don’t do anything yet) // Atten = 1.

Cranking A up to 1 makes it twangier, like a harpsichord or spinet.

VCF module settings: Center/cutoff frequency = 126 Hz (or leave it at the default 1 kHz to make it brighter) // MODE - LP (but do try BP for fun) // RES/BW = 0% // SLOPE = 1.5 (but try anywhere from 1 to 2 as well)

BTW - The KaprlusStrongPoly also makes a nice hammered dulcimer / santour / cymbalom sort of thing too, by raising or lowering “A” and reducing Atten. Still working on a Celtic Harp sound.

3 Likes

I added dampening on release and velocity to your patch. Here’s mine:

1 Like

Now I really wish I could find my MIDI interface. I know it’s around here . . . somewhere.

New version here because I’m not done trying to improve this. Basal+Slap x3 for the sound source because the output is softer. Velocity control which kind of works, and reverb which is set to resonate more at lower frequencies. I had a go at using the EQ and it sounds better with it but I don’t know what I’m doing with that really. No video because the VCV recorder module hasn’t appeared yet for v2.0

Set for sustain to work by holding the keys down. It still sounds a bit tinny at the top but the lower sounds have a nice growl.

Yay! I found it! It was an M-Audio “UNO”.

But I was searching for a firewire cable at the time.

1 Like