Skip to content

Just created a generic Adlib to VGM converter

Technical discussion about the VGM format, and all the software you need to handle VGM files.

Moderator: Staff

Just created a generic Adlib to VGM converter

Post by ClassicOldSong »

This tool could convert file formats supported by AdPlug to VGM format, without the need to play them again in DOSBox and record again into VGM.

I mentioned this several days before in the chatbox and now it's open-sourced!

Project repo: https://github.com/SudoMaker/adlib2vgm

Prebuilt binaries (now only 64bit Linux and Windows binaries available): https://github.com/SudoMaker/adlib2vgm/ ... tag/v0.0.1

Now it supports
  • CMF: Creative Music File Format by Creative Technology
  • RAD: Reality ADlib Tracker by Reality
  • D00: EdLib by Vibrants
  • DRO: DOSBox Raw OPL Format
  • RIX: Softstar RIX OPL Music Format
  • MID: MIDI Audio File Format
  • MUS: AdLib MIDI Music Format by Ad Lib Inc.
Other file formats could be easily supported by simply migrate codes from AdPlug.

As it is the very first release of this tool, some features like loops and metadata editing are still missing. Basic functionalities should be good to go now, so feel free to try it out and submit feature requests. Also contributions are always welcomed!
  • User avatar
  • MrKsoft Offline
  • Posts: 25
  • Joined: 2012-05-24, 19:11:36

Post by MrKsoft »

This is awesome! With some more refinement, it'll surely help me speed up my work on the OPL Archive. Mostly looping and supporting the rest of AdPlug's formats are what is needed.

I tested with a bunch of files and only found minor issues:
-All VGMs are being exported with both the YM3812 and YMF262 initialized even if only the YM3812 is used.
-The overall volume on these seems to be lower than logging in AdPlay via DOSBox. For example, try converting this one: The Alibi and compare it to my DOSBox-logged VGM. Both have a gain of 1.00, so one of the two programs is incorrect, dunno which one but I thought you might want to look into it.

I look forward to future updates! :D
The Wafflenet OPL Archive
PC/DOS demoscene & tracker music... in VGM format!
  • Tom Offline
  • Ragequit Member
    Ragequit Member
  • Posts: 496
  • Joined: 2011-11-30, 17:26:44
  • Location: Italy
  • Contact:

Post by Tom »

I can't actually test the converter, but the second thing you mentioned is probably a consequence of the first one. The volume of a vgm is automatically reduced if there are multiple chips involved, to prevent clipping. This has been historically bad for 1.01 vgm files which used FM.

Again, not sure if that's the case here because I can't actually test it, but try to strip the unused chip and see if that makes any difference.
Also known as nineko.
  • User avatar
  • MrKsoft Offline
  • Posts: 25
  • Joined: 2012-05-24, 19:11:36

Post by MrKsoft »

Yeah, it looks like it is just because of the dual-chip issue. The gain sounds correct when YMF262 is stripped out.

Also, was going to see how the efficiency of these files is vs manually logged, and found that converted VGMs seem to make vgm_cmp puke. Lots of "Unknown Command: 0" and then no file. This always works fine with ones logged in DOSBox.
The Wafflenet OPL Archive
PC/DOS demoscene & tracker music... in VGM format!

Post by ClassicOldSong »

Also, was going to see how the efficiency of these files is vs manually logged, and found that converted VGMs seem to make vgm_cmp puke. Lots of "Unknown Command: 0" and then no file. This always works fine with ones logged in DOSBox.
Could you send me the original files that having problems converting? I could take a look into them when I'm free. My email address is [url]mailto://yukino@sudomaker.com[/url]

AdPlug probably doesn't send all commands at once in one sample so there's probably some delay commands that should be merged which made vgm_cmp puke. But I've not coming up with good ideas of how and when these delays should be merged. I'd like to hear if you have any better ideas on this problem.
  • User avatar
  • ValleyBell Offline
  • Posts: 4768
  • Joined: 2011-12-01, 20:20:07
  • Location: Germany

Post by ValleyBell »

MrKsoft wrote:Lots of "Unknown Command: 0" and then no file.
This sounds like the header of the converted VGM file has some invalid offsets.
  • User avatar
  • MrKsoft Offline
  • Posts: 25
  • Joined: 2012-05-24, 19:11:36

Post by MrKsoft »

ClassicOldSong wrote: Could you send me the original files that having problems converting? I could take a look into them when I'm free. My email address is [url]mailto://yukino@sudomaker.com[/url]
Thanks, I sent some files I tried to your email. I also included a D00 file that has minor conversion issues I didn't notice in other files, where some notes "hang".
The Wafflenet OPL Archive
PC/DOS demoscene & tracker music... in VGM format!
Post Reply