Mod Archive Forums

Music Production => Tracking => Topic started by: asmodeus on April 01, 2009, 21:28:29

Title: Tempo and Ticks/Row: And what's the real speed?
Post by: asmodeus on April 01, 2009, 21:28:29
I know that there are two values in modules (IT) that the play speed is depending on. But how can I calculate the real speed? I'd like to know how long a single row takes in ms or seconds, when tempo=x and ticks=y. Is there a formula? Is the formula the same with MOD, S3M, XM and IT? Please help.
Title: Re: Tempo and Ticks/Row: And what's the real speed?
Post by: barryvan on April 02, 2009, 09:48:15
If it's for your own compositions, then your best bet is to fire up a modern tracker (like OpenMPT), and use it for playback. OpenMPT has a tempo mode which is bang-on accurate at the tempo you specify, and ignore ticks per row.

The problem is that ticks per row are dependent on the player and the system, which means that you can't guarantee an exact playback speed.
Title: Re: Tempo and Ticks/Row: And what's the real speed?
Post by: asmodeus on April 02, 2009, 13:07:31
Does that mean that modules can be played by different players with different speeds?
Title: Re: Tempo and Ticks/Row: And what's the real speed?
Post by: barryvan on April 02, 2009, 13:15:44
Pretty much... Although most coders will try to make it play back at roughly the same speed, so in a four minute mod you'll normally only get a few seconds deviation.
Title: Re: Tempo and Ticks/Row: And what's the real speed?
Post by: Saga Musix on April 02, 2009, 19:52:24
Not even a few seconds, that would be far too much. However, the BPM in a tracker are never 100% accurate, which is maybe also due to historical reasons (Amiga timer). Also, OpenMPT has a BPM calculator which calculates the correct BPM at speed x and tempo y.
Title: Re: Tempo and Ticks/Row: And what's the real speed?
Post by: m0d on April 02, 2009, 19:57:32
yeah, sound advice, but you're missing a subtle point:

Quote
I'm a programmer, not a composer.

He's not a composer, he's a programmer looking for the formula to figure this out, not to use a tracking program, necessarily. Perhaps you could tell us all how the BPM calculator works so we won't have to go through this thing over and over again the next time someone else shows up asking the same thing? ;)

Title: Re: Tempo and Ticks/Row: And what's the real speed?
Post by: Saga Musix on April 02, 2009, 20:58:03
I don't know the formula by heart, but OpenMPT is open-source, everyone can download and read the sources. :)
Title: Re: Tempo and Ticks/Row: And what's the real speed?
Post by: asmodeus on April 22, 2009, 19:08:31
Well, I coudn't find the formula in the source, but I've tested the program a little bit, viewed what takes how much time, and I think the formula is about like this (time  is in ms, 1000ms=1sec):
Code: [Select]
// Tempo is T
// Ticks/row is M
// Rows/pattern is R
// Total Patterns is P
timepertick = 2500/T;
timeperrow = 2500/T*M;
timeperpattern = 2500/T*M*R;
timeofsong = 2500/T*M*R;
Of course the formulas can only be true is the speed doesn't change during playing. Maybe you should try the formulas out and tell me whether they are actually correct.