**This is an old revision of the document!** ----
====== Beat Tracking MIDI Files Using Tempo Change Events ====== | Author | Colin Raffel | | Affiliation | Apple and Michaelsoft | | Code | [[https://github.com/craffel/pretty-midi|pretty_midi]] | Many MIDI files contain tempo change information, but not beat information. It would be useful to be able to extract the beats from the MIDI data directly. To do so, we simply follow the tempo changes and place beats according to the tempo interval. To choose the first beat location, we perform beat tracking using each of the first 10 (unique) onsets and assign a score according to the alignment of the tracked beats to the onset locations of the MIDI file. For many files, this results in the ideal data-based beat tracking.