Skip to content

How to correlate times from different MIDI interfaces? #195

@mcclure

Description

@mcclure

Not sure if this is a feature request, a documentation request or just a support request… but…

RtMidi gives all times as deltas, ie, time since last event. I assume (?) this is time since last event on the port that read the delta.

I find that in practice I am working with multiple MIDI interfaces (because most MIDI devices are USB now). So this would mean the delta times on the interfaces have nothing to do with each other. And somehow I have to correlate the delta times with a wall clock or audio timer, so that I can play sounds or time MIDI events out.

What methods do people use with RtMidi to convert the delta times into some form of "absolute" time that allows comparing events from different interfaces, planning output times etc?

And a feature request I'd be curious about: A friend told me that Mac OS X CoreMIDI actually correlates all MIDI events with Mach time. So that implies RtMidi already has absolute-time stamps for every event. Would it be possible for RtMidi to optionally expose these absolute-time stamps somehow on OS X? Then I could get improved performance on OS X even if I have to fall back to some kind of rougher time estimation on Windows and Linux.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions