I am currently writing a plugin that not only modifies incoming midi messages but also generates midi message even when there are no incoming midi messages. The problem i am having is that although I understand how to generate new midi messages based on incoming messages, I cannot generate new midi messages when there are no incoming messages as I am not sure how to fill the sample-base timestamp for a given message.
I can see from the wrappers that incoming messages timestamps are sampleframes, and that I can get the current timestamp from the AudioPlayHead class, but that timestamp is not in the sampleframe format, so I wondered how I can convert that into sampleframe for a midimessage.