Docs

MIDI & automation

What the piano reads from MIDI, the pedals and their half positions, the MIDI channel and an inverted sustain pedal, MIDI learn, the MIDI mirror output, and host automation in the plugin.

What it reads

Message What it does
Note on throws the hammer; the velocity sets its speed (see the velocity map, and the touch presets)
Note off lets the damper fall; the release velocity sets how fast, so how loud its landing thud is
CC 64 sustain pedal, continuous: half pedal included
CC 66 middle pedal: sostenuto, or the practice mute on an upright preset (mute_felt)
CC 67 soft pedal: una corda on a grand, half blow on an upright, continuous
CC 120, CC 123 all sound off, all notes off
other CCs free for MIDI learn

Events are applied sample-accurately inside the audio buffer — in the standalone player on Linux through its PipeWire/JACK MIDI port, in the plugin at the offsets the host gives, and for MIDI files everywhere — so timing does not depend on the buffer size. With the other audio backends (WASAPI, ASIO, Core Audio, or --host on Linux), the keyboard is read outside the audio graph and its events are played at the start of the next buffer: a smaller buffer then also means tighter timing.

A continuous sustain pedal matters: most of what a pianist does with the right foot is neither up nor down. Keyboards with a continuous pedal (or a half-pedal-capable one) send CC 64 with values between 0 and 127; on/off switches only send 0 and 127.

Channel and pedal polarity (standalone)

The standalone player listens to every MIDI channel by default. --midi-channel <n> (1–16, midi_channel in play.toml, or MIDI channel on the Audio and MIDI page) keeps only one, for a keyboard that sends a split or layers on several channels.

Some keyboards’ sustain pedals work the other way round: the notes ring with the pedal up and stop when it is pressed. --invert-sustain (invert_sustain = true, or Invert the sustain pedal) turns CC 64’s values round. Both apply to the keyboard, not to MIDI files; in the plugin, the host routes the channels.

MIDI learn

Every parameter can be mapped to a controller: click the MIDI cell of its row in the interface, move a knob or fader over part of its travel, done. A controller covers the parameter’s whole range; the MIDI page sets the value at CC 0 and at CC 127, and a map with the first above the second inverts it. Bank select (CC 0 and 32), the three pedal CCs and channel-mode messages (CC 120–127) are never learnt.

  • Mapped live parameters are driven on the audio thread, sample-accurately, with or without the window open.
  • Mapped rebuild parameters start a background rebuild once the controller pauses, without cutting notes.

The map is about your controllers, not the instrument: the standalone player keeps it in midi.toml in the configuration folder, the plugin saves it with the project. In the plugin only the rebuild parameters are learnt: the live ones are host parameters (below), mapped with the host’s own MIDI learn.

MIDI mirror (standalone, Linux)

On Linux the player’s graph node also has a MIDI output that mirrors what it plays. --midi-out <name> (or MIDI mirror on the Audio and MIDI page) connects it to another synthesiser in the graph, to record or layer.

Plugin automation

In the CLAP and VST3 plugin, the live parameters are host parameters: automate them, map them to a control surface, modulate them. Each has a stable id derived from its path (an FNV-1a hash), so automation survives new versions that add parameters. The rest of the instrument — the rebuild parameters — and the learnt controllers are saved in the project’s state; editing them rebuilds the instrument in the background without cutting notes.