vgm_spts

From vgmrips

VGM Splitter (Sample Edition)

This tool splits a VGM file into smaller pieces. Splitting is useful in two cases:

  • If you recorded many songs to one file (e.g. in MAME/MESS).
  • To quickly trim beginning silence from individual tracks by using a very low split sample (like 100).
    • Tags written to the source VGM won't be copied to the split ones. Use vgm_tt or manual copying to transfer tags as needed.
  • In both cases, intentional leading silence in tracks will sometimes be kept, but not always.


Should vgm_spts trim intentional silence, which is in fact 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.

Usage

Drag and drop a VGM to be prompted for a sample number (location in the recording). Unlike vgm_sptd, you are entering the sample(s) where you want to split the file.

After each entry, the "current sample" value can be higher than the sample value entered before. That's normal because splitting won't happen inside a delay. In other words, the delay (Wait command) in which a file is split is stripped completely, so you should have no silence at the beginning or end of the split files.


Entering 0 closes the program. (Pressing enter without typing has the same effect.) To get the last part of the VGM once you have finished entering split samples, you must enter -1, which will collect the remainder and then close the program.

Command line usage

You can specify all split points at once on the command line. Example:

vgm_spts enter_your.vgm 44100 176400 -1

This will split into two VGMs cut at samples 44100 and 176400, then create a third vgm which contains the remaining data.

You can also end in 0 instead of -1:

vgm_spts enter_your.vgm 44100 176400 0

After splitting at 44100 and 176400, this will then end the program.

Note: If the command ends without -1 or 0, vgm_spts will wait for another input after splitting.


To try to quickly remove starting silence from a recording of a single track:

vgm_spts enter_your.vgm 100 -1

If that doesn't work, try vgm_sptd.

Note: The above should create two VGMs, the latter containing the track with no leading nor trailing silence. You can delete the stub VGM, move the original or split file elsewhere, and get rid of the _suffix quickly with vgm_name.