Midi to audio and back again

Hi all,
I always run into problems recording audio and midi at the same time. I was wondering if there is an accurate way to record midi as an audio track. Midi could be converted in a standalone box to audio. One sample could be a midi note and the next sample could be the velocity. Once I have a lot of audio tracks in Cubase even just recording midi along introduces so much jitter and latency that it becomes useless. I have been using a 2nd computer and recording soft synths as audio. It’s the only way to get it in time. Sorry not really a JUCE question but I thought the answer might be floating around in someone’s heads up here … Sean

I think it could be done by converting MIDI to a PCM representation and tricking the OS into seeing the box as an audio device, the problem would be converting the pseudo-midi data back to MIDI on the fly and routing it in the DAW appropriately.

But this sounds like an OS problem. Do you see this on Windows?

Yes it’s an OSX problem and I think it’s getting worse. In the last couple of years.
Hopefully once the DAW has recorded the midi as audio it could then convert it offline to midi so I could trigger soft synths with it or send midi out and rerecord audio out of the ancient boxes.