add necrodancer_shop.sh in case you want that

This commit is contained in:
Artemis Tosini 2024-04-04 20:39:34 +00:00
parent bbfde0b795
commit b1920c38f0
Signed by: artemist
GPG key ID: EE5227935FE3FF18

44
scripts/necrodancer_shop.sh Executable file
View file

@ -0,0 +1,44 @@
#!/usr/bin/env nix-shell
#!nix-shell -i bash -p bash ffmpeg
#shellcheck shell=bash
set -euo pipefail
if [[ $# -ne 2 ]]; then
echo "usage: $0 /path/to/necrodancer /path/to/output"
exit 1
fi
# Original songs named zone<zone>_<level>.ogg
# Remixes named zone<zone>_<level>_<remix>.ogg
# I think remix IDs are:
# (none): Danny Baranowsky
# 1: A_Rival
# 2: Jules Conroy
# 3: virt
# 4: Girlfriend Records
# 5: OverClocked
# 6: Masafumi Takada
# chp: Chipzel
music="$1/data/music"
sounds="$1/data/sounds_streaming"
for zone in {1..4}; do
if [[ $zone -eq 3 ]]; then
suffixes=( "c" "h" )
else
suffixes=( "" )
fi
for level in {1..3}; do
for remix in "" _1 _2 _3 _4 _6 _chp; do
for suffix in "${suffixes[@]}"; do
ffmpeg -y \
-i "$music/zone${zone}_${level}${remix}${suffix}.ogg" \
-i "$sounds/zone${zone}_${level}${suffix}_shopkeeper.ogg" \
-filter_complex amix=inputs=2:duration=longest \
-b:a 128k \
"$2/zone${zone}_${level}${remix}${suffix}_complete.opus"
done
done
done
done