I'm starting on a project where I'll be recording and playing back MIDI data. It's a basic sequencer with some MIDI processing features to implement effects like delay, appregios, etc. I'm not trying to re-invent the wheel, as I intend to have it export MIDI files and then I handle the rest of the production process in a DAW like FL Studio. I'm writing it in NodeJS, if this makes any difference.
Anyway, my question is this: I already have code working that receives real-time messages and immediately sends them out, and optionally sends out subsequent messages after a short delay. I know how to do that, and it's working perfectly. But how do I enable timing data to be sent with the event messages? I find little tidbits of information out there about setting a tempo and sending a "start" message, but not much more than that. I want to receive the messages with timing data saying the first note was at 0ms, second was at 250ms, third was at 750ms, etc. Doesn't matter if these are in ms, or MIDI ticks, I'll piece together whatever I have to at the end. Also, I need to eventually be able to send messages out like this as well. Relying on software timers in my code to send out real-time messages isn't the proper solution.
Let me know if you need any clarification as to what I'm trying to do, and thanks for any help.