So if I do the math from that thread and change the tempo on the MIDI used in mid2vgm 2612 it should sync up?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.
The mid2vgm topic
with updated versions of the tools you know
Technical discussion about the VGM format, and all the software you need to handle VGM files.
Moderator: Staff
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.
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.
Also known as nineko.
- ValleyBell Offline
- Posts: 4791
- Joined: 2011-12-01, 20:20:07
- Location: Germany
I'm pretty sure the notes get converted with the same duration as in the MIDI.
If you have 3 A notes without any sort of delay between (note end) and (begin of next note), then it will sound as a continuous tone.
This is because mid2vgm does not apply any sort of envelope and the "note off" and "note on" commands occour at the exact same time.
If you want any sort of volume envelope, I'm afraid you need to do that manually using Main Volume and Expression control changes.
If you have 3 A notes without any sort of delay between (note end) and (begin of next note), then it will sound as a continuous tone.
This is because mid2vgm does not apply any sort of envelope and the "note off" and "note on" commands occour at the exact same time.
If you want any sort of volume envelope, I'm afraid you need to do that manually using Main Volume and Expression control changes.
I'm having a problem with mid2vgm 2612. With any version I use of it, it gives me this error when I try to open it. I don't understand why. This file is nowhere to be found which is also strange. I ended up Googling it just now and apparently this can happen with other programs. I still couldn't fix it with regsvr32 comctl32.ocx or C:\Windows\SysWOW64\regsvr32 C:\Windows\SysWOW64\comdlg32.ocx in Command Prompt. It's very strange. I even tried downloading the file from the one site and I still get it. I mean, look at this photo! This is weird. Does anyone think they know what the problem is?
P.S. Sorry for the huge screenshots.
P.S. Sorry for the huge screenshots.
hi .
now i'm try to using your mid to rf5c68 converter.
and i have some issues.
first: i notus in the samples definición file that some samples has a note for example 3c, 4c, or, e3, others has only the note number.
i want to test the tool with a single sample, using this single sample a cross the keyboard.
here is the definition file for it.
22 4C -1 acordeon1.wav
here is the wav file.
https://www.dropbox.com/s/my2zm3g3mrfro ... 1.wav?dl=0
and here is the midi file.
https://www.dropbox.com/s/hir78hnkw6na5 ... 1.mid?dl=0
when i try to convert this , tell'sme that none of the samples is loaded.
is there something wrong here?.
now i'm try to using your mid to rf5c68 converter.
and i have some issues.
first: i notus in the samples definición file that some samples has a note for example 3c, 4c, or, e3, others has only the note number.
i want to test the tool with a single sample, using this single sample a cross the keyboard.
here is the definition file for it.
22 4C -1 acordeon1.wav
here is the wav file.
https://www.dropbox.com/s/my2zm3g3mrfro ... 1.wav?dl=0
and here is the midi file.
https://www.dropbox.com/s/hir78hnkw6na5 ... 1.mid?dl=0
when i try to convert this , tell'sme that none of the samples is loaded.
is there something wrong here?.
My favorite sound chip?, YM-2413!
- ValleyBell Offline
- Posts: 4791
- Joined: 2011-12-01, 20:20:07
- Location: Germany
There are two issues I noticed:
Did you execute the process in the exact order they described?
i.e. unpack/install the file into SysWOW64 and then run regsvr32? The order is important here.
- 1. the MIDI instrument numbers are 1-based, i.e. Grand Piano has number 1.
That means the number for "Harmonica" is 23.Code: Select all
23 4C -1 acordeon1.wav
- When converting the MIDI, the VGM appears silent. That happens when there is no "panning" setting in the MIDI.
The RF5C chip requires panning to be set and mid2vgm RF doesn't do that unless there is a panning MIDI CC. (I consider this a bug that I didn't notice, because my MIDI editor always sets panning for each channel.)
Just place make sure that the MIDI has panning explicitly set, e.g. by setting it to 64, which is the value for "center".
I can only point you to this Microsoft forum post: https://answers.microsoft.com/en-us/win ... 0a7be96043LegoLoco7 wrote:I'm having a problem with mid2vgm 2612. With any version I use of it, it gives me this error when I try to open it. [image removed] I don't understand why. This file is nowhere to be found which is also strange. I ended up Googling it just now and apparently this can happen with other programs. I still couldn't fix it with regsvr32 comctl32.ocx or C:\Windows\SysWOW64\regsvr32 C:\Windows\SysWOW64\comdlg32.ocx in Command Prompt. It's very strange. I even tried downloading the file from the one site and I still get it.
Did you execute the process in the exact order they described?
i.e. unpack/install the file into SysWOW64 and then run regsvr32? The order is important here.
got it!.
thank you!.
https://www.dropbox.com/s/6hoahgry3nt0v ... o.vgm?dl=0
but, how can i edit the loop poynts on the sample?.
can i use the same values that show me in my audio editor when i display the numbers as samples?
thank you!.
https://www.dropbox.com/s/6hoahgry3nt0v ... o.vgm?dl=0
but, how can i edit the loop poynts on the sample?.
can i use the same values that show me in my audio editor when i display the numbers as samples?
My favorite sound chip?, YM-2413!
- ValleyBell Offline
- Posts: 4791
- Joined: 2011-12-01, 20:20:07
- Location: Germany
- ValleyBell Offline
- Posts: 4791
- Joined: 2011-12-01, 20:20:07
- Location: Germany
- ValleyBell Offline
- Posts: 4791
- Joined: 2011-12-01, 20:20:07
- Location: Germany
After some talk with "Nuclear" on Discord, I made a small fix to mid2vgm RF.
Changelog:
Changelog:
- proper panning initialization
- panning is working at all
- when the last sample is too large, the program will tell you so (instead of just crashing)
- fixed the instrument definition file description
- ValleyBell Offline
- Posts: 4791
- Joined: 2011-12-01, 20:20:07
- Location: Germany