From b1920c38f0383ccee024a140dcbd4b13c089ca52 Mon Sep 17 00:00:00 2001 From: Artemis Tosini Date: Thu, 4 Apr 2024 20:39:34 +0000 Subject: [PATCH] add necrodancer_shop.sh in case you want that --- scripts/necrodancer_shop.sh | 44 +++++++++++++++++++++++++++++++++++++ 1 file changed, 44 insertions(+) create mode 100755 scripts/necrodancer_shop.sh diff --git a/scripts/necrodancer_shop.sh b/scripts/necrodancer_shop.sh new file mode 100755 index 0000000..9c3a6f7 --- /dev/null +++ b/scripts/necrodancer_shop.sh @@ -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_.ogg +# Remixes named zone__.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