@echo off
echo Goldwave executable file: C:\Program Files\GoldWave\GoldWave.exe
set goldwavePath=C:\Program Files\GoldWave\GoldWave.exe
echo "
echo fsbank executable file: C:\GH\edit\fmod\tools\fsbank.exe
set fsbankPath=C:\GH\edit\fmod\tools\fsbank.exe
echo "
echo Where you want to store your new fsb files: C:\GH\currentProject\fsb
set songsDir=C:\GH\currentProject\fsb
echo "
echo Folder containing your DAT and WAD file: C:\GH\currentProject\music
set wadDir=C:\GH\music
echo "
echo StdDatEdit executable file: C:\GH\edit\StdDatEdit\StdDatEdit.exe
set StdDatEdit=C:\GH\edit\StdDatEdit\StdDatEdit.exe
echo "
echo "

echo 1. Opening Licks (Starting Out Small)
set songname=slowride
set importDir="C:\GH\1\iloverocknroll"
CALL :importNewSong

set songname=talkdirtytome
set importDir="C:\GH\1\iwannabesedated"
CALL :importNewSong

set songname=hitmewithyourbestshot
set importDir="C:\GH\1\thunderkiss65"
CALL :importNewSong

set songname=storyofmylife
set importDir="C:\GH\1\smokeonthewater"
CALL :importNewSong

set songname=rocknrollallnite
set importDir="C:\GH\1\infected"
CALL :importNewSong

echo 2. Axe-Grinders (Your First Real Gig)
set songname=mississippiqueen
set importDir="C:\GH\1\ironman"
CALL :importNewSong

set songname=schoolsout
set importDir="C:\GH\1\morethanafeeling"
CALL :importNewSong

set songname=sunshineofyourlove
set importDir="C:\GH\1\yougotanotherthingcoming"
CALL :importNewSong

set songname=barracuda
set importDir="C:\GH\1\takemeout"
CALL :importNewSong

set songname=bullsonparade
set importDir="C:\GH\1\sharpdressedman"
CALL :importNewSong

echo 3. Thrash and Burn (Making the Video)
set songname=whenyouwereyoung
set importDir="C:\GH\1\killerqueen"
CALL :importNewSong

set songname=missmurder
set importDir="C:\GH\1\heyyou"
CALL :importNewSong

set songname=theseeker
set importDir="C:\GH\1\stellar"
CALL :importNewSong

set songname=laydown
set importDir="C:\GH\1\heartfullofblack"
CALL :importNewSong

set songname=paintitblack
set importDir="C:\GH\1\symphonyofdestruction"
CALL :importNewSong

echo 4. Return of the Shred (European Invasion)
set songname=paranoid
set importDir="C:\GH\1\ziggystardust"
CALL :importNewSong

set songname=anarchyintheuk
set importDir="C:\GH\1\fatlip"
CALL :importNewSong

set songname=koolthing
set importDir="C:\GH\1\cochise"
CALL :importNewSong

set songname=mynameisjonas
set importDir="C:\GH\1\takeitoff"
CALL :importNewSong

set songname=evenflow
set importDir="C:\GH\1\unsung"
CALL :importNewSong

echo 5. Fret-Burners (Big House Blues)
set songname=holidayincambodia
set importDir="C:\GH\1\spanishcastlemagic"
CALL :importNewSong

set songname=rockulikeahurricane
set importDir="C:\GH\1\higherground"
CALL :importNewSong

set songname=sameoldsonganddance
set importDir="C:\GH\1\nooneknows"
CALL :importNewSong

set songname=lagrange
set importDir="C:\GH\1\aceofspades"
CALL :importNewSong

set songname=welcometothejungle
set importDir="C:\GH\1\crossroads"
CALL :importNewSong

echo 6. Face Melters (Hottest Band on Earth)
set songname=blackmagicwoman
set importDir="C:\GH\1\godzilla"
CALL :importNewSong

set songname=cherubrock
set importDir="C:\GH\1\texasflood"
CALL :importNewSong

set songname=blacksunshine
set importDir="C:\GH\1\frankenstein"
CALL :importNewSong

set songname=themetal
set importDir="C:\GH\1\cowboysfromhell"
CALL :importNewSong

set songname=prideandjoy
set importDir="C:\GH\1\barkatthemoon"
CALL :importNewSong

echo Tier 7 and 8 do not exist in GH1

echo Bonus Songs (Bonus Songs)
set songname=avalancha
set importDir="C:\GH\1\fireitup"
CALL :importNewSong

set songname=inthebellyofashark
set importDir="C:\GH\1\cheatonthechurch"
CALL :importNewSong

set songname=cantbesaved
set importDir="C:\GH\1\cavemanrejoice"
CALL :importNewSong

set songname=closer
set importDir="C:\GH\1\eurekaifoundlove"
CALL :importNewSong

set songname=dontholdback
set importDir="C:\GH\1\allofthis"
CALL :importNewSong

set songname=fcpremix
set importDir="C:\GH\1\behindthemask"
CALL :importNewSong

set songname=generationrock
set importDir="C:\GH\1\thebreakingwheel"
CALL :importNewSong

echo Song: callout missing

set songname=gothatfar
set importDir="C:\GH\1\decontrol"
CALL :importNewSong

set songname=hierkommtalex
set importDir="C:\GH\1\evenrats"
CALL :importNewSong

set songname=imintheband
set importDir="C:\GH\1\farewellmyth"
CALL :importNewSong

set songname=impulse
set importDir="C:\GH\1\flyonthewall"
CALL :importNewSong

set songname=inlove
set importDir="C:\GH\1\getready2rock"
CALL :importNewSong

set songname=mauvaisgarcon
set importDir="C:\GH\1\themefromguitarhero"
CALL :importNewSong

echo Song: hey missing

set songname=metalheavylady
set importDir="C:\GH\1\sailyourshipby"
CALL :importNewSong

set songname=minuscelcius
set importDir="C:\GH\1\thestoryofmylove"
CALL :importNewSong

set songname=mycurse
set importDir="C:\GH\1\trippolette"
CALL :importNewSong

set songname=nothingformehere
set importDir="C:\GH\1\graveyardshift"
CALL :importNewSong



:importNewSong


:importGuitarTrack
set guitarTrack=guitar.ogg
echo Converting guitar track
"%goldwavePath%" /process:GH3mono "%importDir%\%guitarTrack%"
echo Creating directory for guitar track
mkdir "%songsDir%\%songName%\guitar"
echo Moving and renaming guitar track to "%songsDir%\%songName%\guitar\%songName%_guitar.wav"
FOR /F "delims=." %%g IN ("%guitarTrack%") do set guitar=%%g
move "%importDir%\%guitar%.wav" "%songsDir%\%songName%\guitar\%songName%_guitar.wav"
echo Creating FMOD sound bank file
"%fsbankPath%" -o "%songsDir%\%songName%_guitar.wav.fsb" "%songsDir%\%songName%\guitar" -p cross -f adpcm -h


:importSongTrack
set songTrack=song.ogg
echo Converting song track
"%goldwavePath%" /process:Mix "%importDir%\%songTrack%" "-clipboard:%importDir%\%rhythmTrack%"
echo Creating directory for song track
mkdir "%songsDir%\%songName%\song"
echo Moving and renaming song track to "%songsDir%\%songName%\song\%songName%_song.wav"
FOR /F "delims=." %%g IN ("%songTrack%") do set song=%%g
move "%importDir%\%song%.wav" "%songsDir%\%songName%\song\%songName%_song.wav"
echo Creating FMOD sound bank file
"%fsbankPath%" -o "%songsDir%\%songName%_song.wav.fsb" "%songsDir%\%songName%\song" -p cross -f adpcm -h


:importRhythmTrack
set rhythmTrack=rhythm.ogg
echo Converting rhythm track
"%goldwavePath%" /process:GH3rhythm "%importDir%\%rhythmTrack%"
echo Creating directory for rhythm track
mkdir "%songsDir%\%songName%\rhythm"
echo Moving and renaming rhythm track to "%songsDir%\%songName%\rhythm\%songName%_rhythm.wav"
FOR /F "delims=." %%g IN ("%rhythmTrack%") do set rhythm=%%g
move "%importDir%\%rhythm%.wav" "%songsDir%\%songName%\rhythm\%songName%_rhythm.wav"
echo Creating FMOD sound bank file
"%fsbankPath%" -o "%songsDir%\%songName%_rhythm.wav.fsb" "%songsDir%\%songName%\rhythm" -p cross -f adpcm -h


:importPreviewTrack
echo Generating song preview
"%goldwavePath%" /process:Mix "%importDir%\%guitarTrack%" "-clipboard:%importDir%\%rhythmTrack%"
"%goldwavePath%" /process:GH3preview "%importDir%\%songTrack%" "-clipboard:%importDir%\%guitar%.wav"
cd "%importDir%"
del "%guitar%.wav"
echo Creating directory for preview track
mkdir "%songsDir%\%songName%\preview"
echo Moving and renaming preview track to "%songsDir%\%songName%\preview\%songName%_preview.wav"
move "%importDir%\%song%.wav" "%songsDir%\%songName%\preview\%songName%_preview.wav"
echo Creating FMOD sound bank file
"%fsbankPath%" -o "%songsDir%\%songName%_preview.wav.fsb" "%songsDir%\%songName%\preview" -p cross -f adpcm -h

:exportDatWad
echo Importing sound banks into DAT and WAD files
"%StdDatEdit%" "%wadDir%\%songName%.dat.ngc" "%wadDir%\%songName%.wad.ngc" -replace_qbkey %songName%_guitar "%songsDir%\%songName%_guitar.wav.fsb" -replace_qbkey %songName%_rhythm "%songsDir%\%songName%_rhythm.wav.fsb" -replace_qbkey %songName%_song "%songsDir%\%songName%_song.wav.fsb" -replace_qbkey %songName%_preview "%songsDir%\%songName%_preview.wav.fsb" 


echo Deleting unneeded C header files
cd "%songsDir%"
del *.h

GOTO :eof