Loading...
Searching...
No Matches
Ui::MidiDisplay Namespace Reference

MIDI display: a scrolling monitor for whatever goes through a MIDI port. More...

Detailed Description

MIDI display: a scrolling monitor for whatever goes through a MIDI port.

Cable any MIDI outlet to it to see the raw message stream; outlets fan out, so it taps a chain without interrupting it. It is primarily meant to debug note lifetime issues: a note whose note-off is never sent is drawn as a bar that never ends, in red, and counted in the "stuck" readout in the header. Retriggers without an intervening note-off, and note-offs for notes that were not held, are also flagged, as those are the usual symptoms of a broken note-off path.

Implementation notes:

  • The engine -> UI transport for control outputs is lossy: the UI polls coarseUpdateTimer (~2x the UI event rate, so roughly every 60-100ms) and only keeps the last value it finds in the queue. We therefore cannot push "the events of this tick" and expect the UI to see all of them. Instead the node keeps a small ring of the events of the last retain_seconds and pushes the whole ring every time; the layer deduplicates using the per-event sequence number. As long as the UI wakes up at least once per retain_seconds, no event can be missed.
  • A heartbeat push (every heartbeat_seconds) keeps the view scrolling when no MIDI is coming in.
  • Note pairing (held / stuck / retriggered / unmatched note-off) is done in the node, not in the layer, and shipped as a per-event flag. The layer only ever holds the last retain_seconds and is rebuilt from scratch when playback restarts; deriving pairing from such a window reports the note-ons whose note-off fell before it as stuck, and the note-offs whose note-on fell before it as unmatched. Both are artifacts of the window, not of the stream.
  • Caveat: avendish drops incoming messages whose timestamp falls outside [tick_start; tick_start + frames[ (see port_run_preprocess.hpp). Messages emitted by an upstream node with an out-of-tick timestamp are therefore invisible here as well as to every other avnd process.

Classes

struct  Node