xtc/docs/decisions/0006-midi-instrument-and-notes.md

16 lines
933 B
Markdown
Raw Normal View History

2026-11-06 15:20:20 +01:00
# 0006 — Bounded MIDI Notes and Internal Instrument
2026-11-06 14:12:22 +01:00
Status: accepted.
Use the existing JACK backend for timestamped MIDI input, avoiding another
backend/dependency. Store source-relative notes in the C project and v3 format;
2026-11-06 15:20:20 +01:00
read v1/v2 without MIDI. Prepare sample spans on the control thread and render a
small sine instrument into its own graph source buffer. Use a piano roll to meet
draw/play/save/reopen acceptance before adding MIDI capture or SMF import.
2026-11-06 15:20:20 +01:00
Keep explicit bounds: 4096 project notes, 32 overlapping scheduled notes, 32
live voices and 256 events/block. Reject scheduled overcapacity at preparation;
steal oldest live voices. Panic handles event loss, disconnects and callback
failures; Stop/seek resets live state. Immediate note-off and a fixed sine voice
keep this prototype small, at the cost of possible clicks and no expressive
controllers. See ../MIDI.md for ownership, detailed limits and validation.