Skip to main content

MIDI implementation

Meiji Sampler’s MIDI surface covers control mapping, a live monitor, and optional transport response.

Control identification

Each MIDI control is uniquely identified by three properties:
PropertyRangeDescription
Channel1-16MIDI channel
Message typeCC or NoteControlChange or NoteOn
Number0-127CC number or note number
A CC on channel 1 number 60 and a Note on channel 1 number 60 are treated as two separate controls.

Mapping behavior

Mappings are one-to-one in both directions:
  • One control maps to at most one action.
  • One action maps to at most one control.
When you move a control that already has a mapping, MIDI Learn returns to the Listening list, selects that mapping row, and briefly shows already mapped. Press Enter on the selected row to edit that control’s assignment. When you pick an action that is already mapped to a different control, MIDI Learn also selects the existing mapping row instead of replacing it. Mappings are persisted in the settings file and survive app restarts. After assigning a trigger action, MIDI Learn preselects the next matching trigger target for the next unmapped control:
Last assigned actionNext preselected action
Pad N triggerPad N+1 trigger
Loop N triggerLoop N+1 trigger
Scene N triggerScene N+1 trigger
Pad X Chop N triggerPad X Chop N+1 trigger
Pad, loop, scene, and chop indices stop at the final display slot, 0. Non-trigger actions keep the exact last assigned action as the next preselected action.

Mappable actions

Transport

ActionDescription
Play/StopFollow the focused row’s Space behavior. Pads stops pad or preview audio first, Loops starts cued or armed transport unless loops are already playing, and Scenes uses the selected scene’s play/cue/stop flow.
Record/OverdubToggle recording or punch into overdub on the currently selected loop slot.

Pads

ActionDescription
Pad 1-0Trigger the pad sample and select the channel. If no sample is assigned, the channel is selected but no source-selection modal opens.
Pad N Chop 1-0Trigger a specific chop slice on the pad. Enters chop mode and plays from the chop marker.
Pad slots use display numbering 1-9 then 0 (matching the keyboard number row).

Loops

ActionDescription
Loop 1-0 TriggerSame behavior as pressing the slot’s number key on the loops row. Empty slots arm, idle stopped slots cue, idle cued slots stop, playing slots queue STOP+, and STOP+ slots stop immediately.
Loop 1-0 MuteToggle mute on the loop slot. If any layers are muted, unmutes all first.
Loop 1-0 SoloToggle solo on the loop slot. If already soloed, un-solos all.
Loop 1-0 UndoUndo the most recent loop edit. Note: undo is global, not scoped to the targeted slot. The slot number controls which slot gets UI focus.
Loop 1-0 ClearClear all recorded content from the loop slot.

Scenes

ActionDescription
Scene 1-0 TriggerActivate the scene (same behavior as pressing the slot’s number key on the scenes row).
Scene 1-0 CueCue the scene using the Space-style scene behavior.
Scene StopStop the currently active scene. If a stop is already queued, executes immediately.

Mixer

ActionDescription
Channel 1-0 MuteToggle mute on a mixer channel.

Keypress

ActionDescription
KeypressReplay one captured keyboard key through the normal app key handler. Supported keys include printable characters, Enter, Space, Tab, Backspace, Delete, Insert, arrows, Home, End, PageUp, PageDown, and function keys F1 through F24. Esc is reserved for cancel during capture. Modifier combinations are not supported in this version.

PerformFX

These actions are available when the PerformFX feature is enabled.
ActionDescription
FX Slot [1] through [9], [0]Trigger the fixed PerformFX slot at the given position.
Bank ToggleSwitch between PerformFX banks.
Kill All FXKill all active PerformFX effects.

MIDI learn flow phases

The learn flow uses these phases and capture states:
PhaseWhat happens
ListeningWaiting for a MIDI control movement. Shows existing mappings.
AssigningHierarchical menu for choosing an action. Navigate with Up/Down/Enter/Esc. Re-trigger the same MIDI control to select the highlighted row without touching the keyboard.
Keypress CaptureInside Assigning, the Keypress category captures the next supported physical key. Esc cancels capture and returns to the category menu.
Editing BehaviorAfter a CC leaf action is picked for a Gate-eligible target (Loop slot, Channel Mute, Transport, Scene slot), choose Trigger or Gate, threshold, and invert. Enter saves, Esc returns to Assigning. One-shot CC targets (Pad, Cue, Kill All, etc.), Note triggers, and Keypress mappings skip this step and commit directly with the default behavior. Press B on any existing mapping in the Listening list to edit its behavior later.

Trigger behavior

Each mapping carries a Behavior that decides how the control’s value drives the action.
BehaviorFires action
TriggerOnce, on the rising edge above threshold (or falling edge if inverted). Default for Pad, PadChop, Scene Cue, Scene Stop, Loop Mute/Solo/Undo/Clear, Record/Overdub, Bank Toggle, Kill All, Keypress.
GateAction’s “on” variant on rising edge above threshold, “off” variant on falling edge. Default for CC mapped to Loop slot (play/stop), Channel Mute (unmute/mute), Transport (play/stop), Scene slot (start/stop).
Both behaviors carry a threshold (1-127, default 64) and an inverted flag (default false).
  • Note triggers always use Trigger { threshold: 1 } — note-on with velocity 0 is filtered as Note Off, so any note event is a rising edge.
  • CC value 0 is forwarded to the app (it is the falling-edge signal for Gate). Gate mappings will not act on a Recording / Armed loop slot to protect takes in progress.
  • Mappings loaded from configs saved before this version load with Trigger { threshold: 1 } so existing projects keep their prior behavior.

MIDI tab shortcuts

Mappings sub-view (Listening phase)

KeyAction
Up and DownNavigate mapping list
EnterEdit selected mapping
BEdit the selected mapping’s behavior (Trigger/Gate, threshold, invert)
Delete or BackspaceRemove selected mapping
EscLeave MIDI tab

Mappings sub-view (Assigning phase)

KeyAction
Up and DownNavigate menu
EnterDrill into category or confirm action
Same MIDI controlDrill into the highlighted row or confirm the highlighted leaf action
EscGo up one menu level, or return to Listening from the top level
Delete or BackspaceRemove this control’s mapping and return to Listening
Shift+DeleteClear all mappings and return to Listening

Mappings sub-view (Keypress capture)

KeyAction
Supported keyAssign that keypress to the detected MIDI control
EscCancel key capture and return to the category menu

Mappings sub-view (Editing Behavior step)

KeyAction
Up and DownMove focus between Mode / Threshold / Invert rows
Left and RightAdjust the focused field (toggle Gate/Trigger on Mode row; ±1 threshold on Threshold row; flip Invert on Invert row). Hold Shift for ±10 on Threshold.
G / TSwitch directly to Gate / Trigger mode
IToggle Invert
EnterSave the mapping and return to Listening
EscBack: return to Assigning (new mapping) or Listening (editing existing)

Sub-tab navigation

KeyAction
Left and RightSwitch between Mappings and Monitor sub-views

MIDI transport

The settings include a transport_enabled toggle. When disabled, transport messages are visible in the monitor but do not trigger transport behavior.

Monitor coverage

The MIDI monitor displays all incoming MIDI events, not just mapping-eligible ones. Visible message types:
  • Note Off, Note On, Poly Pressure
  • Control Change, Program Change, Channel Pressure, Pitch Bend
  • Clock, Start, Stop, Continue
  • Active Sensing, SysEx, Unknown
Clock and Active Sensing generate high message volume and can flood the display. Use monitor filters to suppress them unless diagnosing a sync problem.

Route allowlist

MIDI mappings use two route rules:
  • Keypress mappings replay the captured key through the normal key handler after the MIDI control is resolved. They work anywhere the same keyboard key would work, including the Trim/chop editor and other focused modal or view states. The MIDI Mapping assignment page still blocks mapped-controller actions while it is learning a control.
  • Direct app-action mappings use a conservative allowlist so pad, loop, scene, transport, and mixer actions cannot silently dismiss stateful UI.
The direct-action allowlist is:
RouteDirect-action MIDI allowedReason
Pads rowyesmain sampler view
Loops rowyesmain sampler view
Scenes rowyesmain sampler view
Channel Detailyeschannel overlay — no unsaved state
Channel Chopyeschop overlay — no unsaved state
Help overlayyesread-only; note that pad actions dismiss Help
All other modalsnostateful UI could be silently dismissed
All other viewsnostateful UI could be silently dismissed
New modal or view variants added to the codebase are blocked by default. New Channel variants require an explicit allow or block decision at compile time.
If a direct app-action mapping does nothing, check whether the current view is on this allowlist. If a keypress mapping does nothing, verify that the same physical key works in the current UI state. See MIDI And Sync Problems for more.

Current caution

The public marketing copy still describes MIDI controller support as emerging. Use this page as the implementation reference, not as a promise of broader DAW-style MIDI coverage.