Skip to main content

MIDI Forum

Tempo message at ne...
 
Notifications
Clear all

Tempo message at negative tick

6 Posts
3 Users
3 Reactions
283 Views
 Lido
Posts: 43
Trusted Member
Topic starter
 

Hey, I would like to know. Is it possible for a midi 1.0 file to have tempo message at negative ticks? And if they can have that, should I assume that such a tempo is in effect at tick zero and forward or are they so illegal that I should ignore them and assume 120bpm?

 
Posted : 06/03/2025 2:55 am
Bavi_H
Posts: 276
Reputable Member
 

A MIDI 1.0 standard MIDI file can't have "negative ticks". If you are seeing negative ticks in some MIDI file software, I suspect it is a bug or some strange handling of a unusual MIDI file.

I enjoy looking at unusual MIDI files that cause problems and bugs. If you can provide a link to the MIDI file or tell more about where it came from, I would enjoy taking a look at it.

 
Posted : 06/03/2025 7:13 am
 Lido
Posts: 43
Trusted Member
Topic starter
 

Thanks. I havent actually found one, just wanted to make sure how to handle it if I did. 🙂

 
Posted : 18/03/2025 7:53 am
 Lido
Posts: 43
Trusted Member
Topic starter
 

Found one. This one has midi events at tick -3460101601568623048 according to java's midi system.

 
Posted : 18/06/2025 9:55 am
 Lido
Posts: 43
Trusted Member
Topic starter
 

Nevermind, it was java's long integer that overflowed.

 
Posted : 24/06/2025 5:15 am
Posts: 2
New Member
 

You should ignore any tempo messages (or other events) that appear at negative ticks. Such an occurrence indicates a non-compliant or corrupted MIDI file.

For the purpose of playback and interpretation, if there is no valid tempo message at or before tick zero, you should assume a default tempo of 120 BPM. This is the standard default tempo for MIDI files when no explicit tempo message is present.

 
Posted : 25/07/2025 5:49 am
Share: