Offline

I have a folder full of .opm's that I'd like to convert to .tfi's for use in VGM Music Maker 1.1.

I am trying to make this as easy as possible with this batch file:

for /r c:\users\rob\desktop\opms2 %%g in (*.opm) do c:\users\rob\desktop\vopmxtfi.exe %%g

I think there is a problem with the vopmxtfi.exe because it reports "OK: 0 instruments were converted successfully" and creates a file of the same name with no extension alongside each .opm. No instrument x.tfi's as you would expect...

However, if I drag each .opm onto vopmxtfi.exe, it works as expected. I can even drag it onto a batch file like: c:\users\desktop\rob\vopmxtfi.exe %1
and it will also work.

Anyone here that can script up a workaround to this? I feel like it has something to do with the way each .opm is being fed into vopmxtfi.exe. Maybe some extra code would do it, but I'm not good enough with scripting.


Or is there a way to extract each patch from a .vgm file?

Basically, I just want some way to get all of these patches out of there, in whatever format VGM Music Maker will accept. And I want them all converted at once.

Offline

I decided to use the vgm2tfi.exe tool and manually drag the contents of each folder onto it. Two hours later.. haha

If anyone is interested in the resulting 32,000+ patches from 639 games, you may download it here: http://dl.dropbox.com/u/4117079/TFI%20patches.rar
There shouldn't be duplicates on a per-folder basis, but I'm really not sure about the entire collection. Also, I noticed a couple of games that spit out hundreds of patches. Not sure if that was a glitch in vgm2tfi or what, but yeah.

I hope this useful to anyone at all.


On a side note, I think it would be cool if someone could figure out how to write an algorithm to determine what type of patch each .tfi is (brass, guitar, bass, bells, etc) based on the register data or w/e, and organize them into folders accordingly, with the name of the game and song still intact somehow. Idk, just an idea that was floating around in my head.

Anyway, have fun! I know I will.

Offline
FRANCE

Indeed that would be rad ! nice to share smile
I am actually working on a The FMDRIVE YM2612 VST emulation & improvement of the sega megadrive soundchip that is aimed toward easy sound design and work free from the trackers in any DAWs on Windows, I mean you know...VOPM & VGMM are great but lacks in easy engaging GUI for sound designing.
That is the reason I have not implemented and import function for opm,tfi etc FM instruments formats...then you will have to manually enter parameters from OPM files or VGM dumps if you want to copy instruments, Not to hard, it is done in 2 min ;p .
Rather an interesting approach is to start tweaking from scratch with basic FM knowledge and experiment from there smile
The best part is that it will be compatible with the real hardware, acting as a controller for the GENMDM midi interface
anyway thank you! and check it out
cheers
http://www.youtube.com/watch?v=nxAKR9f4 … TdnhRvNBIq

Offline
Aly James wrote:

Indeed that would be rad ! nice to share smile
I am actually working on a The FMDRIVE YM2612 VST emulation & improvement of the sega megadrive soundchip that is aimed toward easy sound design and work free from the trackers in any DAWs on Windows, I mean you know...VOPM & VGMM are great but lacks in easy engaging GUI for sound designing.
That is the reason I have not implemented and import function for opm,tfi etc FM instruments formats...then you will have to manually enter parameters from OPM files or VGM dumps if you want to copy instruments, Not to hard, it is done in 2 min ;p .
Rather an interesting approach is to start tweaking from scratch with basic FM knowledge and experiment from there smile
The best part is that it will be compatible with the real hardware, acting as a controller for the GENMDM midi interface
anyway thank you! and check it out
cheers
http://www.youtube.com/watch?v=nxAKR9f4 … TdnhRvNBIq

Wow, holy mackerel. That thing is legit. I liked the SSG video. Very nice how you can simply use a single instance of that VST to create a whole track. The presentation is amazing as well; that 3D effect was nice. This thing wouldn't be able to output a VGM format or some sort of raw data, would it? One reason I'm trying to get the hang of the tracker is that I would like to be able to put music into real homebrew, in the future.

Offline
FRANCE

Do not need necessary trackers...You could use midi2vgm...to translate your track to VGM format, with a lot of work indeed. with it You can assign some instruments parameters with an editor ( loads/import every format ) to classic midi program, like said : my custom instruments = Midi Acoustic Grand piano and convert a midi file to a VGM from there smile homebrew ready
http://forums.sonicretro.org/index.php? … ntry604458

"Very nice how you can simply use a single instance of that VST to create a whole track"
in fact not really, the FMDRIVE YM2612 VST is able to output only one channel at a time, so you just load multiple instances and freeze, unfreeze them to edit smile of course you can also do it the tracker way as you can switch program changes and switch from FM to DAC on one channel like say : FM bass/program change/DAC hihat/Program change/ anoher FM sound/DAC snare samples etc...you also have the choice to be polyphonic thus removing the mono channel limitation...
++

Offline
ad-hell-aide

I'm currently writing a tool that converts .OPM to GenMDM. This tool will likely include batch processing.

I can probably add support for .TFI files... let me get it working with GenMDM .genm files first, and I'll go from there smile

Offline
ad-hell-aide
robugaa wrote:

On a side note, I think it would be cool if someone could figure out how to write an algorithm to determine what type of patch each .tfi is (brass, guitar, bass, bells, etc) based on the register data or w/e, and organize them into folders accordingly, with the name of the game and song still intact somehow. Idk, just an idea that was floating around in my head.

How about a .VGM file that plays demo notes for all patches in a file?

Offline
FRANCE

+1

Offline

That all sounds nice.

Offline
Paris, France

Thank you Robugaa for this massive patch collection, gonna make good use of it smile

Offline
robugaa wrote:

On a side note, I think it would be cool if someone could figure out how to write an algorithm to determine what type of patch each .tfi is (brass, guitar, bass, bells, etc) based on the register data or w/e, and organize them into folders accordingly, with the name of the game and song still intact somehow. Idk, just an idea that was floating around in my head.

Would sure beat having to manually categorize them like I had to do for my Sonic 1 soundpack release. Link:
http://metropeak.ca/packs/[SotXB]%20[Vol.01]%20Sonic%20the%20Hedgehog%201/index.html
(silly messageboard keeps breaking the link, copy and paste the whole thing, same for the link below)

I did use scripts to break apart the OPMs and in the process remove duplicates which helped.

Anyway, I'm actually having trouble myself converting the OPMs I released there into TFIs. vopmxtfi.exe gives me the same "0 instruments converted" error - even with single OPMs, is there something wrong with the format of these files? This is a sample file: http://metropeak.ca/packs/[SotXB]%20[Vol.01]%20Sonic%20the%20Hedgehog%201/A-LEADS/Accordion%20%28MZ%234%29%20%28CREDITS%2313%29.opm

Something I'm missing? Perhaps something wrong with the format?

Last edited by metropeak (Feb 7, 2013 12:53 am)

Offline

Yeah there must be something wrong with that .opm or maybe even the vopmxtfi.exe tool. If you can get ahold of a .vgm that has what you need I recommend using the vgm2tfi.exe tool. That's what I used.

http://www.mdscene.net/md/shiru/vgm2tfi.zip


By the way, your site is very cool. I like the previews!!

Offline

Thanks for the comments!

But yeah, I was hoping to avoid extracting them from the VGM again, since I'll have no way to match them up with my already extracted, split and sorted OPMs...

Offline

Well, if we can't rule out the possibility of vopmxtfi.exe being broken, then someone will have to create a new version of it...Wasn't .tfi, Shiru's specification? I wish I knew more about it, myself.

Offline
metropeak wrote:

Thanks for the comments!

But yeah, I was hoping to avoid extracting them from the VGM again, since I'll have no way to match them up with my already extracted, split and sorted OPMs...


Aha.... I solved your problem.

When opened in a text editor. your .opm looks like this:

//MiOPMdrv sound bank Paramer Ver2002.04.22
//LFO: LFRQ AMD PMD WF NFRQ
//@:[Num] [Name]
//CH: PAN    FL CON AMS PMS SLOT NE
//[OPname]: AR D1R D2R    RR D1L    TL    KS MUL DT1 DT2 AMS-EN

@:0 Instrument 0
LFO: 0 0 0 0 0
CH: 64 4 2 0 0 120 0
M1: 3 0 3 15 1 30 0 10 3 0 0
C1: 18 19 2 15 1 24 0 3 4 0 0
M2: 18 19 2 15 0 38 0 5 3 0 0
C2: 17 0 1 15 0 22 0 1 4 0 0

Apparently, the .opm file must have 128 banks defined in it. So I opened up an .opm that converted successfully and found that after all of their defined instruments, the rest of the bank looked like this:

@:1 no Name
LFO: 0 0 0 0 0
CH: 64 0 0 0 0 64 0
M1: 31 0 0 4 0 0 0 1 0 0 0
C1: 31 0 0 4 0 0 0 1 0 0 0
M2: 31 0 0 4 0 0 0 1 0 0 0
C2: 31 0 0 4 0 0 0 1 0 0 0

@:2 no Name
LFO: 0 0 0 0 0
CH: 64 0 0 0 0 64 0
M1: 31 0 0 4 0 0 0 1 0 0 0
C1: 31 0 0 4 0 0 0 1 0 0 0
M2: 31 0 0 4 0 0 0 1 0 0 0
C2: 31 0 0 4 0 0 0 1 0 0 0

...... (all the way to 127)

@:127 no Name
LFO: 0 0 0 0 0
CH: 64 0 0 0 0 64 0
M1: 31 0 0 4 0 0 0 1 0 0 0
C1: 31 0 0 4 0 0 0 1 0 0 0
M2: 31 0 0 4 0 0 0 1 0 0 0
C2: 31 0 0 4 0 0 0 1 0 0 0

So simply filling up any unused slots with these should fix your problem.

So, here is the complete .opm file:
http://dl.dropbox.com/u/4117079/Accordi … %2313).opm

and here is the resulting .tfi file:
http://dl.dropbox.com/u/4117079/Instrument%200.tfi

Last edited by robugaa (Feb 13, 2013 8:18 pm)

Offline

Wow nice detective work - I owe you one dude! That thing sure is picky, that's great though, should be able to whip up a script to batch convert all my OPMs now and update my site, thanks big_smile