Skip to content

Instantly share code, notes, and snippets.

@ssokolow
Last active January 8, 2022 17:44
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ssokolow/9541684 to your computer and use it in GitHub Desktop.
Save ssokolow/9541684 to your computer and use it in GitHub Desktop.
Simple script for joining Cave Story+ track fragments into files that sound nice in your audio player
#!/bin/sh
# Tool for generating acceptable soundtrack Oggs from Cave Story+ data files
#
# Usage:
# 1. Save this and chmod it executable
# 2. cd into CaveStory+/data/base/Ogg11
# 3. Run something like "~/cavestoryplus_dump.sh curly"
# 4. Enjoy your music
#
# Dependencies:
# - SoX
# - oggvideotools
if [ "$#" = 0 ]; then
echo "Usage: $0 <track name> [...]"
echo 'Note: The track name is the portion before the "_intro" or "_loop"'
exit
fi
for X in "$@"; do
sox "${X}_loop.ogg" -C 5 "${X}_fade.ogg" fade h 0 6 6
oggCat "${X}.ogg" "${X}_intro.ogg" "${X}_loop.ogg" "${X}_fade.ogg"
rm "${X}_fade.ogg"
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment