FMDrive VST (YM2612) and SPSG VST (SN76489 PSG) MIDI 2 VGM Converter Tools !

Convert your FMDrive VST + SPSG VST Tracks to VGM

For VST FMDrive (Megadrive / Genesis FM Synth) and SPSG (PSG SN76489 chip) users


DOWNLOAD THE CONVERTERS PACK

I never found the time to make some proper info and tutorials regarding the usage of these geeky tools so I decided to make a release of my custom package anyway and do tutorials later, at least it is usable with a bit of reading :D
 
The FMDrive MIDI, + SPSG MIDI compositions to VGM file converters are still beta but 99% stable.
The format do not support yet CSM or Special Channel Mode conversion but every other things works, including logging FM registers automation! same for PSG.
DAC PCM files are converted the same way.
That means that you can have a portable hardware compatible version of your composition and eventually listen to it on the console hardware itself...
Huge thanks to ValleyBell from VgmRip for the code works, source code and additional info are also available and open sourced directly at VGMRIP

What  is it?

Keep in mind these are not a "one click done" converters and that they need a bit of "geek power" in order to use them properly but you are probably kind o' nerdy anyway if you are reading this...

These are converters that will take MIDI data as input and specific soundchip parameters and output a compressed widely popular format for chiptune called VGM, While VGM is not really a "machine ready" code there are some converters that let you embed a VGM player into a ROM file, hence it makes your track playable on the real console.
The real advantage of this converter is that it will translate complex FM register automation from FMDrive that you did in your DAW into the VGM. This allows to translate pretty much any musical expression that you have recorded while performing in real time! which was something nearly impossible to translate properly using only trackers or machine code.

Converting Super PSG VST tracks - Midi to VGM -SN76489

Basically you will need a DAW that let you record the MIDI output from SPSG VST.
SPSG VST, once MIDI output enabled, will write MIDI data for Volume envelope and Pitch, including arpeggios and pitch envelope.
A text file is provided into the package with some more infos.
You have to use CC#7 for volume data to work with the converter. Pitch if any will be sent automatically via MIDI out


Here is a video that shows the process from scratch in Cubase, it should be similar in other DAWs, it is somewhat long but once you did it once you can save a template in your DAW to do things fast :D


Also ,contrary to what is in the video, there is no need anymore to write RPN parameters for pitch, you only need to write CC#6 value = 48 at the beginning of the MIDI track that is using some pitch (bend, vibrato or pitch envelope) (SPSG use the whole range to write pitch data)


SPSG 2 VGM small Tutorial Video

 Supported MIDI Controllers (MIDI CC#)

The converter will respond to:
CC7    Main Volume 


CC10    Pan


CC16    General Purpose #1    select Noise Mode
                0-63 - white noise
                64-127 - periodic noise


CC17    General Purpose #2    set PSG 3 frequency Noise Mode

(Noise Frequency controlled by PSG 3 Frequency)
                0-63 - disable

                64-127 - enable (in this case transpose the notes to -48 semitones, 4 Octaves lower, if you use SPSG)


 You will use mainly this setting on the converter:

disable GG (for GameGear) stereo if you plan to make a fusion with an FM only VGM in order to have a full Megadrive tracks (the PSG is mono only on the Megadrive) and use a Custom Clock if you have used something else in SPSG VST.

The MIDI channel mapping should be:

MIDI ch1 for PSG ch1
MIDI ch2 for PSG ch2

MIDI ch3 for PSG ch3
MIDI ch4 for PSG ch4 (Noise)

To sum up:

  • Make a track using one instance of SPSG per channel (not needed but makes thing clearer)
  • Respect the real limitation (3 mono channels at the same time + 1 noise channel) if you are recording from live input make sure to clean up your recorded note to avoid overlapping notes (Cubase again as a neat tool to do this) the converter will do this for you but you have no control over it... the only time you will be allowed to use chord in one channel only is by using the 2nd arpegiattor (MIDI arp in SPSG)
  • Once recorded, set each SPSG instance to MIDI out enable, Volume on CC#7
  • Open some MIDI tracks and set their input to be the corresponding instance of SPSG and fire play/record
  • Next merge the MIDI notes with the Volume/Pitch Data tracks you have just recorded
  • Make sure each channel is set to the correct MIDI channel and export the MIDI file
  • Load the MIDI file into the converter, adjust settings and click CONVERT :D
 You then have a PSG VGM that you could also later combine with and FM VGM (made with FMDrive VST) using the vgmmerge tool (see bellow)


Converting FMDrive VST tracks - Midi to VGM -YM2612

Basically you will need a DAW that let you record the MIDI output from FMDrive VST.
If you do not use registers automation you can go on, if you plan to do, you have to load first the GenMDM preset first (included into the converter pack), this is an INIT preset that will also map each controls to the appropriate MIDI Control Change number to use the converter.
A text file is provided into the package with some more infos.

I will make a video soon anyway!
 

1st Example without automation

So here we go, first fire your DAW and load 2 instances of FMDrive for a start.
Make sure to load the GenMDM preset first to replace the Init preset, the mapping will remain even if you change presets.
Now make a nice bass sound or import a tfi preset as a basis and tweak it, record a part, make sure it is mono. If you plan to have chords you have to split it onto multiple channels, one note per channel (there are some free MIDI plugins that would do that for you :) I will find the name and put a link here later)
Once done make sure to save your preset as a .tfi somewhere (you can save it in the converters TFI folder for example)

Now do the same with the other instance of FMDrive, do whatever you want but make sure it is mono.

You should now have 2 tracks and have saved 2 tfi presets.

Now it is time to configure the presets for the converter, for that you will use 2612edit.exe
Basically you will have the option to attach your presets to MIDI patch numbers, in GM MIDI the first patch is named : Acoustic Grand Piano so let's say you have saved a preset called Ch1.tfi you need to attached that .tfi preset to Acoustic Grand Piano (MIDI program 1) so when the converter will process your exported MIDI ans see Midi Program 1 attached to a channel it will use the .tfi preset.
It is a bit hard to understand at first but very easy in use.


Process like this >> 2612edit.exe>> import instrument from file>> select TFM/VGI instrument(*.tfi,*.vgi)>> go to your preset folder double click on the .tfi and click OK



 Next select the mapping for Acoustic Grand Piano and select your tfi preset that is already loaded into the bank.
 

 Next repeat the process and import your second preset into the bank, then select the second MIDI instrument "Bright Acoustic Piano" and map it to your second freshly imported tfi preset.

 Next save this bank as Instruments.gyb (overwrite the existing one) this bank will be used by MIDI2VGM.

Now it is time to set up your MIDI file in your DAW.
Basically at this point you have 2 FMDrive channels with MIDI notes, save your song just in case.
Now for a cleaner view open 2 new MIDI only tracks and copy the MIDI notes part of each FMDrive channel to its respective MIDI channel.
At this point you can get rid of the FMDrive VST instances.
You should only have 2 MIDI tracks left.
Let's adjust the MIDI parameters of the MIDI channels, set one to output on MIDI channel 1 and the other to MIDI channel 2, set the first track to the first MIDI program 1 (or 0 depending on the MIDI implementation of your DAW) and the second track to MIDI program 2 (or 1 if the first was 0)
By doing this, if you are still following, the first program will be mapped to the first tfi preset and so on, this is the mapping we did in 2612.exe

(If you have used any pitchbend make sure to add CC#6 with a value corresponding to the pitchbend range set in FMDrive for that track/channel) basically add a MIDI event at the beginning of the channel: CC#6 value= 12 (if pitchbend was 12 semitones)
This is also a good time to verify any PAN parameter.

Now you are ready to export the MIDI file, once done copy the MIDI file in the same folder as midi2vgm.exe then launch midi2vgm.exe and load your MIDI file.

Set it like so: GenMDM Controllers ticked, volume slider to 127.
Select your MIDI file and first make sure no channels have overlapping notes by clicking on "Force Note Off if..."
Now click Convert and...WAIT it IS SLOW that's Vintage ahaha :)




Done, the VGM should be next to your original MIDI file.


2st Example with automation 

Remember to first load the GenMDM preset before creating any sound! (you could also simply MIDIlearn manually the parameters you are planning to use using the provided MIDI CC MAP in the converter pack...)
Make sure you save your sound as a tfi preset BEFORE you applied any automation, this will make sure your starting point is still the same. 
Now let's use the same track or make another one but let's record some registers automation, like Modulator operators levels :), write some crazy automation or use the FMDrive GUI and move sliders while recording automation.
Once done, repeat the process above.

PS: remember that using automation will create a lot of busy state for the real hardware YM2612 so stay gentle if you plan to use it alongside a lot of PCM samples and the whole 5 channels.

3rd Example with DAC and PCM samples (.Wav)

You can use the DAC channel to have samples playing, again think of it as mono, one sample at the time.

You can use the same samples you are using in FMDrive with the DAC function. So let's make a drum track with FMDrive using the DAC, import 2 samples into SLOT1 and SLOT2, let's say kick and snare, make a beat.
Save this as MIDI with the channel set to 10 (see above)
now copy your .wav samples you used into FMDrive into the DAC folder of the converter and edit the DAC.ini file with a text editor and use this code: ( the H24, H26 are Hexadecimal notation for MIDI notes btw)
; Bass Drum H
[&H24]
File = DAC\YourKickFileName.wav
Freq = 0


; Snare Drum M
[&H26]
File = DAC\YourSnareFileName.wav
Freq = 0

Now convert your MIDI file with mid2vgm.exe, it is by default set to search for DAC on channel 10 and disabling channel 6 FM part (you now about this if you know YM2612) 

To sum up you can use all of the above together to convert a full blown 5 FM channels + 1 DAC channels track.

 Again I will make some video for it, I know it is not the easiest thing but you should make it work with a bit of use.

Please do not ask for much support as it is a free set of tools and I am MEGAAAAAAAAAAAAAAAAAA (say it reaching a very high note)  busy, so if any questions make sure you tried everything before sending mails :D

 

Merging FM & PSG

You can merge the FM part made with FMDrive VST and the PSG part made with SPSG VST to make a complete Sega Megadrive Song, the tool in use is vgmmerge.exe, it will merge both VGM.

To edit your VGM files (naming etc) use VGMtool.exe
(infos inside)


 More info will come next regarding how to play a VGM onto the real console...
That was a long post!




Comments

Post a Comment

Popular Posts