# Convert MIDI DeltaTime to Milliseconds

This topic is 3494 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

## Recommended Posts

Can somebody please give me a formula to convert a midi deltatime into milliseconds. I've looked all over the internet and keep finding theories and explanations, but no actual formula given.

##### Share on other sites
Here is an answer to the question. It was worded almost identically, so Google found it easily. The links in their answer seem like it is simple enough.

The midi standard itself is quite clear on it. There are two types of time divisions (either tick length or beats-per-second) in the header along with a tempo. You need a single multiply to convert between them, choose your favorite format. Multiply by the delta time, and convert to milliseonds. The conversion is very basic algebra.

##### Share on other sites

I've already been to that website, and still can't figure it out.

I know that:

bpm = MICROSECONDS_PER_MINUTE / tempo

division represents pulses per quarter note

tempo represents microseconds per quarter-note

I'm sure it is a very simple formula, but I just can't make the leap.

[Edited by - basementscientist on May 20, 2009 11:43:54 PM]

##### Share on other sites
This is what i've come up with after looking through the documentation. Can somebody please verify it.

THINKING OUT LOUD:
MICROSECONDS_PER_MINUTE = 60000000
BPM = MICROSECONDS_PER_MINUTE / Tempo
Division = Ticks Per Beat

TicksPerMinute = BPM * Division

"60 ticks per minute = 1 second dur."
TickDuration = 60 / TicksPerMinute

"compute duration in Milliseconds"
TickDurationMS = 1000.0 * tickDuration

"convert deltaTime to milliseconds"

DeltaMS = DeltaTime * (1000.0 * (60.0 / ((MICROSECONDS_PER_MINUTE / Tempo) * Division)))

1. 1
2. 2
Rutin
16
3. 3
4. 4
5. 5

• 26
• 11
• 9
• 9
• 11
• ### Forum Statistics

• Total Topics
633703
• Total Posts
3013455
×