Skip to content

How do timestamps work? #6

@thbar

Description

@thbar

First thanks for ex-portmidi, I'm starting to use it to play around with my synth & Elixir. I successfully managed to record sequences of events while playing the synth, which is already great 😄

If I call PortMidi.write with a timestamp, it seems like the note is played right away, is it expected?

Here is a concrete example:

PortMidi.write(output, [
  {{144, 36, 55}, 13771},
  {{128, 36, 68}, 13919},
  {{144, 48, 64}, 14310},
  {{128, 48, 75}, 14453},
])

(in that case the 2 notes will stack up immediately).

I looked a bit inside the code and in the portmidi documentation, and read here:

timestamps are ignored if the stream was opened with latency = 0

This makes me wonder how timestamps work when called from ex-portmidi.

Did you manage to get them working on your side?

Thanks!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions