digital-sound-antiques / vgm-conv

Chip-type and clock converter for VGM
ISC License
44 stars 3 forks source link

BUG: Converting YM2413 VGMs to other OPL chips does not set vibrato and tremolo depth correctly #85

Closed ccacook98 closed 2 months ago

ccacook98 commented 3 months ago

The YM2413's vibrato and tremolo depth are fixed at 13 cents and 4.8db respectively, which is not the default on other OPL chips. To accomplish this on other OPL chips the register at $BD must be set to $C0 at the beginning of the converted output before any notes play.

At present, vgm-conv does not set this register, so any instruments utilizing vibrato or tremolo do not sound correct when converting OPLL VGMs to use OPL, OPL2, or OPL3.

okaxaki commented 3 months ago

Thank you. I forgot to implement it. I will fix this in the next update.

ccacook98 commented 3 months ago

Wow, that was quick! Thanks a bunch for this project. Any plans to add VRC7 support (it just needs a command-line option added to select the VRC7 voice table instead of the regular OPLL one)?

okaxaki commented 3 months ago

Hi, I have fixed this problem and released vgm-conv 0.14.0-beta.0.

This version also includes VRC7 support. If VGM file has the correct VRC7 flag in the header, no option is needed. An explicit option to specify the target variant can be used as follows:

YM2413 to OPL (YM3812/Y8950/YM3526/YMF262) OPTIONS

  -D opllVariant=ym2413|vrc7|ymf281b   Specify the YM2413 variant name. If not  
                                       specified, it is detected from the VGM  header.                                  

YM2413 to YM2608 OPTIONS

  -D opllVariant=ym2413|vrc7|ymf281b   Specify the YM2413 variant name. If not  
                                       specified, it is detected from the VGM  header.                                  
ccacook98 commented 3 months ago

Thanks a bunch! I hacked in a tweak to use the VRC7 tables instead myself, but it simply replaced the standard YM2413 ones regardless of what OPLL type the input actually was. I'll be installing and testing the new version shortly.