# MIDI and events `model.c` implements bounded MIDI clips and stable source-relative notes through `xtc_midi.h`. `instrument.c` prepares timeline spans and renders the sine instrument with sample-offset live events, note-off and panic handling. Preparation/destruction are control-thread operations; render/runtime state has one audio owner. See [MIDI workflow, ownership and limits](../../docs/MIDI.md).