I currently have a midi file parsed into a JSON object. Below is an image of the midi object in my browser console.
My goal is to take this data (marked in red) and convert each item in the list to timestamps in milliseconds.
From my research, I know the meaning of the "deltaTime
" property and I believe the "timeDivision
" value of 192
(underlined in the image above) should be related to the tempo of the midi file.
However, because of my sparse knowledge of the maths behind midi file values, I don't know how to convert all that information to milliseconds. I'm certain it must be a relatively simple math equation. But I'm really lost. I'm trying to build an object that should look like this and match the current millisecond time of the JSON object
How do I convert the "timeDivision
" value combined with the list of individual "deltaTime
" values to milliseconds?
Even a basic answer would suffice. I just need to understand the math behind those values.