Skip to content

Instantly share code, notes, and snippets.

@superctr
Created March 16, 2017 15:24
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save superctr/e5211a07d2017ce6fa23b8e8471fcfad to your computer and use it in GitHub Desktop.
Save superctr/e5211a07d2017ce6fa23b8e8471fcfad to your computer and use it in GitHub Desktop.
packgen
@echo off
rem forfiles /m *_trimmed.vgm /c "cmd /c echo @file"
del *_optimized_optimized.vgm
forfiles /m *_trimmed.vgm /c "cmd /c vgm_sro @file"
forfiles /m *_trimmed_optimized.vgm /c "cmd /c vgm_cmp @file"
set "gamename=Game name"
set "fgamename=Game name (Without illegal filename characters)"
set "gamenamej=JP Game name"
set "author=Composer name"
set "authorj=JP composer"
set "year=1989-06"
mkdir "%fgamename%"
cd "%fgamename%"
del "*.vgm"
del "%fgamename%.m3u"
cd..
FOR %%G in (*_trimmed_optimized_optimized.vgm) do (
vgm_tag -Author:"%author%" -AuthorJ:"%authorj%" -Game:"%gamename%" -GameJ:"%gamenamej%" -Year:"%year%" -System:CPS -Creator:"Your name" "%%G"
)
rem tag <sound test code> <track no> <japanese title> <english title>
call:tag 11 01 "Song 1" "Song 1 JP Title"
call:tag 1f 02 "Song 2" "Song 2 JP Title"
call:tag 13 03 "Song 3" "Song 3 JP Title"
cd "%fgamename%"
dir *.vgm /b /on > "%fgamename%.m3u"
cd..
vgm_stat "%fgamename%\%fgamename%.m3u"
goto:eof
:tag
set "str=%~3"
rem set str=%str: ;=''%"
set "str=%str:&#58;= -%"
set "thecode=%~1"
vgm_tag -Title:"%~3" -TitleJ:"%~4" -Notes:"Sound ID: %thecode%" "%thecode%_trimmed_optimized_optimized.vgm"
copy /B "%thecode%_trimmed_optimized_optimized.vgm" "%fgamename%/%~2 %str%.vgm"
goto:eof
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment