We make it sound!

Home » Documentation » JZZ.js » MIDI-Thru


Starting from JZZ v.0.3.0, all MIDI nodes, including MIDI-In and MIDI-Out share the same API.

All MIDI nodes can stand on either side of the connect() and disconnect() functions, and/or receive MIDI messages via the send() and various helpers.

NOTE: The node connected after the MIDI-Out port, will most likely receive nothing, since, by default, MIDI-Out will consume the messages sent to it;

Messages sent to the MIDI-In port will appear unchanged on its other end.

However, this default behavior can be changed by redefining the object's _receive() function.

Creating MIDI nodes

JZZ.Widget(arg) - create a new MIDI node (widget).

Works with or without the new keyword.

If arg is a not empty object, its properties will be copied to the new node.

Possible properties:


var logger = JZZ.Widget();
logger._receive = function(msg) { console.log(msg.toString()); };

// or

var logger = JZZ.Widget({ _receive: function(msg) {

// ...



_emit(msg), emit(msg) - send MIDI event to the descendant nodes; _emit(msg) is synchronous, emit(msg) - asynchronous.

These functions are most often used by gadgets emulating MIDI-In devices.


var delay = JZZ.Widget();
delay._receive = function(msg) { this.wait(500).emit(msg); };

Other calls

or(), and(), wait()

See also