Docs

Hammer

Voicing, graded felt, weight, shank and strike point — what the hammer gives the string, and how it changes with how hard you play.

Everything a piano note becomes starts with a few milliseconds of contact: a felt-covered hammer, thrown by the key, hits the strings from below, squeezes against them and bounces off. How long it stays, how hard it pushes and how that push rises and falls decide which partials the string receives — the timbre, and how the timbre changes with how hard you play.

Felt is a nonlinear spring

The model follows Stulov’s measured hammers: the felt pushes back with

F = Q0 · [ up + α · d(up)/dt ]

where u is how much it is squeezed (in mm). With p around 4, doubling the compression multiplies the force by sixteen: a hammer thrown twice as fast does not only push twice as hard, its push gets shorter and sharper, and that is what brightens a forte. The second term is the hysteresis α — felt keeps part of the energy instead of springing back — which the contact solver applies in a form that can only remove energy, so the strike is stable whatever the settings.

Hammer felt is not uniform either. It is pressed onto the wooden molding under tension, and its density grows gradually towards the inside. The model adds a second, steeper power law for that inner felt:

F = Q0 · up + Qcore · upcore

with Qcore = core_hardness (2) × Stulov’s Q0 of the key and pcore = core_p (7), the hysteresis acting on the whole. At small compressions the outer felt alone answers; as the hammer goes deeper, the inner term takes over and the felt stiffens continuously:

Felt under the string · middle C

stringouter feltdenser insideforce F(u)0300600N00.50.8compression u (mm)inner felt dominates
Left, enlarged: the string sinks u into the felt, which gets denser towards the inside. Right, the force at C4: the outer felt alone (dashed) gives Q0·up with Q0 = 332.1 N/mmp and p = 4.3; the inner felt (dotted) adds Q_core·u7 with Q_core = 2 × Stulov's Q0, and outweighs the outer felt past 0.5 mm. Played softly the outer felt does most of the work and the tone is round; played harder the inner felt takes over and the tone brightens by degrees. There is no threshold (core_depth_* = 0), so no jump at some dynamic.

Before 0.2.0 the hammer had two layers instead: a hard core reached once the felt was compressed by a depth d. Whether a dynamic sounded bright depended on whether it crossed that threshold, and a tenth of a millimetre of depth turned a dark mezzo-forte into a bright one. Against eight real grands the graded felt scores better, the bass’s mezzo-forte attack above all (docs/felt.md). The two-layer hammer is still there: give core_depth_bass, core_depth_mid and core_depth_treble a depth, and the inner term becomes Qcore·(u − d)pcore, felt only past d (with core_p 2.5 and core_hardness 30, the former hammer).

hardness is the voicing knob a technician has with needles and lacquer: it scales the outer felt’s stiffness on every key (the inner felt keeps Stulov’s, whatever the voicing). The slopes spread it across the keyboard — treble hammers are smaller and harder — on top of Stulov’s own growth of Q0 with the key, and hardness_slope_top hardens the top octave and a half further, as voicers do so that the highest notes ring out:

Felt stiffness Q0

101001000100001·10⁵1·10⁶A0C2C3C4C5C6C7C8N/mm^p
Outer-felt stiffness per key (log scale), default voicing: about sixtyfold from A0 to C6; above C6, hardness_slope_top = 0.2 voices the top hammers much harder, C8 some 600 times C6.

Felt exponent p

3.544.555.5A0C2C3C4C5C6C7C8
How fast the outer felt stiffens as it is squeezed, per key (Stulov: p = 3.7 + 0.015·key, plus p_offset and p_bass). The inner felt's exponent is core_p = 7 on every key.

Weight and shank

A heavier hammer (hammer_mass_scale) stays longer on the strings at the same speed: more energy, a fuller and rounder tone. Light hammers — fortepianos, small uprights — bounce off sooner, for a thinner, quicker attack.

The hammer is not rigid either: its head sits on a wooden shank, about 13 cm long, that bends. In the model shank_share (0.3) of the hammer’s mass is the shank’s, linked to the head by a spring and a dashpot; the head swings against it at shank_freq (300 Hz), damped by shank_loss. A short blow — the treble, about 0.5 ms — is over before the shank follows: it meets the head almost alone. A long one — the bass, 3–4 ms — meets the whole hammer. This gives the top notes their strength: the strings get 4.5 dB more at C8 (ff) and 2 dB less at C4. With the top hammers voiced harder, the top’s attack against the middle’s comes within 1 dB of eight real grands’ (it was 10.6 dB too weak with a rigid hammer, docs/top_level.md).

Strike point

Where the hammer hits matters as much as how. A string struck at a point cannot start the partials that have a still point (a node) there:

Strike point · which partials the hammer feeds

agraffebridgehammerpartial 11234567891011121314151617181920
The hammer strikes at strike_ratio = 0.12 of the string from the agraffe up to C6, moving 0.05 closer to it by C8 (middle C: 0.6091 m long, felt 6.207 mm wide). Partials with a node near the strike point are barely excited — at 0.12, the 8th, which would sound harsh. The felt's width trims the highest partials a little more. Click a bar to see that partial's shape.

Tuning strike_ratio toward the end of the string brightens and thins the tone; further in, it gets rounder. contact_width_scale widens the felt patch touching the string, a gentle low-pass on the highest partials.

The default voicing keeps the outer felt softer than Stulov’s (hardness 0.3) and lets the denser inner felt give the bite at forte — the method and the measurements are in docs/felt.md, docs/middle_highs.md and docs/top_level.md.

In the application

The Hammer page of the Unsampled Piano interface
The Hammer page of the interface, default instrument. Its sketch is drawn from the current settings; hover a parameter to light up the part it acts on, click its name for the help shown below.

Parameters

General

Felt contact width

rebuild
contact_width_scale
0.254default 1log

Width of the felt that touches the string. A wide patch cannot excite very short waves on the string: fewer high harmonics, a softer tone.

in the model

Scales the contact width (8 mm at A0 to 4 mm at C8). Partial k is struck with sin(kπ·x0)·sinc(kπ·w/2L): a spatial low-pass.

Top felt depth (bass)

rebuild
core_depth_bass
03default 0 mm

Two-layer hammer only: thickness of soft felt over a hard core on the lowest hammer (A0). Thicker: it takes a harder stroke to get the bright bite. 0: a graded felt.

in the model

Top-felt depth d (mm) at A0, linear to the middle value at C4. The una corda deepens it.

Top felt depth (middle)

rebuild
core_depth_mid
03default 0 mm

Two-layer hammer only: thickness of soft felt over the core at middle C.

in the model

Depth d (mm) at C4, the joint of the two linear segments (A0–C4, C4–C8).

Top felt depth (treble)

rebuild
core_depth_treble
03default 0 mm

Two-layer hammer only: thickness of soft felt over the core on the highest hammer (C8).

in the model

Depth d (mm) at C8, linear from C4.

Inner felt hardness

rebuild
core_hardness
0100default 2

Hammer felt is denser inside than outside. Played softly, only the soft outer felt is squeezed and the tone is round; played harder, the hammer works into denser felt and the tone brightens. This is how dense the inside is (0: one uniform felt).

in the model

Adds Q_core·(u − d)^p_core to the felt force, with Q_core = core_hardness × Stulov's Q0 of the key (whatever the voicing of the top felt). With d = 0 and p_core above the top felt's exponent, the felt is graded: it stiffens continuously (default 2, p_core 7, docs/felt.md). With d > 0 it is a two-layer hammer whose core is reached past d (docs/presence.md).

Inner felt exponent

rebuild
core_p
1.510default 7

How fast the felt stiffens as it is compressed (graded felt), or how abruptly the core resists (two layers).

in the model

Exponent p_core of the inner term Q_core·(u − d)^p_core.

Hammer mass

rebuild
hammer_mass_scale
0.252default 1log

Weight of the hammers. Light hammers (fortepianos, small uprights) bounce off the strings sooner: a thinner, quicker attack; heavy ones stay longer on the strings and give a fuller, rounder tone.

in the model

Multiplies Stulov's hammer masses (11 g at A0 down to 5.3 g at C8). The contact solver integrates m·x'' = −F, so at a given speed the strike's energy and duration grow with the mass.

Felt hardness

rebuild
hardness
0.022default 0.3log

Voicing: how hard the hammer felt is. Harder felt gives a brighter, more percussive tone, softer felt a rounder, mellower one. Technicians voice a piano by needling or hardening the felt.

in the model

Multiplies the felt stiffness Q0 of every key in F = Q0·u^p (u: felt compression in mm), from Stulov's measured hammers (ICA 2009). The default 0.3 makes the top felt softer than his; the hard core underneath gives the bite at forte (docs/middle_highs.md).

Hardness slope (treble)

rebuild
hardness_slope
-0.050.08default 0.02/key

How quickly the hammers get harder from middle C to the top. Treble hammers are smaller and harder; more slope brightens the upper register.

in the model

Q0 ×= e^(slope·(key − 40)) above C4 (key 40, counting A0 as 1), on top of the growth of Stulov's fit, e^(0.045·key).

Hardness slope (bass)

rebuild
hardness_slope_bass
-0.050.08default 0.02/key

The same, from middle C down to the lowest key. Positive values make the bass hammers softer than the middle ones, negative values harder.

in the model

Q0 ×= e^(slope·(key − 40)) below C4.

Hardness slope (top)

rebuild
hardness_slope_top
00.4default 0.2/key

Extra hardness of the top octave and a half's hammers, which voicers harden so that the highest notes ring out.

in the model

Q0 ×= e^(slope·(key − 64)) above C6, on top of hardness_slope (docs/top_level.md).

Felt hysteresis

rebuild
hysteresis
03default 0.3

Felt does not spring back the way it was squeezed: it keeps some of the energy. More hysteresis gives a rounder tone and a softer rebound.

in the model

Multiplies Stulov's hysteresis time α in F = Q0·[u^p + α·d(u^p)/dt]. The contact solver uses its linearised form, which only removes energy (passive by construction).

Extra felt exponent (bass)

rebuild
p_bass
02default 0

Makes the bass hammers more nonlinear: rounder when played softly, biting when played hard.

in the model

Added to the felt exponent p, growing linearly from 0 at C4 to p_bass at A0.

Felt exponent offset

rebuild
p_offset
-1.51.5default 0

How fast the felt stiffens as it is squeezed, on every key. Higher values widen the gap between the soft and the loud timbre.

in the model

Added to Stulov's exponent p = 3.7 + 0.015·key of the top felt (published values 2–5).

Shank frequency

rebuild
shank_freq
501500default 300 Hzlog

How stiff the shank is: the frequency at which the head swings against it.

in the model

Frequency (Hz) of the head-against-shank mode, k = m_r·(2πf)² with m_r the reduced mass.

Shank loss

rebuild
shank_loss
0.011default 0.1logrange ≈

Damping of the shank's swing.

in the model

Loss factor of the head-against-shank mode (c = loss·m_r·2πf).

Shank share of hammer mass

rebuild
shank_share
00.6default 0.3

The hammer's shank bends. In the treble the short blow meets the hammer head almost alone, which gives the top notes their strength; in the bass the whole hammer follows. Share of the hammer's mass in its shank (0: a rigid hammer).

in the model

The head (1 − share of the mass) is linked to the shank's effective mass by a spring and a dashpot; both start at the hammer speed (docs/top_level.md).

Strike point

rebuild
strike_ratio
0.060.2default 0.12

Where the hammer hits the string, as a share of its length from the tuning-pin end. Near 1/8 it barely excites the 8th partial, which would sound harsh; closer to the end the tone gets brighter and thinner, further in rounder.

in the model

Strike point x0 = ratio·L up to C6, moving 0.05 closer to the agraffe by C8. Partial k is struck with sin(kπ·x0/L) (times the felt-width sinc): partials with a node at the strike point are not excited.