Reference

MIDI and other outputs

MIDI pitch policies, pitch-bend and MPE configuration, MIDI input, and Mora's optional OSC, serial, MQTT, Csound, and speech adapters.

MIDI is an output path beside SuperDirt. This reference covers how MIDI output delivers fractional pitches, how to configure pitch bend and MPE, how MIDI input relates to output, and which other optional outputs and inputs Mora provides.

MIDI output

Mora supports ordinary MIDI patterns, fractional pitch policies, tuning, and MPE. MIDI output requires an explicitly selected and configured receiver.

notes can retain fractional pitches. In Mora’s named-pitch convention, bare C is C3/MIDI 48 and C4 is MIDI 60. Tuning is independent of temporal meter and independent of the MIDI receiver’s policy; see pitch, harmony, and tuning.

Pitch policies

The selected output policy determines how the receiver can deliver fractional pitches:

PolicyBehavior
:quantizeRounds and clamps for ordinary MIDI.
:strictDeclines unsupported fractional or out-of-range delivery with diagnostics instead of silently changing the pitch.
:bendUses channel pitch bend. Simultaneous notes on one ordinary MIDI channel share that bend.
MPEAllocates member channels for independent note expression, subject to the configured receiver and capacity.

Plain-channel pitch bend is shared by overlapping notes on that channel; MPE uses member channels for independent note bends. Fractional synthesis pitches are therefore not automatically deliverable as independent polyphonic bends on an ordinary MIDI channel.

Configuring a MIDI output

Channel pitch bend

Common Lisp
(configure-midi 1
                :device "Mora"
                :channel 0
                :pitch-policy :bend
                :bend-range 2)

The device name here denotes a configured virtual output. The receiver’s bend sensitivity must agree with the declared range.

MPE

For an MPE-capable receiver, the explicit configuration is different:

Common Lisp
(configure-midi 1
                :device "Mora"
                :mpe :lower
                :mpe-members 8
                :pitch-policy :bend
                :bend-range 48)

(m1! (notes "[60,64.5,67] [62,65.5,69]"))

In this configuration, :mpe and :mpe-members appear alongside :pitch-policy :bend, with a wider declared :bend-range. Sending MPE setup and SysEx to the device is a separate, explicit action.

MIDI input

MIDI input is separate from output. Mora tracks incoming held-key and MPE state and supports framed SysEx input.

Mapping controls in Studio

In Studio, midi-map and midi-learn connect named inline controls to incoming MIDI. Absolute controls support pickup behavior; relative encoder modes must match the controller’s configured message format.

Registering a mapping is separate from opening the selected input device, which is its own explicit step. Mappings read input; they do not implicitly send controller LED updates, motor updates, or other hardware messages.

Output channels in the MIDI performance API and input-channel numbers in a widget map have different documented conventions. Consult the corresponding signature rather than copying a channel number between them. Inline controls describes the mappings in full.

Cleanup is separate from silence

MIDI has its own cleanup functions. Sound-channel silence, such as assigning (silence) to a channel, is not a blanket hardware panic. See stopping sound.

Other outputs and inputs

Mora includes further output and input families, each with its own backend and setup:

FamilySetup
Generic OSC outputOptional adapter; requires explicit configuration.
Serial outputOptional adapter; requires explicit configuration and a suitable device.
SpeechOptional adapter; requires explicit configuration.
MQTTOptional adapter; inactive until explicitly configured and started.
CsoundOptional adapter; inactive until explicitly configured and started.
Gamepad, motion, and desktop inputsOptional inputs.

These families require explicit configuration and the applicable devices or services. The Studio launcher attempts the configured MIDI connection along with its other optional services; the core language does not depend on any of them.

Source references

Repository-relative paths in the Mora source where these mechanisms are implemented.

  • src/runtime/midi*.lisp
  • src/mini/midi*.lisp

Documentation

Search the documentation

Results update as you type. Use the up and down arrow keys to choose a result and Enter to open it.