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
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#
| Port | Direction | Signal | Lanes |
|---|---|---|---|
in1 | Input | MIDI | 16 MIDI channels |
in2 | Input | MIDI | 16 MIDI channels |
in3 | Input | MIDI | 16 MIDI channels |
in4 | Input | MIDI | 16 MIDI channels |
midi | Output | MIDI | 16 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.
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.
Related nodes
- 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.