Electronic – Midi Timestamp Implementation

hidmicrochipmicrocontrollermidiusb

I am building a HID USB device (via Microchip PIC MCU) with a MIDI interface, which is functioning as intended (sending midi to the host). My intent is to make it usable by a DAW (such as Reaper), and to ensure precise and accurate timing, I believe I need to implement MIDI timestamps. My questions:

  1. Is implementing MIDI timestamps going to dramatically improve the precision and accuracy of recorded midi notes without degrading real-time performance?
  2. Do MIDI timestamps need to be implemented by the MCU, or is that handled inherently by the driver?
  3. Where can I find documentation on implementing timestamps if applicable? (Google appears to not be helping in this case)

Best Answer

In general, MIDI recording devices just measure the time when events arrive.

MIDI Clock messages are sent (24 per quarter note) by a sequencer to tell the receiver how the events relate to musical tempo, i.e., they tell where measures are.

MIDI Time Code messages are sent by a sequencer to keep the receiver synchronized to the sender's clock.

If you are generating events in real time, you do not need to do anything of this.