Home » Community » Forums » Music and Sound » Midi Ticks
  Intel sponsors gamedev.net search:   
[Control Panel] [Register] [Bookmarks] [Who's Online] [Active Topics] [Stats] [FAQ] [Search]

Add Forum to Favorites |  Send Topic To a Friend | View Forum FAQ | Track this topic


 Last Thread Next Thread 
 Midi Ticks
Post New Topic  Post Reply 
when one is creating a midi sequence, is there a method / formula to convert midi ticks to seconds and/or milliseconds

 User Rating: 1015   |  Rate This User  Send Private MessageView Profile Report this Post to a Moderator | Link

I assume you know the midi tempo of the quarter note.

If so then you can calculate it as follow:

tempo 60 = 1 quater note is 1 second
tempo 120 = 1 quater note is 0,5 seconds

The formula for seconds is 60/tempo
So if you have a tempo of 70 the formula to calculate a second = 60/70 = 0,85second

For the total length you need to know how many bars of quater notes you have.

If you have 100 bars of 4/4 that means you have 400 qauter notes. If you have tempo 70 the formula would be for the exact time

60/70 x400 = 342,85 seconds

Edit: corrected the formula

[Edited by - Jaap1978 on April 4, 2008 4:14:21 PM]

-----------
Jaap Visser
Composer/Sound Designer
Jaap Visser Music Productions
3 Peak Audio

 User Rating: 1079   |  Rate This User  Send Private MessageView ProfileView Journal Report this Post to a Moderator | Link

Jaap shoots! HE SCORES! :)

Nathan Madsen
Composer-Sound Designer
Madsen Studios


 User Rating: 1701   |  Rate This User  Send Private MessageView Profile Report this Post to a Moderator | Link

Quote:
Original post by Jaap1978
tempo 60 = 1 quarter note is 1 second
tempo 120 = 1 quarter note is 0,5 seconds

The formula for seconds is tempo/60


That doesn't work with the info you gave. Wouldn't it be 60/tempo?

Note: I don't know anything about music, but the math ain't adding up right.

Tempo is in b/n (notes per minute). We're calculating s/n (seconds per beat), right? We also know that there are 60s/m (seconds per minute). Therefore, it would be

(60s/m) / (tempo n/m) = s/n

In order to get the right units. Or more simply, 120 / 60 != 0.5, while 60 / 120 = 0.5.

Though I might really mean "quaternote" instead of "note", but the formula should still hold.

 User Rating: 1615   |  Rate This User  Send Private MessageView Profile Report this Post to a Moderator | Link

Yeah I was dreaming and I accidently switched...sorry!!

It should be indeed 60/temp

I will edit my post and put the right calculation.

Cheers Ezbez :) I think I scored in my own goal Nathan haha, but I had a rebound due to Ezbez :D

-----------
Jaap Visser
Composer/Sound Designer
Jaap Visser Music Productions
3 Peak Audio

 User Rating: 1079   |  Rate This User  Send Private MessageView ProfileView Journal Report this Post to a Moderator | Link

thanks everyone...I'll get cracking

 User Rating: 1015   |  Rate This User  Send Private MessageView Profile Report this Post to a Moderator | Link

All times are ET (US)

Post Reply
 Last Thread Next Thread 
Forum Rules:
You may not post new threads
You may post replies
You may not edit your posts
You may not use HTML in your posts
Jump To:
Administrative Options: