vgm2smps

Discussion in 'Utilities' started by Ivan YO, Jan 27, 2019.

  1. nineko

    nineko I am the Holy Cat Member

    Joined:
    Mar 24, 2008
    Messages:
    1,902
    Location:
    italy
    You're all too young to remember that, but this kind of discussion happened also when VCRs were invented. Were they illegal? No, but you could use them to record movies and whatnot.

    On topic, fantastic work. I've yet to try it but I'm sure it does a fine job within the obvious limitations. You know, making a vgm2smps converter was my plan all along, more than 10 years ago, but since it was too complex, I later changed my goal to xm2smps to rely on the easier XM structure. Fun fact: my working folder is still named "vgm2smps" to this day, I never renamed it when I lowered my goal. Yes, I am that lazy.
     
  2. Ivan YO

    Ivan YO Well-Known Member Member

    Joined:
    Jan 23, 2012
    Messages:
    63
    Yes, but...
    If a person wants to evolve in this direction, he will do it. And if not, he can import music from the game as a last resort, and the quality will be higher than the use of already reused tracks from the ripped games.

    Yes, I understand perfectly.
    But as I said, stealing romhacker's music will be disapproving.

    +++++++

    Thanks :)
    I also forgot to say about the SMPS limitations... and what vgm2smps do with that.

    SMPS does not support:
    • Frequency changing after key off (used in Thunder Force IV) (partially solved by -fm_enable_keyoff_notes flag)
    • AMS and FMS. (vgm2smps has FMS imitation by modulation)
    • SSG-EG.
    • ...And some songs may use frequencies which SMPS can't play... (for example in TAoBR) (partially solved by -altins flag)
     
    Deactivated Account, KCEXE and NiphFM like this.
  3. AURORA☆FIELDS

    AURORA☆FIELDS so uh yes Exiled

    Joined:
    Oct 7, 2011
    Messages:
    759
    Are you planning to support more than Sonic 1 in the future? It could really be nice for providing more accurate ports to support some other game or a more featured driver (such as Z80 type 2 driver?), and I think with Sonic 1's limitations you will not be able to port from many games. Granted some games still wont be port-able but it could help...
     
  4. breakthetargets

    breakthetargets Well-Known Member Member

    Joined:
    Aug 6, 2009
    Messages:
    180
    This is quite a feat, honestly never thought I see the light of day. Although I will say that sadly it's hindered by the fact it's a vgm conversion in the first place due to the fact that VGMs tend to be bloaty (pretty much literal register dumps) and there's only so much you can do to optimize the conversions from that point on.

    I just wish people in the MD homebrew/hacking scene don't rely on VGM conversions (XGM, vgm2smps etc) too much because VGMs were never meant to really be used for playback on homebrew, it was meant to be for preservation on machines that makes the bloated VGM size not an issue. Ideally conversions from a machine code format (something like .nsf but for Genesis) would be better but we don't have a format like that for now.

    I ran some tests and I am honestly impressed at the success of some conversions but obviously not all of them can be smooth this early on from release. It's definitely cool for what it is!
     
  5. EMK-20218

    EMK-20218 The Fuss Maker Exiled

    Joined:
    Aug 8, 2008
    Messages:
    1,067
    Location:
    Jardim Capelinha, São Paulo
    Yeah. Most of the conversions I tried became successful made in the end. Even very complex songs like certain songs from Streets Of Rage 3 and others I thought I'd never get to see converted anyway. Although, most of the problems I noticed were related to games that use the GEMS driver. Toejam & Earl 2 and Kid Chameleon songs didn't port well, but Sonic Spinball worked fine with some songs.

    I also noticed that major of the dirtiness that is taking space in the songs are related to the volume flag which doesn't seem well optimized. When I was investigating one of my ports in the BIN file I noticed that most of the volume coordination flags are practically per-note instead of being per-sequence in the FM and PSG channels. This is making very tiny songs to take a lot of ROM space and very long songs like Inga Rasen from Streets Of Rage 3
    (which its melody loop is more than 2-minutes long) are impossible to port because of this. I dunno about the pitch bend flags because they looks OK to me, at least until the point I checked.

    @Ivan YO : Give attention to this detail and you can make the songs much shorter by simply doing this one optimization. Of course, there's more needed, but the usage of volume flag is the most noticeably unoptimized thing in the SMPSs I verified.
     
    Last edited: Jan 31, 2019
    ProjectFM likes this.
  6. Ivan YO

    Ivan YO Well-Known Member Member

    Joined:
    Jan 23, 2012
    Messages:
    63
    Initially, I would like to use a driver without smps limitations, but unfortunately smps is the most popular. At the expense of the z80 drivers -- I initially did not plan to add their support, because the output can be converted to z80 with external tools.
     
    AURORA☆FIELDS likes this.
  7. Ivan YO

    Ivan YO Well-Known Member Member

    Joined:
    Jan 23, 2012
    Messages:
    63
    Try to filter channels (with -fm_chls/-psg_chls) in convertation, optimize that by SMPSOptimizer and merge channels. Although I can import this optimizer into vgm2smps...
     
    ProjectFM likes this.
  8. Spanner

    Spanner The Tool Member

    Joined:
    Aug 9, 2007
    Messages:
    2,570
    If people are concerned with their work being converted without permission then yes they should be allowed to use a different format such as MP3 instead.

    This is a good tool, something like this was eventually going to happen. Yes there may be the odd idiot who does things without permission but if that happens here then we can take action against that.
     
  9. Deactivated Account

    Deactivated Account Well-Known Member Exiled

    Joined:
    Aug 26, 2016
    Messages:
    244
    Yes, many people are free to use this tool, that is a thing that since now, we must pay attention to that. Always there was and there are idiots that, make that shit from steal private contents, but always those things are present.
    I hope that if this back to happen, the admin takes the correct punishment, btw...
    @Ivan YO : I tried to convert songs from Sub-Terrania and Ys III and the results are good, games from Zyrinx driver, has got some glitches with the multiple of the instruments, but some games, the PSG volume coordination flags, go up sometimes or are out of place, Vibrato effect in FM Drums are absent, but I like it really.
     
  10. Ivan YO

    Ivan YO Well-Known Member Member

    Joined:
    Jan 23, 2012
    Messages:
    63
    I will not do that, because it's complexly and I am too lazy for this. The biggest thing I will do is insert SMPS Optimizer into the vgm2smps.

    This is a bug, that I (currently) don't know how to fix.
     
    Deactivated Account likes this.
  11. Samey

    Samey Le Bored Hedgie Member

    Joined:
    May 3, 2017
    Messages:
    57
    Absolutely Love this program.
    Finally I'm going to be able to add custom music to my hack since I simply couldn't figure out the other options.
    I also have a lot more experience with Defle than Modplugtracker so this is a god send!

    Though theres a problem where one of the psg channels gets out of sync, and the other cuts out eventually.
    The Fm channels play fine its just the Psg.
    the zip also has the converted file (its replacing the title screen music because I want to hear it almost as soon as the game starts and just sit in the level select to listen to it all)
     

    Attached Files:

    Ivan YO and ProjectFM like this.
  12. Deactivated Account

    Deactivated Account Well-Known Member Exiled

    Joined:
    Aug 26, 2016
    Messages:
    244
    But the conversions, in the majority of the vgz/vgm, works good, also I converted songs from Contra: Hard Corps, Battletoads Double Dragon, Sunset Riders, Madou Monogatari and some games using GEMS driver and the results are amazing.
     
    Ivan YO, Samey and EMK-20218 like this.
  13. Sleekflash-16

    Sleekflash-16 Also known as Original Chris Member

    Joined:
    Dec 13, 2020
    Messages:
    19
    For anyone who is having issues with their songs made in Deflemask going out of sync after being converted using vgm2smps for use with Sonic 1, I may have found a way around it. Try setting "Step" to 0 in Deflemask right before exporting the VGM file. After exporting, convert that file with vgm2smps like normal. I had an issue with my songs where the PSG would go out of sync in game, which seems to be a common problem. Doing this completely fixed it for me.

    Note that Deflemask seems to change the "Step" setting to 1 by default after each startup and every time a song is loaded. So if you wanna try this, again, double check to make sure that it is set to 0 before exporting the VGM file.

    Hopefully this helps anyone out there who is having this problem.:D
     
    Samey, KCEXE, DeltaWooloo and 3 others like this.
  14. Chron Dafter

    Chron Dafter Newcomer Member

    Joined:
    May 8, 2020
    Messages:
    16
    As a deflemask user, this helps a lot lol. thx
    Now's too late to ask, probably, but when I convert a vgm exported from deflemask, it exports a broken smps file.
    The file won't even play and other programs like SMPSConv won't recognize it, saying something like "No valid SMPS file"
     
  15. Sleekflash-16

    Sleekflash-16 Also known as Original Chris Member

    Joined:
    Dec 13, 2020
    Messages:
    19
    I just found out something related to a problem with vgm2smps. I'm hoping this will help the devs fix issues with the program. For a while, all of my songs made in Deflemask had an issue where the PSG noise would get quieter on every loop. I think I figured out what is causing this. Deflemask has a position jump command named 0B and you have to assign a number indicating what part of the song, or pattern position, you want the song to start from after it loops. For example, 0B 01. Vgm2smps does comply with this command accordingly. However, it also seems to misinterpret the number as volume down for SN4 which is the channel for the noise. So when the code is set to 0B 01, vgm2smps will not only loop the song as it should, but it will also bring the PSG noise down by 1 on every loop which I don't think is supposed to happen. As far as I'm aware, the only way around this is to set the code to 0B 00 which makes the song loop from the very beginning.
     
    JGamer2151 likes this.
  16. Sleekflash-16

    Sleekflash-16 Also known as Original Chris Member

    Joined:
    Dec 13, 2020
    Messages:
    19
    I figured out a fix for the PSG getting quieter after every loop. Unfortunately, it requires the bin file to be converted to asm. Otherwise, you can't get into the code. After doing so, I changed the value right above "Jump To location" to $00 for both PSG 1 and PSG 2. Now the PSG volume is staying where it should be. I even ran the timer out in Sonic 1 and I have not heard any volume changes.
     

    Attached Files:

    Last edited: Mar 17, 2022
    JGamer2151 likes this.