How MIDI 2.0 works in JZZ
masterJZZ supports MIDI 2.0 via the .MIDI2() adapter. Calling .MIDI2() enables MIDI 2.0 mode for subsequent chained calls, while .MIDI1() resets the mode back to MIDI 1.0.
Key Concepts:
- Downstream Nodes: MIDI nodes in a chain do not need special configuration to pass through MIDI 2.0 messages.
- MIDI 1.0 Helpers in MIDI 2.0 mode: When in MIDI 2.0 mode, most MIDI 1.0 helpers require a
groupas an additional first parameter. These produce MIDI 1.0 messages wrapped in UMP packages. - MIDI 2.0 Helpers: Use specific MIDI 2.0 helpers like
.umpNoteOn()for UMP-based messages. - State Management:
.MIDI2()and.MIDI1()clear defaultgroup,channel,SysEx ID, andMPEsettings. - Defaults: Use
.gr(group),.ch(channel), and.sxId(id)to set default values for subsequent calls.
var first = JZZ.Widget();
var second = JZZ.Widget();
first
.send([0x90, 0x3c, 0x7f]) // MIDI 1.0
.MIDI2() // enable MIDI 2.0
.send([0x20, 0x90, 0x3c, 0x7f]) // MIDI 2.0
.MIDI1() // reset to MIDI 1.0