HarpsichordString is a physically modelled harpsichord. Instead of playing back recordings it calculates the sound of a plucked string from its physical properties: length, wire material and gauge, where along the string it is plucked, what the plectrum is made of, and how the soundboard and case respond. Change a number and the sound changes the way it would on a real instrument.
The goal is a complete instrument with one string per key, all strings sharing one soundboard. The project consists of a JUCE-free C++ engine and a workbench app where you design and listen to the strings. The same engine is used by Microtuner, which has a STRINGS section that plays these instruments and retunes the strings live.
Work in progress. The sound has been fitted to recordings of a real harpsichord with numbers, but the final judge is the ear, and the fine tuning by listening has only just started.
These samples are rendered directly by the model, with the Flemish single instrument (see below), a raven quill plectrum and the soundboard coupled to the strings. Nothing is added except a level adjustment and a short fade-out. The pitch is A4 = 415 Hz, so the notes are a semitone below modern pitch. The sound is not tuned by ear yet, so take it as a status report, not a finished instrument.
A short phrase: an arpeggio and a chord
Single notes across the compass
C2, the bass: brass string, 1.7 m long
C3
C4: steel string, 0.75 m long
C5
Each string is described by a set of parameters and from them the engine builds the sound as a sum of decaying sinusoids, the partials of the string, plus the noise of the pluck.
The Key tab holds the parameters of the selected key. The slider at the top selects the key.
The values come from the rules for the whole instrument (see below) until you change one. A changed value is pinned to the key, the label turns orange, and the small x button hands it back to the rules. A button also finds the length where the string is at 75 % of its break stress.
Every change is calculated again at once (with Replay on change checked the key is played as well). Three plots show what the model made of it:
Below the plots a read-out lists tension, stress as a percentage of break stress, inharmonicity B, pluck force and deflection, bridge mobility and the lowest board mode. Warnings, for example a string too close to breaking, are shown in red.
An instrument is a shared soundboard, voicing and a set of rules that give every key its default string, plus a few per-key overrides. The Rules tab sets:
Change a rule once and every key follows. Overrides keep individual keys fixed. The instrument is saved as a plain JSON file.
Everything shared by all strings:
The All keys tab is a table of every key in the instrument: frequency, string length, gauge, material, tension, stress, inharmonicity and decay time of the fundamental. Orange rows are keys pinned by an override, a red exclamation mark is a warning. Click a row to select the key. The table is the quickest way to see whether a scale is even: tension should be about the same on every string and stay well under the break stress.
For playing, all sounding strings are rendered sample by sample through one shared soundboard. The lowest 64 board modes (up to about 1.5 kHz) are simulated as resonators that the strings push their force into. The modes go on ringing after the strings are damped, and the motion of the board drives the strings back. The workbench has a Board model selector to compare three ways by ear:
A chord of 16 notes uses about 30 % of one processor core.
The model has been compared with sampled recordings (44 keys, 24 bit) of a real harpsichord, using the same analysis code on the recording and on the model. Things that were measured and fitted:
The result is that partial levels agree within a few dB and decay times within 0.9–1.2 times per octave. The known differences are written down too: the model is louder in the first 100 ms relative to the sustain, and the recorded instrument's own soundboard resonances are not modelled.
The target is a single-manual Flemish harpsichord, built up step by step. The instrument file Flemish single has a compass of GG to e''' (58 keys) at A4 = 415 Hz and a raven quill plectrum. String lengths, from 1.7 metres in the bass to 0.2 metres at the top, and the pluck positions are read from a plan of a historic instrument. The wire gauges follow the table in Hubbard's Three Centuries of Harpsichord Making, with brass in the bass and steel above. The scale comes out even: 50–80 N of tension on every string, 50–82 % of break stress on the brass and 20–58 % on the steel.
The soundboard, ribs and bridge are still generic, since there are no measurements for them yet.
Questions or comments? Send an e-mail to: thomas@ahlstroem.net