Here's a couple formulas as well.

MSPerTick = (1.0/(Tempo/60.0))/PPQN
tempo of 120,  PPQN of 480 would give 240 MicroSeconds Per Tick

MPQN=MPM/BMP
Microsecond per quarter note = Microsecond Per Minute / Beat Per Minutes

BPM=MPM/MPQN

might help :-).

Stephane Richard
----- Original Message ----- From: "Maarten de Vries" <[EMAIL PROTECTED]>
To: "REALbasic NUG" <[email protected]>
Sent: Saturday, August 12, 2006 7:34 AM
Subject: Re: MIDI type 1


well.. ok... :-)
I thought I had it.. but I didn't... What I'm trying to do here is convert
delta time to ticks.. but it doesn't seem to work..
DeltaTime is the delta time (changed from variable length to a normal
integer). Division is the division from the header and Tempo is the tempo...
It's changed by the change tempo event, but it's standerd is 500,000. With
my own midi files it works (division of 30 and standerd tempo). But with
another MIDI file it just plays way to slow. Can you see the error?
time=time+DeltaTime/Division*(Tempo/1000000)*60

Thanks, Maarten

On 12/08/06, stephane richard <[EMAIL PROTECTED]> wrote:

YOu're welcome,

if you got other questions, feel free to ask :-).

Stephane Richard
_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>

Search the archives of this list here:
<http://support.realsoftware.com/listarchives/lists.html>


--
No virus found in this incoming message.
Checked by AVG Free Edition.
Version: 7.1.405 / Virus Database: 268.10.9/416 - Release Date: 8/10/2006



_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>

Search the archives of this list here:
<http://support.realsoftware.com/listarchives/lists.html>

Reply via email to