Skip to content

SetTempoEvent to 120 bpm doesn't seem to align with my metronome or in my music software #179

@LiamInJapan

Description

@LiamInJapan

Hi there,

Thanks very much for providing and supporting this library!

I am trying to create an automatic drum rudiment generator here:
https://github.com/LiamInJapan/RudimentGenerator

https://github.com/LiamInJapan/RudimentGenerator/blob/master/generator_2.py < the guts are in here

But I'm having some problems with the library... Perhaps it's to do with my understanding of how NoteOn and NoteOff works...

Essentially I set up a track with BPM 120 and print out a bunch of notes. If I confirm the mpqn it seems to correctly set at 500000, which suggests that everything is good. The MIDI generates and I can play it out with timidity and it sounds approximately what I expect.

The problem is if I try and compare this with a metronome, or import it into a MIDI editor set at BPM 120. What I see is that each note introduces a little lag (e.g. the resultant output is ever so slightly slower than 120 BPM). An image is attached:

Screenshot 2020-01-29 at 19 33 13

(Interestingly it lines up again after 6 bars...)

I'm not really sure what's going on, whether this is an understanding of "resolution" (the output seems to say 220... Although I've no idea how I can affect that).

Any advice much appreciated!

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