vgmrips

The forum about vgm files
It is currently 2019-10-22, 11:39:22

All times are UTC + 1 hour [ DST ]




Post new topic Reply to topic  [ 32 posts ]  Go to page Previous  1, 2, 3
Author Message
 Post subject:
PostPosted: 2019-09-23, 11:50:01 

Contributors Contributors
Offline

Joined: 2018-06-08, 5:33:59
Posts: 10
Tom wrote:
Yeah, it's a known issue, but it's not related to the PSG clock or anything like that.

The tl;dr version is that I made the original version of mid2vgm 2612 (unlike the 2413 and the PSG ones, made by ValleyBell), and I used a different algorithm to calculate the time. The program has been later updated by other people (including ValleyBell himself), but the time algorithm is still the one I used. Sorry about that.

Read more.

Also this. Beware: DO NOT click the mdscene link in the post below the one I just linked, since mdscene links now redirect to bad things. They should probably be mass-replaced via SQL or something.

So if I do the math from that thread and change the tempo on the MIDI used in mid2vgm 2612 it should sync up?


Top
 Profile  
 
 Post subject:
PostPosted: 2019-09-23, 14:23:39 

Programmers Programmers
Offline

Joined: 2011-11-30, 17:26:44
Posts: 466
Location: Italy
No. The difference between the algorithms in a nutshell is that I preferred to avoid jitters in the short run, while ValleyBell favoured a higher accuracy in the long run. I round each increment, he rounds the total.

Say, for example, that your events should be placed every 1.2 time units (of course there is no such thing as a "time unit", but it's for simplicity's sake).

To prevent jitter, my algorithm would round them all down to 1.0, resulting into events placed at timestamps 1, 2, 3, 4, 5, ...

ValleyBell's algorithm, instead, would internally calculate the timestamps as 1.2, 2.4, 3.6, 4.8, 6.0, ..., and then round them to 1, 2, 4, 5, 6, ...

There is jitter in this case, since the events no longer have the same length between each other, but the global timing is better preserved overall, it correctly ends at time unit 6 while I end at time unit 5. The vice versa is also possible (and far worse) if the events were 1.5 time units apart or more.

The only way I can possibly see they sync up is some heavy quantization on the MIDI side, along with very divisible BPMs such as 120 or something, to ensure there are no "fractional time units".

Again, tl;dr: no, unless you want a headache.

_________________
My webhost decided to shut down most of my webspace without a warning. If you find any broken Digilander link in any of my posts (basically all of them should be), please inform me.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 32 posts ]  Go to page Previous  1, 2, 3

All times are UTC + 1 hour [ DST ]


Who is online

Users browsing this forum: No registered users and 3 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group
[ Time : 0.236s | 15 Queries | GZIP : On ]