MIDI / OSC Monitor ~ see every message, its rate and its timing

Something sends MIDI or OSC, something else should react, and nothing happens. Or it reacts sluggishly. This patch shows what actually arrives: every message, its rate and how evenly it comes in.

It watches all MIDI inputs (or one) and an OSC UDP port (default 9000) side by side.

MIDI / OSC Monitor showing a live MIDI and OSC message log with rate, interval and jitter statistics

Download

Download the patch (zip) with midi-osc-monitor.maxpat, midi-osc-monitor.js and LICENSE. Keep both in the same folder and open the .maxpat in Max 9. The statistics run in a [v8] object, which arrived with Max 9.

What it shows

  • Log: the newest 24 messages, decoded, with raw MIDI bytes or OSC type tags and arguments. It can be frozen, filtered by channel or text, and exported as CSV.
  • Rate: messages per second, with a graph of the last 24 seconds.
  • Bytes: for MIDI the share of a 5-pin DIN cable (31,250 baud, 3,125 bytes/s). For OSC an estimate of the payload, without bundle and network overhead.
  • Interval / jitter: last, min, mean and max time between messages, plus the standard deviation of the last 256 intervals.
  • Burst: messages arriving within 10 ms, for example a device sending all values at once.
  • Dup: messages repeating the previous value on the same controller or address.
  • MIDI only: running status, errors (stray data bytes, cut-off messages, SysEx without end byte), held notes and the BPM of incoming MIDI clock.
  • Busiest keys: the top 7 controllers, notes and OSC addresses by rate.

In the log, d is the time since the previous message from the same source, dk since the previous message on the same key (same CC and channel, or same OSC address).

Good to know

  • Timing: every MIDI byte and OSC message is stamped with cpuclock on arrival, before the JavaScript sees it. Turn on Overdrive so this happens in the high-priority thread.
  • OSC type tags: Max passes plain numbers to JavaScript, so a float with a whole value like 1.0 shows as i.
  • OSC queue: the queue is set to 4096 messages (maxqueuesize). A sender bursting beyond that loses messages before Max sees them.
  • MIDI 1.0 only: Max does not hand MIDI 2.0 packets to patches.

Inside the patch

Leave presentation mode (Cmd+Option+E) to see the objects:

  • xmidiin reads one or all inputs and reports the device per byte.
  • udpreceive reads OSC. [t l b] passes the message on and triggers the timestamp.
  • cpuclock stamps each message before it is queued for [v8 midi-osc-monitor.js].
  • The JavaScript decodes MIDI (running status and SysEx included), keeps the statistics and writes the display text about ten times a second.

License

MIT License, Copyright (c) 2026 AUDIO.OOO. The full text is in the LICENSE file included in the download. See also the MIT license.

in love with audio & MIDI since 1999