MIDI merge

Interleave up to four MIDI streams by time, in input order for equal offsets.

  • MIDI
  • Since 0.2.0
  • midi
  • merge
  • combine
  • interleave

Open in TuneToys

MIDI merge as the Patch draws it, at default values: inlets on the left, outlets on the right.

MIDI merge interleaves up to four MIDI streams by time into one.

What it does#

Messages from in1 to in4 are ordered by their sample offset within the block. When two messages share an offset, the one from the lower-numbered input comes first, so the result is deterministic. Unused inputs are ignored. The node has no parameters.

When to use it#

Use it to let several sources play one instrument, for example an external controller through MIDI in alongside the on-screen Keyboard. A MIDI input takes only one cable, so merge first.

Ports#

PortDirectionSignalLanes
in1InputMIDI16 MIDI channels
in2InputMIDI16 MIDI channels
in3InputMIDI16 MIDI channels
in4InputMIDI16 MIDI channels
midiOutputMIDI16 MIDI channels

Parameters#

This node has no numeric parameters.

Tips#

  • Merge is not a mixer: it keeps every message, including notes that overlap.
  • To tell sources apart downstream, remap each to its own channel with MIDI channel before merging.

See also#

Keyboard, MIDI in, MIDI channel, MIDI.

Help patches

Each help patch is an ordinary Toy that teaches one idea. The diagram shows the Patch; the preview shows its Frame. Open it in TuneToys to play and edit it.

1. Play one instrument from two sources

beginner Teaches: midi

The keyboard and an external input are merged into one instrument.

Patch: Keyboard midi output connected to MIDI merge in1 input. MIDI in midi output connected to MIDI merge in2 input. MIDI merge midi output connected to Polyphonic instrument midi input. Polyphonic instrument audio output connected to Patch outputs audio input.
Connections as text
  • Keyboard midi output connected to MIDI merge in1 input
  • MIDI in midi output connected to MIDI merge in2 input
  • MIDI merge midi output connected to Polyphonic instrument midi input
  • Polyphonic instrument audio output connected to Patch outputs audio input
  • Merge puts the keyboard and the controller on one cable, in time order.
  • On equal timing the lower input number comes first.
Frame preview: Play one instrument from two sourcesFrame “Play one instrument from two sources” with 3 elements: text heading, knob Level, piano Keys.PLAY ONE INSTRUMENT FROM TWO SOURCES0.3Level
Frame preview (static). Controls show their default values.

Open in TuneToys

  • Keyboard Notes from the on-screen piano and computer typing become MIDI. The face of the piano widget.
  • MIDI in A logical MIDI input port. The host binds it to a device or the DAW's MIDI bus; the Toy never stores a device.
  • MIDI channel Pass every channel, keep one channel, or move everything onto one channel.

Edit this page on GitHub

esc

↑ ↓ move↩ open⌘↩ new tabesc close