Command line
The options of the standalone player and of the offline renderer, for playing, testing and rendering MIDI files to WAV.
unsampled-piano — the player
unsampled-piano [options]
| Option | What it does |
|---|---|
--ui |
open the interface window (every parameter, presets, MIDI learn) |
--preset <file> |
preset (TOML): an instrument replaces the last sound, a listening or touch preset is laid over it — watched and reloaded when edited |
--presets <folder> |
the interface’s preset folder, where Save writes (default: the preset’s folder, else ./presets, else presets in the configuration folder); the shipped presets are listed after it |
--list |
list audio devices and MIDI ports, then exit |
--midi <name> |
MIDI input port: a substring of its name (default: the first hardware port) |
--host <backend> |
node (Linux default: a PipeWire/JACK graph node with MIDI in and out), or a plain audio host without MIDI ports: pipewire, jack, alsa, wasapi (Windows default), asio, coreaudio (macOS default) |
--device <name> |
audio output: a substring of the device, or of the playback ports (node) |
--buffer <frames> |
buffer size (node: requested graph period); default 256 |
--output-channel <n> |
first channel of the stereo pair on a multichannel interface (from 1) |
--gain-db <dB> |
the player’s own gain, on top of the instrument’s output gain (default 0) |
--name <name> |
name of the graph node (default unsampled-piano) |
--midi-out <name> |
connect the MIDI mirror output to inputs whose name contains this (node) |
--midi-channel <n> |
listen to this MIDI channel only (1–16; default: every channel) |
--invert-sustain |
the keyboard’s sustain pedal works the other way round (sounds held when it is up) |
--threads <n> |
threads computing the voices and the soundboard (default 1, the audio thread alone); the sound is the same whatever the number |
--quality <level> |
CPU quality: overkill (no shortcut, the reference), full (default), balanced or light — see Audio and MIDI |
--full-rate |
above 48 kHz, compute the piano at the output’s rate instead of at 44.1/48 kHz upsampled |
--mcp [addr] |
serve the instrument to AI assistants (MCP over HTTP) on this address, 127.0.0.1:7426 without one; the endpoint is http://addr/mcp. No authentication: any program that can reach the address can change the sound, so keep it on 127.0.0.1 |
--file <files…> |
play standard MIDI files one after the other (the keyboard is then listened to only if --midi is given too) |
--from <s> |
start the first file at this time |
--demo |
play a short built-in sequence instead of listening to MIDI |
Anything you always pass can go in play.toml.
# Linux: low latency, the interface, a preset you are voicing in an editor
unsampled-piano --buffer 128 --ui --preset my_grand.toml
# play a MIDI file through the concert microphones
unsampled-piano --preset presets/listening/Microphones/concert.toml --file etude.mid
# let an AI assistant (here Claude Code) change the sound while you play
unsampled-piano --ui --mcp
claude mcp add --transport http unsampled-piano http://127.0.0.1:7426/mcp
The MCP server gives an assistant five tools: list_params, get (a parameter, with what it
changes on the piano and how the model does it), set, load_preset (an instrument, keeping the
listening set-up, or a listening preset, keeping the instrument) and status. Live parameters
apply at once; the others rebuild the instrument in the background without cutting the notes.
unsampled-piano-render — offline rendering
Deterministic MIDI → stereo WAV, faster than real time, bit-identical from run to run. Useful to compare settings, render a piece, or check a change. It is not in the downloads: build it from the source (below).
unsampled-piano-render [--preset <file>] [--listening <file>…] [--quality full] [--sr 48000] [--block 128] [--tail 3] <command>
--listening lays listening or touch presets over the instrument, in order
(--listening presets/listening/Room/studio.toml --listening presets/touch/disklavier_playback.toml).
--quality takes the same levels as the player; --tail is the time rendered after the last
event, in seconds.
| Command | What it renders |
|---|---|
midi <in.mid> <out.wav> |
a standard MIDI file, all tracks and channels merged |
note <out.wav> --note 60 --velocity 100 --hold 4 |
one note, held for hold seconds |
sweep <out.wav> --velocity 90 --step 0.5 [--sustain] |
every key from A0 to C8, optionally with the pedal down |
dump-preset <out.toml> |
not a sound: the full preset, every parameter — the default instrument’s, or the one --preset and --listening make |
From the source tree, both are cargo run --release -p piano-play -- and
cargo run --release -p piano-render --.