Digital harpsichord
A portable harpsichord, a Raspberry Pi 5 running Pianoteq, played from a Novation keyboard.
Nearly every digital piano has a sampled harpsichord, and nearly all of them sound harsh and lack the sonorous qualities we expect from a real harpsichord. Basic settings such as registers and tuning are either missing or buried in menus.
I wanted a harpsichord I could take to rehearsals, lessons and small concerts, with those basics one touch away:
- Registers: the two 8′ registers, the 4′ and the buff stop, each on its own pad.
- Temperament: meantone or equal temperament, instantly.
- Lid: open or closed, which helps when playing with singers.
- Pitch: the A knob tunes it to an orchestra or another keyboard.
Hardware
- Computer: a Raspberry Pi 5 in HiFiBerry’s steel case. Pianoteq starts when it boots, and once set up it runs offline.
- Sound: a HiFiBerry DAC2 Pro sound board, cabled to a Marshall Kilburn III, which sounds good. Any portable speaker with a 3.5 mm input will do, and the cable keeps the full quality. Bluetooth would add a delay you can feel between key and sound.
- Keyboard: a Novation Launchkey 88 MK3. 88 keys aren’t required, but a 61-key keyboard runs C to C instead of the harpsichord’s FF to f3, which is frustrating for a harpsichordist. The version in the article used a 61-key Nektar Impact LX61+.
- Power: a USB-C supply, or a 20,000 mAh power bank away from a socket.
How the sound is made
The sound comes from Modartt’s Pianoteq, which models the instrument instead of playing recordings. Its KIViR collection of historical instruments includes harpsichords after Hans Ruckers II (c. 1624), Carlo Grimaldi (1697) and François Étienne Blanchet (1733). Modartt’s modelled organ, Organteq, needs more computing power than the Pi 5 has.
What is physical modelling?
Physical modelling computes an instrument’s sound from a mathematical model of how it works. Nearly every digital piano is sampled instead: each note is a recording of a real instrument, picked by pitch and by how hard the key is struck.
A modelled harpsichord is described by its parts: the strings’ length, diameter, tension and material, the plectrum’s stiffness and plucking point, the soundboard’s shape and wood, and the resonance of the case. When a key goes down, the computer works out what happens, as it happens: the plectrum plucks the string, the string drives the soundboard through the bridge, the case radiates the sound, and virtual microphones pick it up. The registers, the tuning and the lid are settings of the model, so changing any of them takes effect at once.
Controls
A Pianoteq MIDI mapping turns each control on the keyboard into a harpsichord setting.
- Instruments: the nine buttons under the faders load the Ruckers, Grimaldi and Blanchet harpsichords, a Neupert clavichord, the Schantz, Schmidt and Graf fortepianos, and the Pleyel and Bechstein pianos. The Ruckers, Grimaldi and clavichord are at A = 415 Hz in ¼-comma meantone, the Blanchet at 392 Hz.
- Registers: four pads switch the lower 8′, upper 8′, 4′ and buff stop. On the Ruckers, the three lowest keys switch the registers too.
- Pitch: a knob sets A from 388 to 451.5 Hz in half-hertz steps, so 392, 415, 430 and 440 Hz are all exact.
- Temperament: a second knob steps through ¼-, ⅕- and ⅙-comma meantone, Werckmeister III and equal temperament.
- Faders: plucking brightness, dynamics, jack noise, lid, reverb and volume, and three more for blooming, the lower 8′’s level and the soundboard’s impedance.
The lights matter as much as the controls. The lit button shows which instrument is loaded, and the lit pads show which registers are on, so one glance tells me how it is set.
What players say
Conservatory teachers and students tried the first version, and several called it the best-sounding digital instrument they had heard. They also said it can’t be used to build technique. The keyboard is the reason: no MIDI keyboard plucks at a fixed point in the key’s travel, the way a harpsichord’s jack does. The search for a better touch led to PHOTON, which makes a real harpsichord the keyboard.
Setting one up
It takes three parts: the Pi, Pianoteq and the keyboard. The guide below covers all three, with every command and setting. The kit has the mapping and presets, an install script for the Pi, the same guide as a README, and a brief to hand to ChatGPT or Claude so it can walk you through the setup.
The step-by-step guide
Configuring the Pi
1. Write the card. Install Raspberry Pi Imager on a computer and put the microSD card in it. In Imager:
- Choose the device, Raspberry Pi 5, and the operating system, Raspberry Pi OS (64-bit): the desktop version, because Pianoteq needs a screen to draw on.
- Choose the microSD card as storage. Check it by its size, and keep Exclude system drives on, so Imager can’t erase the computer’s own disk.
- In the customisation tabs, set a hostname, the time zone, a username and password, and your Wi-Fi network. Under Remote Access, turn on Enable SSH, so you can reach the Pi from a laptop later.
- Write the card and wait until Imager says it is done.
2. Assemble and start it. Seat the DAC2 Pro on the Pi’s 40-pin header, close the case, and put the card in. Start the Pi once with a screen, mouse and keyboard. Mine found the DAC2 Pro by itself, with no change to its configuration.
3. Install Pianoteq. Download Pianoteq for Linux from your Modartt account, copy it to the Pi, and unpack it on the desktop. The free trial is enough to try it. The kit’s install.sh does this step and the next, and the mapping and presets too: ./install.sh pianoteq_setup_v930.tar.xz KIViR.ptq.
cd ~/Desktop
tar -xJf ~/pianoteq_setup_v930.tar.xz
4. Start Pianoteq at boot. A small script and an autostart entry do it. This needs the desktop to log in by itself, as mine does; if yours doesn’t, turn on auto login in Raspberry Pi Configuration.
mkdir -p ~/bin ~/.config/autostart
cat > ~/bin/start-pqt.sh <<'EOF'
#!/usr/bin/env bash
exec "$HOME/Desktop/Pianoteq 9/arm-64bit/Pianoteq 9" "$@"
EOF
chmod +x ~/bin/start-pqt.sh
cat > ~/.config/autostart/pianoteq.desktop <<EOF
[Desktop Entry]
Type=Application
Name=Pianoteq 9
Exec=$HOME/bin/start-pqt.sh
Terminal=false
StartupNotify=false
EOF
sudo reboot
5. Update Pianoteq later. Download the new Linux version, copy it to the Pi, and swap it for the old folder. Pianoteq keeps its settings, mapping, presets and licence in other folders, so they carry over. When I went from 9.2.2 to 9.3.0, it came back with all of them in place.
cd ~
tar -xJf pianoteq_setup_v930.tar.xz
mv ~/Desktop/"Pianoteq 9" ~/"Pianoteq 9 (old)"
mv "Pianoteq 9" ~/Desktop/
sudo reboot
Configuring Pianoteq
1. Add the historical instruments. Download the free KIViR add-on from Modartt and copy KIViR.ptq into ~/.local/share/Modartt/Pianoteq/Addons/.
2. Choose the audio and MIDI devices. In Options, under Devices, tick Listen to all MIDI inputs. Choose ALSA, and the HiFiBerry as the output; ALSA lists the DAC2 Pro as HiFiBerry DAC+ Pro. Set 48,000 Hz and a 512-sample buffer.
3. Install the mapping and presets. They are in the kit. Its install.sh copies them, or copy them into Pianoteq’s user folder yourself:
cd ~
unzip digital-harpsichord-kit.zip
cp -r digital-harpsichord-kit/pianoteq/MidiMappings digital-harpsichord-kit/pianoteq/Presets ~/.local/share/Modartt/Pianoteq/
4. Choose the mapping. In Options, under MIDI, choose Novation harpsichord as the Global MIDI Mapping. Pianoteq loads it again at every start. Leave the six Controller 10 rows as they are: Pianoteq’s pitch scale bends, so the knob is split into six ranges, and Pianoteq rounds ranges typed into this screen.
Configuring the keyboard
The keyboard’s side is three custom modes, made in Novation’s free Components editor and sent to the Launchkey, which keeps them. Components runs as an app or in Chrome.
1. Open Components. Connect the Launchkey to the computer by USB, open Components, choose the Launchkey, then Custom Modes and Create Custom Mode.
2. Pots. Make a Pots mode. Pot 7 is the A knob and pot 8 the temperament knob, both Control Change on the global channel. In mine, pots 1 to 6 still send CC 21 to 26. CC 21 to 23 also switch registers in the mapping, so I leave those pots alone.
| Pot | CC | Min | Max |
|---|---|---|---|
| 7 | 10 | 0 | 127 |
| 8 | 84 | 0 | 4 |
3. Pads. Make a Pads mode. The right half of the bottom row are the registers, each a Control Change that toggles between 127 and 0, coloured dim white with green as the on colour, so a pad lights when its register is on.
| Pad | Register | CC |
|---|---|---|
| 13 | Lower 8′ | 20 |
| 14 | Upper 8′ | 21 |
| 15 | 4′ | 22 |
| 16 | Buff stop | 67 |
4. Faders and buttons. Make a Faders & Buttons mode. The faders are Control Change on the global channel:
| Fader | Setting | CC | Max |
|---|---|---|---|
| 1 | Plucking brightness | 91 | 127 |
| 2 | Dynamics | 92 | 127 |
| 3 | Blooming | 73 | 127 |
| 4 | Lower 8′ level | 74 | 127 |
| 5 | Soundboard impedance | 75 | 127 |
| 6 | Jack noise | 95 | 100 |
| 7 | Lid | 93 | 127 |
| 8 | Reverb | 94 | 127 |
| 9 | Volume | 7 | 127 |
The buttons are Program Change, coloured dim white with green as the on colour, so the loaded instrument’s button lights. Components counts programs from 0, so its program 0 is Pianoteq’s Program Change 1:
| Button | Instrument | Program |
|---|---|---|
| 1 | Ruckers | 0 |
| 2 | Grimaldi | 2 |
| 3 | Blanchet | 3 |
| 4 | Clavichord | 1 |
| 5 | Schantz | 4 |
| 6 | Schmidt | 5 |
| 7 | Graf | 6 |
| 8 | Pleyel | 7 |
| 9 | Bechstein | 8 |
5. Send them to the keyboard. Send each mode to the Launchkey with Send to Launchkey [MK3], into slot 1.
6. Choose them on the keyboard. Hold Shift and press the first pad under Custom, in the top row for the pots and in the bottom row for the pads.
7. Make them start up with the keyboard. Press the Launchkey’s Settings button and use the up and down arrows to reach Power On Modes. There, press the Custom 1 choice for the pads, the pots and the faders; each lights brightly once chosen. The setting came with Launchkey firmware 1.2, which Components installs.