vgmrips

The forum about vgm files
It is currently 2018-02-22, 14:27:25

All times are UTC + 1 hour [ DST ]




Post new topic Reply to topic  [ 23 posts ]  Go to page 1, 2  Next
Author Message
PostPosted: 2016-05-09, 0:38:20 
Offline

Joined: 2016-05-09, 0:19:46
Posts: 6
Location: England
Hi, I've just spent the last week creating a program to convert VGM into MIDI with voices in SYX for the Yamaha FB-01 that I just bought!
It also creates OPM files for VOPM.

The idea is that the MIDI generated has its instrument numbers match the SYX or OPM voice numbers, so you can simply load the SYX into your FB-01 or import the OPM into VOPM and then play the MIDI file to it and it will simply just work!

It maximises all the voices volumes, it uses the algorithm to determine which operators' TL value to pay attention to (the carriers and not the modulators).
It then finds the lowest TL in this group of carriers and then subtracts that value from all of the carriers.
The cool thing is this amount can then be used for the midi's volume command (with some maths to do db to gain)
It also helps when comparing voices to find duplicates.

I tested my program thoroughly with my FB-01, there were loads and loads of snags on the way.
It's been quite tough to get everything right.

A couple of things I learnt...
1. The operator order of the YM2151 registers is different than the FB-01 (and OPM files too)
2. You must set the modulator/carrier flag on the FB-01, otherwise volume dosent work!

The tool lacks proper Windows style, i.e no menu strip or proper file open dialog, theyre are easy to add, but not done yet.
The tool wont open VGZ files (yet!)
I haven't added support for L/R pan yet.

I am struggling pinning down a problem when converting Street Fighter II - Ken, the bell sounds seem all wrong, but all my other tunes seem spot on, anyone care to test this for me?

I have attached a zip file with source, the exe is in bin\Debug

My thanks to:
Paul Jensen for vgm2mid 0.5 (dunno if this an old version, I downloaded it years ago)
Martin Tarenskeen for TX convert (I found 2 little bugs in this BTW which I have fixed in my code)
Luke McQueen for his arcade OPM collection

Without these people and their hard work, there is no way I could have done this.


09/05/16 Fixed a sysex writing bug and file open bug, zip file re-uploaded
17/05/16 Changed note decoder function to work a different way to try and fix dropped notes, zip file re-uploaded
25/12/17 File re-uploaded
29/12/17 Added the ability to change the BPM and TQN


Attachments:
VGM_to_MID.zip [101.05 KiB]
Downloaded 140 times


Last edited by Yarm on 2017-12-29, 14:06:24, edited 6 times in total.
Top
 Profile  
 
 Post subject:
PostPosted: 2016-05-12, 10:58:11 

Musicians Musicians
Contributors Contributors
Online

Joined: 2012-09-29, 11:45:48
Posts: 215
Location: Australia
Haven't tried this out yet but whoa the premise of this is NEAT!

_________________
-dj.tuBIG/MaliceX


Top
 Profile  
 
 Post subject:
PostPosted: 2016-05-17, 16:48:47 
Offline

Joined: 2014-12-30, 1:38:48
Posts: 68
Doesn't seem to work for all arcade VGMs like Power Drift.


Top
 Profile  
 
 Post subject:
PostPosted: 2016-05-17, 18:01:25 
Offline

Joined: 2016-05-09, 0:19:46
Posts: 6
Location: England
Whats it doing?
I've just give it very quick try with 2 of the tracks from power drift and it seemed to work for me.
It might be that power drift also uses the Sega PCM chip and uses it for the bulk of the music, my program will ignore anything that isn't YM2151.


Top
 Profile  
 
 Post subject:
PostPosted: 2016-05-17, 18:31:55 
Offline

Joined: 2014-12-30, 1:38:48
Posts: 68
After converting Side Street to MIDI, it sounds like it didn't capture all channels when imported to FL Studio or other MIDI studios.


Top
 Profile  
 
 Post subject:
PostPosted: 2016-05-17, 21:01:52 
Offline

Joined: 2016-05-09, 0:19:46
Posts: 6
Location: England
I have just tried it again and it sounded like it was dropping notes so I have re-written the note decoder function in a different way and its seems better to me.
I've not used FL Studio before so am not sure if something else is happening too.
Please try it out and let me know if its better.

Edit: It seems to have fixed Street Fighter II - Ken 1 too (as I mentioned in my first post) :)


Top
 Profile  
 
 Post subject:
PostPosted: 2016-05-17, 23:49:39 
Offline

Joined: 2014-12-30, 1:38:48
Posts: 68
Still sounds like the piano channel has been multiplied about four times.


Top
 Profile  
 
 Post subject:
PostPosted: 2016-05-18, 17:13:44 
Offline

Joined: 2014-12-30, 1:38:48
Posts: 68
Hello again. Please also get other platforms to work, like PC Engine, PC-98 and others.


Top
 Profile  
 
 Post subject:
PostPosted: 2016-05-18, 20:29:51 

Staff Staff
Programmers Programmers
Contributors Contributors
Ball Fondlers Ball Fondlers
Offline
User avatar

Joined: 2014-01-28, 5:51:54
Posts: 578
Great job, Yarm.

_________________
If you like this post, give it a big thumbs up and hit that subscribe button down below! And as always, thanks for reading, and see you next post.


Top
 Profile  
 
 Post subject:
PostPosted: 2016-06-01, 20:53:52 
Offline

Joined: 2016-05-09, 0:19:46
Posts: 6
Location: England
Thanks :)
I hope it proves useful to some people.
It would be nice to hear off anyone that has got some good results from this.


Top
 Profile  
 
 Post subject:
PostPosted: 2017-02-15, 1:11:39 
Offline

Joined: 2014-12-30, 1:38:48
Posts: 68
*bump*

I decided to let you know the differences between MDX converters and VGM converters. See if OKI M6295 channels in MIDI form can be converted as well.

MDXPG seems to convert better, so why not look at the structural differences between MDX and VGM files.


Top
 Profile  
 
 Post subject:
PostPosted: 2017-02-15, 19:34:16 

Contributors Contributors
Staff Staff
Offline
User avatar

Joined: 2013-07-17, 23:32:39
Posts: 262
MDX format uses the MSM6258 (used in the X68000) while VGM files support both the 6258 and MSM6295 (Used in arcade machines). The chips work differently, the 6258 reads streamed APDCM data while the 6295 reads data from a ROM. In the case of the 6295 it would be pretty easy to both rip samples and convert commands to MIDI.

For the 6258 this is much harder, it's hard to detect where a sample begins and where it ends. Fortunately, Valley Bell has spent a lot of effort into optimization and the optimized VGMs should contain at least some data (DAC stream commands) that might help with conversions. But it might not be perfect...


Top
 Profile  
 
 Post subject:
PostPosted: 2017-02-15, 21:29:43 
Offline

Joined: 2014-12-30, 1:38:48
Posts: 68
Indeed. There's a tROMbone app that's made to rip OKI6295 samples, but I can't seem to rip from Hotdog Storm nor Hyper Duel.


Top
 Profile  
 
 Post subject:
PostPosted: 2017-02-15, 22:29:30 

Contributors Contributors
Staff Staff
Offline
User avatar

Joined: 2013-07-17, 23:32:39
Posts: 262
Well if you just want the samples, you can open the VGM file (make sure it's uncompressed first!) in Audacity. Import as raw, when it prompts you for the file format, select VOX ADPCM.


Top
 Profile  
 
 Post subject:
PostPosted: 2017-02-17, 19:16:38 
Offline

Joined: 2014-12-30, 1:38:48
Posts: 68
Fails like tROMbone. Perhaps not perfect ROM dumps?


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 23 posts ]  Go to page 1, 2  Next

All times are UTC + 1 hour [ DST ]


Who is online

Users browsing this forum: No registered users and 3 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group