How Stretchwise builds a stretch curve
A piano string's partials run sharp of whole-number multiples, by an amount set by the string's inharmonicity. Octaves and other intervals are tuned by matching partials, so a piano tuned to them sits flat in the bass and sharp in the treble compared with equal temperament. That offset is the stretch curve. Stretchwise builds it from your piano's own measurements.
1. It measures inharmonicity as you tune
There's no separate measuring pass. Each time a note settles on the meter, Stretchwise saves its pitch and its inharmonicity to the selected piano. It works out inharmonicity by fitting up to six partials of the note to the stiff-string model fn = n·f0·√(1 + B·n²). Readings whose inharmonicity is implausibly low for that part of the keyboard are rejected.
- From C5 upward, pitch comes from the fundamental alone and no inharmonicity is saved. There are too few reliable partials up there, so the treble is always estimated from lower notes.
- Before you've measured anything, Stretchwise uses a typical piano's inharmonicity, so there's a sensible curve from the first note.
- One measured note is enough to rescale that typical profile to your piano. Each further note refines it.
- During a pitch raise, pitch readings aren't saved but inharmonicity is, so the fine-tuning pass already uses this piano's curve.
2. It fills in the rest of the keyboard
Between two measured notes, inharmonicity is interpolated on a log scale. Beyond the lowest and highest measured notes, the typical profile is scaled to match the nearest measurement. A TuneLab .tun file's inharmonicity readings can seed the curve too (see moving from TuneLab).
3. It balances intervals across the piano
The curve uses three-part tuning, as TuneLab does. It chooses the interval to make beatless at the bottom of the bass, uses a 4:2 octave from A3 to A4, and chooses a treble interval at the top. It blends smoothly between the three and fixes A4 to the reference pitch. Choose the balance under Tuning settings → Stretch → Style:
| Style | Bass | Treble |
|---|---|---|
| Clean spinets and small grands | 4:2 octaves | 2:1 octaves |
| Average (default) most pianos | 8:4 octaves | 4:1 double octaves |
| Expanded concert grands | 8:4 octaves | 4:2 octaves |
All three use a 4:2 octave from A3 to A4.
Targets are for each note's sounding first partial. If the piano had no inharmonicity at all, the result would be exactly equal temperament. Setting the target to No stretch in the same section gives you plain equal temperament.
4. Temperament, corrections and reference pitch go on top
The target on the meter is the stretch curve plus the temperament's offset for that note, plus any per-note correction, all relative to your reference pitch (A392 to A497). A historical temperament keeps A at the reference. Corrections move in half-cent steps up to ±50 cents, for one note or for that note and its octaves.
What you can see
The piano's Overview has a Curve and inharmonicity section with two charts:
- Target curve: the stretch (dashed), the full target with temperament and corrections (line) and your saved readings (dots).
- Inharmonicity: this piano's measured values against a typical piano, on a log scale.
How it has been checked
Against TuneLab. Stretchwise's curves were compared with those in TuneLab's seven published sample tuning files, all using TuneLab's 8:4 / 4:2 / 4:1 setting:
| Sample file | rms difference | Largest difference |
|---|---|---|
| Average | 1.00 cents | 2.93 cents |
| Baldwin E | 1.69 | 4.03 |
| Baldwin R | 1.46 | 3.69 |
| Mason & Hamlin A | 1.24 | 4.73 |
| Petrof II | 0.97 | 3.18 |
| Steinway A | 1.45 | 5.00 |
| Steinway D | 0.92 | 2.12 |
Most of the remaining difference is probably in how inharmonicity is filled in between measured notes. TuneLab doesn't publish that part of its method.
Against recordings. Public recordings of one Steinway grand (University of Iowa collection) are part of the app's regression tests. Each note's measured pitch must stay within 3.5 cents of an independent reference. Against that piano's actual tuning, the Expanded style comes within 1.61 cents rms and Average within 1.71. The same recordings mixed with noise show where readings start to fail. At 20 dB signal-to-noise, 6 to 29% of notes are missed, and most are missed within 10 dB.
Not yet checked: real pianos in the field, and live microphone conditions. The recordings are one piano, and the treble has few partials in them. Playing louder also raises the reading slightly: A4 reads about 3 cents higher at ff than at pp. Until technicians have used it on real pianos, check notes you know well and use per-note corrections where your ear disagrees. If you're a technician and would like to help test it, see Testing.