Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Please checke tempo meta event description - there may be a fault #12

Open
DF9TS opened this issue Jan 6, 2020 · 2 comments
Open

Please checke tempo meta event description - there may be a fault #12

DF9TS opened this issue Jan 6, 2020 · 2 comments
Assignees

Comments

@DF9TS
Copy link

DF9TS commented Jan 6, 2020

In https://github.com/colxi/midi-parser-js/wiki/MIDI-File-Format-Specifications
the tempo meta event says: 0xFF 0x51 then 3 bytes for tempo value

When you check in other docs you will find it's 0xFF 0x51 0x03 then 3 bytes for tempo value
e.g. here https://www.cs.cmu.edu/~music/cmsip/readings/Standard-MIDI-file-format-updated.pdf

.. and my MIDI player crashes if I generate a MIDI file without the 03 in set tempo

@colxi
Copy link
Owner

colxi commented Apr 27, 2020

Sorry for the delay, i've been very busy lately.
I'll try to take a look

@colxi colxi self-assigned this Apr 27, 2020
@masi
Copy link

masi commented May 7, 2020

I cannot see a fault in the docs provided by colxi. For "set tempo" it says "length: 3" followed by the tempo. Perhaps you are missing that any mentioned length is represented by a byte value in the file. All meta events have a length byte following the type:

These events are defined by an event type value of 0xFF and have a variable size of parameter data which is defined after the event type.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants