I want to timestamp incoming midi data that I will read into Arduino using this midi interface and this midi library. My plan is to wait until there is data available at the serial connection, read it in and then immediately after generate a timestamp using micros(). Then I want to send the event and the timestamp over serial usb to a host. Does anything here raise a red flag with anyone? In particular, is there anything that might cause the timestamp to be inaccurate? Thanks!

A microsecond granularity is fine with me, but that's good to know about. I want to send the data over usb to a host running Matlab where I collect the midi note data, along with some other sensors that are connected to the Arduino.

As for knowing when the packet is complete, I had assumed that the midi library would handle that.