Deprecated: mysql_connect(): The mysql extension is deprecated and will be removed in the future: use mysqli or PDO instead in /storage/content/49/145849/famitracker.com/public_html/forum/classes/dbHandler.php on line 29 FamiTracker
Login:
Menu:
Post: Author:
FamiTracker > General > FamiTracker Talk > Tempos that never skip frames (rational tempo) Owner: tadpole New post
Page 1 of 1 Sort:  
Tempos that never skip frames (rational tempo) Posted: 2010-07-09 00:29  (Last Edited: 2010-07-09 14:59) Reply | Quote
tadpole

Avatar

Member for: 5712 days
Location: Renton, WA, USA
Status: Offline

#6983
Am I right to say that as long as you keep the tempo setting at 150, and change the speed with sequences of F01-F14 commands, frames won't be skipped? Are there any other tempo settings besides 150 that are 'safe'?

Several years on the 2a03.org forums (which are down now), there was a discussion about tempo. I seem to remember people saying that in MCK, tempos like 90, 120, 150, and 180 were safe to use without skippage.


Posted: 2010-07-09 01:49 Reply | Quote
TechEmporium

Avatar

Member for: 4485 days
Status: Offline

#6987
Hmm... This sounds like a good time for speed experiments in FamiTracker. I'm very sure that there will be other speeds that are safe (& judging by the looks of that pattern with MCK, they're all probably multiples of 30).

But I'll need to experiment for myself.

_______________________
Technology: the one thing that's hated & cursed at by all engineers, technologists, scientists & technicians!

(Lousy modern technology! )
Posted: 2010-07-09 08:00 Reply | Quote
nicetas_c



Member for: 4582 days
Location: AB, CA
Status: Offline

#6996
A rational tempo does NOT mean that there are no frame skips. Rational tempi are designed such that the same set of Fxx settings repeats in all bars. That way frame skips occur at controllable rows instead of happening randomly. Rational tempi are used in many games, including Mega Man 3-6 and later titles.

Rational tempo should not be confused with pulsating tempo a.k.a. swing.

Speaking of 'safe' tempi, multiples of 30 are not the 'safest' ones. This is the correct formula of getting 'safe' tempi:
T = 15E(2^y) ÷ x
Where E is engine speed. x can be any positive integer and y can be any non-negative integer, as long as:
1) x and 2^y are coprime (their H.C.F. is 1);
2) [no. of rows per bar] is a multiple of 2^y; and
3) [no. of rows per bar] > 2^y < x.
As y goes higher, the tempo becomes more 'unsafe' and the pattern of Fxx setings will become more random.

A few exampes of safe tempi (from the 'safest' to the 'unsafest'):
900 ÷ 6 = 150
1800 ÷ 11 = 163.636363...
3600 ÷ 11 = 327.272727... (doubling)
7200 ÷ 27 = 266.666666...

Some exceptions: (I might explain them later)
135 (use in 3/4 time)
125 (use in 5/4 time)

Posted: 2010-07-09 15:56  (Last Edited: 2010-07-09 16:06) Reply | Quote
tadpole

Avatar

Member for: 5712 days
Location: Renton, WA, USA
Status: Offline

#7001
Thank you so much for your thorough response! Is this technical information documented somewhere?

I'm looking for integer tempos, since FT won't let you choose a non-integer. Am I doing this right (NTSC)?
y=4, x=225, t=64 = safe
y=2, x=45, t=80 = safe
y=3, x=75, t=96 = safe
y=1, x=15, t=120 = safe
y=2, x=25, t=144 = safe
y=1, x=12, t=150 = safe
y=3, x=45, t=160 = safe
y=4, x=75, t=192 = safe


Posted: 2010-07-09 17:35  (Last Edited: 2010-07-09 18:01) Reply | Quote
nicetas_c



Member for: 4582 days
Location: AB, CA
Status: Offline

#7002
You're doing it correct.
Note that NTSC and PAL emulation won't affect the engine speed in the latest beta.

Plus, the 2A03.org forum is active now.

-----

EDIT

1) x and 2^y are coprime (their H.C.F. is 1);
to
1) x and 2^(y+1) are coprime (their H.C.F. is 1);

3) [no. of rows per bar] > 2^y < x.
to
3) [no. of rows per bar] >= 2^y <= x.

Posted: 2010-07-09 23:48 Reply | Quote
tadpole

Avatar

Member for: 5712 days
Location: Renton, WA, USA
Status: Offline

#7011
Thanks for your help. Are you sure the forum is active? I haven't been able to access it the past 2 weeks. Looks like it's gone again.

Posted: 2010-07-10 01:03 Reply | Quote
TechEmporium

Avatar

Member for: 4485 days
Status: Offline

#7018
It looks like it's back online (Google's crawler found it & linked to it on their search site,) but I also can't access it.

I get a "Server not found" error.

_______________________
Technology: the one thing that's hated & cursed at by all engineers, technologists, scientists & technicians!

(Lousy modern technology! )
Posted: 2010-07-10 03:43 Reply | Quote
jsr
Administrator

Avatar

Member for: 5924 days
Location: Sweden
Status: Offline

#7063
Another way to see if frames will be skipped is to use this formula (for NTSC):

(150 * speed) / tempo,

if the result is an integer then all rows will have equal time period. Set tempo = 150 and the result for all speed numbers will be integers (naturally), and this is the reason no frames are skipped for any speed with that tempo. Other tempos can be used if the ratio is preserved, but the result will still be the same. (For example: multiply speed & tempo by 2/3: tempo = 100 & speed = 4 is fine but the result is the same as 150/6)

Replace 150 with 125 for PAL.

_______________________
Programmer and developer
Posted: 2010-07-10 03:46 Reply | Quote
nicetas_c



Member for: 4582 days
Location: AB, CA
Status: Offline

#7064
Oh no I got an error too...

Looks like the forum is down again.

Posted: 2010-07-10 11:04 Reply | Quote
tadpole

Avatar

Member for: 5712 days
Location: Renton, WA, USA
Status: Offline

#7072
Thanks, JSR, that's much easier, and completely answers my question.

Posted: 2010-09-27 00:18  (Last Edited: 2010-09-27 00:30) Reply | Quote
Kreese

Avatar

Member for: 5902 days
Location: Frillesås, Sweden
Status: Offline

#9905
Hmmm, I am working on a (PAL) song that have speed 3, tempo 113.

It feels like it's some kind of "swing" in it.

If I set tempo to 125, it floats fine, but it's going a bit to fast (don't want it to be really that fast.)

But I guess there is no chance to get the song to float without to sound kind of out of sync, with out changing the tempo to 125?

Hmmm, I tried using

F04
F03
F04
F03
F04
F03

etc.

changing every line. Then it seems to work better...

Posted: 2010-09-27 11:27 Reply | Quote
nicetas_c



Member for: 4582 days
Location: AB, CA
Status: Offline

#9934
Assuming the PAL song does not use a custom engine speed, try this:
F03
---
F04
F03
---
F04
This gives you a tempo of 15 × 50 ÷ [(3 + 3 + 4) ÷ 3] = 225, that is, approximately 113 × 2.

Page 1 of 1 Sort: