Skip to content

Timestamp precision #11

@OlivierSohn

Description

@OlivierSohn

The Timestamp (type Timestamp = CULong) precision is currently milliseconds, which is enough to introduce midi-jitter of up-to one millisecond. I guess that in some applications, it could be audible, and some platforms (OSX for example) provide nanosecond precision for MIDI timestamps, so we could rewrite portmidi to take advantage of the full resolution, where it is available.

I'd like to propose a PR where the full precision is kept.
(After looking at it a bit more, it looks like it's a big task... and we would need some unit tests to make sure nothing is broken.)

Since it's a breaking change, to avoid undetected bugs when upgrading, I think the type should be changed, I propose newtype NanoTimestamp = CULLong.

What do you think?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions