MathStruct · Instruments

Modelled,
not sampled.

Instruments are free software instruments for your computer that compute their sound while you play — the hammers, strings and dampers of a real piano, rather than recordings of it. They respond to your touch and your pedal like the instrument they are modelled on. The piano comes first.

  • Free & open source
  • Windows · macOS · Linux
  • Piano in development
hold to sustain · release to damp
One key, one hammer, two strings — simulated live in your browser. Press and hold to play; let go and the damper stops the string.
Listen

The piano, as it sounds today.

Played by the plugin from the score, no recorded piano in it. Work in progress: refreshed whenever the sound improves.

  • Rendered by the plugin · 1:34

    Satie — Gymnopédie No. 1

    Slow, quiet chords: listen to how each one fades.

  • Rendered by the plugin · 1:34

    Chopin — Prelude in E minor, Op. 28 No. 4

    A soft melody over repeated left-hand chords, with the pedal.

More pieces on the piano page →

The difference

A recording plays back. An instrument responds.

Most software pianos are sample libraries: a recording of every key, chosen and played back as you press it. These instruments are modelled instead — a description of the real thing, computed note by note. What that changes:

A sample libraryInstruments
Where the sound comes fromRecordings of every note, played backStrings, hammers and dampers, computed while you play
Between two notesA jump from one recording to the nextOne instrument: the strings still ring when the next key falls
The pedalA second set of recordings, if anyThe dampers really lift; every released note keeps ringing
Shaping the soundFixed at the recording sessionTuning, sustain and — soon — touch and tone, all real physics
Download sizeOften many gigabytesA few megabytes
The line-up

Five instruments, one at a time.

Each instrument is built the same way, and the next one starts when the one before it is ready to play. The roadmap shows where each one stands.

How it is made

From a real instrument to your computer.

Four steps for every instrument. The details — the physics, the code, the tests — are on the pipeline page and in the documentation.

  1. 01 · Record

    A real instrument, measured

    Recordings of a real instrument, note by note and from soft to loud, are analysed: which overtones each note has, how long each one rings.

  2. 02 · Fit

    A model learns to match it

    A physical model of the instrument is adjusted until it sounds like those recordings, across the whole keyboard.

  3. 03 · Check

    Two programs, one answer

    The fitted model is saved in one file. The research program and the plugin must compute the same sound from it, and a test proves they do.

  4. 04 · Play

    In your music program

    The plugin computes the sound in real time, all 88 keys at once if you like, without dropouts.

Get it

MathStruct Piano — coming soon

Downloads for Windows, macOS and Linux will be on the piano page, with simple install steps for each. Until then you can listen to it, and follow along on GitHub.