Varying interpretations of "BPM"

Started by tim, March 20, 2009, 14:33:28

Previous topic - Next topic

tim

There's an issue I've had difficulty with a few times, and I'm wondering if other people have experienced the same, or if there's a way to fix it.

If I use modplug in conjunction with another program, the two programs seem to have a different idea of what BPM should be. Modplug seems ever-so-slightly behind. For example, if I compose a song on modplug at 140 bpm, and then load that song into a sequencer (ableton live, in my current situation, though I've had this issue with other programs), after about 4 minutes the modplug file is about a half beat behind where it should be.
Is anyone else familiar with this problem?

Saga Musix

That's what you call precision. And you simply cannot force all programs to have the same precision, because it dependson how things are implemented. For example, the modules' BPM are modeled using the Amiga system timer, which might not be a 100% accurate conversion.
» No support, bug reports, feature requests via private messages - they will not be answered. Use the forums and the issue tracker so that everyone can benefit from your post.

LPChip

However, it is possible to change the tempo settings. This was made because we have had similar complaints in the past.

In the song, go to the general tab, song properties.
"Heh, maybe I should've joined the compo only because it would've meant I wouldn't have had to worry about a damn EQ or compressor for a change. " - Atlantis
"yes.. I think in this case it was wishful thinking: MPT is makng my life hard so it must be wrong" - Rewbs

tim

Quote from: "LPChip"However, it is possible to change the tempo settings. This was made because we have had similar complaints in the past.

In the song, go to the general tab, song properties.

Well, yes, but in order to sync I'd have to set modplug's bpm to 140.02-05 or something, or set ableton to 139.95-98. I don't think either program allows for this level of fine tuning, unless I missed something.
Edit: Looks like I did miss something. Ableton's appears to have a few magic tricks just for dealing with this sort of thing, so I can probably work it out.

LPChip

Quote from: "tim"
Quote from: "LPChip"However, it is possible to change the tempo settings. This was made because we have had similar complaints in the past.

In the song, go to the general tab, song properties.

Well, yes, but in order to sync I'd have to set modplug's bpm to 140.02-05 or something, or set ableton to 139.95-98. I don't think either program allows for this level of fine tuning, unless I missed something.
Edit: Looks like I did miss something. Ableton's appears to have a few magic tricks just for dealing with this sort of thing, so I can probably work it out.

I do think you missed something indeed. In OpenMPT that is though...

If you're in the song properties window, go to the frame Tempo, and set mode to Modern(Accurate)

That should give you an accurate BPM setting if you use speed 6 I believe.
"Heh, maybe I should've joined the compo only because it would've meant I wouldn't have had to worry about a damn EQ or compressor for a change. " - Atlantis
"yes.. I think in this case it was wishful thinking: MPT is makng my life hard so it must be wrong" - Rewbs

Saga Musix

QuoteThat should give you an accurate BPM setting if you use speed 6 I believe.
You could try out what you "believe" before claiming it works, actually. Because this is wrong in two senses:

1) Modern tempo mode doesn't change the duration of a base tick, the file size of a 125bpm @ speed 6 tune wouldn't change for example, not even by a byte.
2) It is not accurate in the sense of the above mentioned claim, but it is accurate because changing the speed doesn't effect the BPM of the tune. In modern tempo mode, it does not matter if you use speed 4 or speed 16, it only increases or decreases the amount of precision (by means of ticks) you have per row.
» No support, bug reports, feature requests via private messages - they will not be answered. Use the forums and the issue tracker so that everyone can benefit from your post.

g

Quote from: "Jojo"
QuoteThat should give you an accurate BPM setting if you use speed 6 I believe.
You could try out what you "believe" before claiming it works, actually. Because this is wrong in two senses:

1) Modern tempo mode doesn't change the duration of a base tick, the file size of a 125bpm @ speed 6 tune wouldn't change for example, not even by a byte.
2) It is not accurate in the sense of the above mentioned claim, but it is accurate because changing the speed doesn't effect the BPM of the tune. In modern tempo mode, it does not matter if you use speed 4 or speed 16, it only increases or decreases the amount of precision (by means of ticks) you have per row.
1)That's exactly what it does, it changes the duration of the a base tick to fit them on a row without changing the tempo of the song. A 125 bpm @ speed 6 tune just happens to be the only case when a song with classic tempo mode isn't slightly off (unless you're on an NTSC Amiga I suppose  :wink: )

2) It's called "Modern" because it doesn't change the bpm when you change the speed, and accurate because it's accurate in the sense of not being inaccurate like the classic mode.

Example:

1 pattern @ 64 rows speed 6, 120 bpm classic mode
length: ~7.993447 seconds in Audacity
1 410 092 byte

1 pattern @ 64 rows speed 6, 120 bpm modern mode
length: ~7.999977 seconds in Audacity
1 411 244 byte

Sam_Zen

Hmm. Thanks to g, we're getting somewhere.
I think in the end, every system has its own clock, and sooner or later it will produce differences. Every crystal on a soundboard is slightly different.
0.618033988

g

Even if crystals were different enough to produce noticable differences, it'd only matter if you played something on two computers at once without any form of synchronization (well maybe a synchronized start would be necessary... ;) or else it'd always be out of sync).

Sam_Zen

I once used two seperate soundcards, each with its own crystal, unsynced, on one computer and the same occurred.
After a few minutes the difference became noticable.
0.618033988

Saga Musix

Soundcards don't give the timer resolution for a program, though. And you don't use quartz crystals for timing anyway. :P Depending on which system-internal timer is chosen, it can be reliable or unreliable, though.
» No support, bug reports, feature requests via private messages - they will not be answered. Use the forums and the issue tracker so that everyone can benefit from your post.

Sam_Zen

I know, Jojo.. It was just an example of a likewise situation.
0.618033988

g

Quote from: "Sam_Zen"I once used two seperate soundcards, each with its own crystal, unsynced, on one computer and the same occurred.
After a few minutes the difference became noticable.
That's weird. What exactly did you do? I know it's off-topic but I'm interested.

Quote from: "Jojo"And you don't use quartz crystals for timing anyway.
How does it work? The way I thought it worked was this (simpliefied): MPT generates a stream of data and uses a buffer to make sure there aren't any glitches. Meanwhile the driver (soundcard) pulls data from the other end of the buffer at a steady rate? My point is that if a soundcard would set itself to 44.05kHz, how would one notice? Would it play back at a lower pitch or would you get buffer overruns?

Sam_Zen

OT - 2 g : I make most of my pieces in a four channel concept. Now, I have tools to make multichannel WAVs, but in the beginning I played two stereo files, each a soundcard, simultaneously, to get four discrete outputs.
Then, after some 2 - 3 minutes, the difference in time was enough to hear a small delay.
0.618033988

Saga Musix

g: Actually, you can try it yourself if you have Hardware that is capable of doing that - Like my soundcard (ESI Juli@). I can set the playback frequency to anything I want during playback, and if I set it from 44khz to 48khz, MPT output will become faster, and if I set it from 48khz to 44khz, the effect is vice versa. So there will be no underruns or overflows.
» No support, bug reports, feature requests via private messages - they will not be answered. Use the forums and the issue tracker so that everyone can benefit from your post.