Old 06-11-2010, 09:21 AM   #1
Actium
Human being with feelings
 
Join Date: Jun 2010
Posts: 4
Default Tempo Map Envelope

Hiya, I'm trying to use the tempo map envelope thing on the master track to get the time signature changes in a project. I can't seem to find some documentation on how the information is encoded in the rpp chunk, however. For example:

PT 16.800000000000 100.0000000000 1 524294
PT 27.600000000000 140.0000000000 1 262148
PT 39.600000000000 140.0000000000 1 262148

I made 3 tempo markers, the first changes the bpm to 100 and the time signature to 6/8, the last two change the bpm to 140 and the TS to 4/4. It appears that the last parameter, therefore, is the time signature, but I'm not really sure how 262148 = 4/4.

Sorry if this is already documented and I'm just missing it -- it should be on
http://www.cockos.com/wiki/index.php...tEnvelopeState
this page, however (I started the section on TEMPOENVEX ).

Thanks in advance.
Actium is offline   Reply With Quote
Old 06-11-2010, 09:39 AM   #2
EvilDragon
Human being with feelings
 
EvilDragon's Avatar
 
Join Date: Jun 2009
Location: Croatia
Posts: 23,343
Default

I think that it could be connected to MIDI PPQ resolution in some way, the timesig encoding. I could be wrong, though.

The format is xxxyyy.

xxx -> time signature denominator (4/x)
yyy -> time signature numerator (y/4)

xxx = 65 => whole note (y/1)
xxx = 131 => half note (y/2)
xxx = 262 => quarter note (y/4)
xxx = 524 => 8th note (y/8)
xxx = 1024 => 16th note (y/16)
xxx = 2049 => 32nd note (y/32)
xxx = 4194 => 64th note (y/64)
xxx = 8388 => 128th note (y/128)

IT doesn't go further than 128th note. yyy is a bit strange. It starts from a different value depending on xxx, and then increments by one on each next value.

Whole note:
xx537 => 1/1
xx538 => 2/1
etc.

Half note:
xxx073 => 1/2
xxx074 => 2/2
etc.

Quarter note:
xxx145 => 1/4
xxx146 => 2/4
etc.

8th note:
xxx289 => 1/8
xxx290 => 2/8
etc.

16th note:
xxx577 => 1/16
xxx578 => 2/16
etc.

32nd note:
xxx153 => 1/32
xxx154 => 2/32
etc.

64th note:
xxx305 => 1/64
xxx306 => 2/64
etc.

128th note:
xxx609 => 1/128
xxx610 => 2/128
etc.


On a closer look, no, it has no relation to MIDI PPQ.

Last edited by EvilDragon; 06-11-2010 at 10:00 AM.
EvilDragon is online now   Reply With Quote
Old 06-11-2010, 10:13 AM   #3
Actium
Human being with feelings
 
Join Date: Jun 2010
Posts: 4
Default

Quote:
Originally Posted by EvilDragon View Post
On a closer look, no, it has no relation to MIDI PPQ.
I think you're right, actually, you just switched the terminology in some places .. maybe

xxxyyy; xxx = numerator, yyy = denominator

262148 should equal 4/4.

as you said:
Quote:
Originally Posted by EvilDragon View Post
xxx = 262 => quarter note (y/4)
except 262 would indicate a 4 in the numerator. For the denominator:

Quote:
Originally Posted by EvilDragon View Post
Quarter note:
xxx145 => 1/4
xxx146 => 2/4
etc.
Again, you switched the numerator and denominator here. xxx145 => x/1, xxx146 => x/2 then xxx148 => x/4, therefore 262 148 => 4/4.

Of course, this is assuming that the PPQ is always 262, which may change depending on project settings (??).

edit: wait, disregard all of that, I think you were right originally and I was just confused by your terminology.

Last edited by Actium; 06-11-2010 at 10:19 AM.
Actium is offline   Reply With Quote
Old 06-11-2010, 10:27 AM   #4
EvilDragon
Human being with feelings
 
EvilDragon's Avatar
 
Join Date: Jun 2009
Location: Croatia
Posts: 23,343
Default

Hehe, I double-checked! It's really denominator first, then numerator!

Odd Reaper ways!
EvilDragon is online now   Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -7. The time now is 11:27 AM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2019, vBulletin Solutions Inc.