Vgm spts
VGM Splitter (Sample Edition)
This tool splits a VGM file into smaller pieces. This is useful if you recorded many songs to one file (e.g. in MAME/MESS). You can also use it to quickly trim beginning silence from individual tracks (see caveats below), but please note tags from the source VGM won't transfer to the split ones. If you goofed, use vgm_tt to transfer tags.
The difference from vgm_sptd is, you must enter the sample(s) where you want to split the file. As you proceed, the "current sample" value can be higher than the sample value that was entered previously. That's normal because it won't split inside a delay. That is: the delay (Wait command) where a file is split is stripped, so you should have no silence at the beginning or end of the split files.
Entering 0
(simply pressing enter without typing has the same effect) closes the program. To get the last part of the VGM, you must enter -1
, which will collect it and then close the program.
You can specify all split points at once on the command line. Example:
vgm_spts Stream.vgm 44100 176400 -1
This will split at sample 44100
and 176400
, then create a third vgm which contains the remaining data.
You can also end in 0
instead of -1
:
vgm_spts Stream.vgm 44100 176400 0
After splitting at 44100
and 176400
, this will then end the program. If the command ends without -1
or 0
, vgm_spts will wait for another input after splitting.
(Note that you can auto-remove the split files' suffixes with vgm_name if need be, though you'll have to move/remove the original or split file first. The use case isn't common, but does exist.)
Normally, to quickly remove starting silence with a compatible track you can use a low number like 100 to start with, then -1. If that doesn't work, try vgm_sptd. Or, if both programs trim silence that's part of the song when played in game, you might need to record the track on its own and manually trim the start point with vgm_trim.
If there are cut notes or no notes in the split track, try the -state
option. This isn't considered ideal, though.