Skip to content

MIDI file duration too long / rhythm is too slow #351

@page200

Description

@page200

The following code should create a MIDI file whose duration is 1 hour (1000*3600 milliseconds):

messages = [mido.Message('note_on', note = 100, time = 1000), mido.Message('note_off', note = 100, time = 1000*3600)]
midi.tracks.append(mido.MidiTrack(messages))
midi.save('test.mid')

However, the resulting file is 2.5 minutes longer. Why is that?

Same problem if there are more notes. It seems that the MIDI file is slower than it should be.

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