How to know what note is a beat in MIDI note event?

152 Views Asked by At

I'm currently working on a rhythm game, and have a set of MIDI note events converted from the MP3 file, but I don't know which notes is a beat. Is there any way to detect that?

Here is the MIDI data of mine, have a look:

0, 0, Header, 0, 1, 43
1, 0, Start_track
1, 0, Tempo, 500000
1, 0, Program_c, 0, 0
1, 0, Note_on_c, 0, 66, 53
1, 3, Note_on_c, 0, 70, 21
1, 4, Note_on_c, 0, 51, 28
1, 14, Note_off_c, 0, 51, 64
1, 30, Note_on_c, 0, 58, 39
1, 55, Note_off_c, 0, 70, 64
1, 59, Note_off_c, 0, 58, 64
1, 60, Note_on_c, 0, 58, 16
1, 61, Note_on_c, 0, 54, 19
1, 61, Note_on_c, 0, 73, 12
1, 63, Note_off_c, 0, 58, 64
1, 64, Note_on_c, 0, 58, 17
1, 67, Note_off_c, 0, 54, 64
1, 68, Note_on_c, 0, 54, 15
1, 75, Note_off_c, 0, 54, 64
1, 75, Note_off_c, 0, 58, 64
1, 76, Note_on_c, 0, 54, 15
1, 78, Note_on_c, 0, 58, 14
1, 84, Note_off_c, 0, 54, 64
1, 86, Note_on_c, 0, 57, 38
1, 86, Note_off_c, 0, 58, 64
1, 89, Note_off_c, 0, 57, 64
1, 89, Note_on_c, 0, 58, 34
1, 92, Note_on_c, 0, 54, 20
1, 93, Note_off_c, 0, 73, 64
1, 95, Note_off_c, 0, 54, 64
1, 105, Note_on_c, 0, 54, 18

Sorry for bad english!

0

There are 0 best solutions below