I faced the same issue as in the following question: Recording midi with Audiokit
The problem is pauses in record differs the real pauses.
I faced the same issue as in the following question: Recording midi with Audiokit
The problem is pauses in record differs the real pauses.
The issue was in source code of the linked question:
track.add(noteNumber: b, velocity: c, position: startPosition, duration: currentPosition - startPosition, channel: 0)
It has been passed currentPosition, not startPosition.