Original Post
Hoping someone might be able to make me understand the way midi timing works. I've tried the usual google routine in trying to get a hang of how it works and basically the closest I got to wrapping my head around it was in this post: http://www.gamedev.net/community/forums/topic.asp?topic_id=489452 but I'm still not sure how to get to the values in the post? I'm trying to make a karaoke player for flash for a school project and time the words properly. To do this I've utilized a php class that converts the midi file into MXML or midi xml which is easy to import into flash. That file contains a number of values which I'm not entirely sure how to use to calculate a correct timing! When creating the file you can choose either absolute or delta timing, I've chosen absolute, just because I figured that would be easier for me to read. this is some of the information I can get from the XML: 192 .... 0 0 0 Now, when i check the file in a midi utility application, the number with the label TicksPerBeat is the same as resolution, only with the inclusion of the following formula (1/768), which I don't know what that means. I'm also presented with the "initial BPM", which in this song is: 58, and it changes to 56 a bit into the song. I've tried the following formula to convert Ticks to milliseconds, with no success. Resolution * BPM / Ticks * 1000 = Milliseconds If this is actually right and I'm doing something else wrong, is there a way to calculate the BPM from the number in the SetTempo node? Am I also right in thinking that the absolute label contains the amount of ticks? It looks like this with lyrics: 2304 \How 2352 can 2400 I 2448 just 2496 let Would really appreciate it if someone could help me with this, I've got no past experience in dealing with midis so this is all really confusing to me. Thanks!