Skip to content

Phase 3 / M8: Add MIDI backend, parser, timing, CLI, and deterministic replay #13

Open

Description

@norbot7865

Objective

Introduce isolated MIDI input and deterministic replay, converting timestamps into scheduler frames without requiring hardware in CI.

Scope

  • Define backend/input/device/event interfaces and parsed note, CC, and pitch-bend messages.
  • Implement robust MIDI byte parsing, including note-on velocity zero.
  • Add Fedora ALSA sequencer input (or documented pinned backend), device enumeration, lifecycle, and disconnect events.
  • Convert monotonic input timestamps using audio-clock snapshots and configurable latency compensation.
  • Apply late events at the earliest available frame and report lateness; use bounded queues with explicit overflow.
  • Implement deterministic timestamped replay logs.
  • Add lgs midi list [--json], monitor, replay, and doctor integration.
  • Add parser fuzzing, virtual/replay tests, statistics/traces, and Fedora behavior documentation.

Acceptance criteria

  • Replay produces identical converted frames headlessly and malformed input cannot crash the process.
  • Device enumeration works when MIDI devices are available; missing hardware does not fail acceptance.
  • Late/drop/overflow behavior is explicit and observable.

Spec: phase-3.md §§20, 22, 26, 30, 32–36, 39–40 (Milestone 8), 42.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requestphase-3Phase 3: live controls, automation, MIDI, patch transitions, and nREPL

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions