Skip to content

Bug - MIDI clock display is incorrect when clock is sent in bursts with gaps #52

@tomoinn

Description

@tomoinn

There's a problem which I suspect is due to some stale state being left after a clock message is displayed. I hit it when using ShowMIDI to visualise output from a midi controller I'm building, but verified the same problem exists when using an IAC loopback device along with the sendmidi command line tool which should take my potentially questionable hardware choices out of the picture!

  • When a device column is newly created, sending 2 beats worth of clock bytes works as expected and shows e.g. 100BPM
  • If there's then a pause in the clock pulses, and you send the same clock pulse rate again for another two beats, the display just shows 20BPM (hardcoded minimum value?). If you keep sending for longer (much longer, generally several seconds) it eventually shows the actual clock rate.
  • If I hide the device, then re-show it, then send another two beats of clock bytes I get the correct value shown.

I'm guessing there's some kind of 'last clock pulse time' value and rolling window that's meaning there's a huge initial message time difference which then means that the average of the 48 time differences is still too long and it shows the minimum BPM, but when there's a clean state there's no 'last clock pulse time' value, and that this state gets reset when the device column is hidden and re-shown.

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