Files
SoundGame/tools/gen_cipher_bgm_post.sh
T
xsl 4b39ae2e49 feat(new8/batch3-4): cipher/teahouse/keeper/bridge 全套交付——new8 八款全部可交付收官
四泳道并行全流水线(资产→开发→测试→玩家迭代闭环),双双 R1-R2 连续达标裁定可交付:
- cipher《暗码》223 断言:摩尔斯解码嵌叙事/四结局矩阵/暴露度逐NIGHT验算/三层兜底;R2 三修(链首标记音/预警震/结局计数句+4句补录)4/4 全满分档
- teahouse《深夜茶馆》205 断言:泡茶时机窗/经济逐晚对账/多晚弧线;连续 2 轮 4/4 愿意玩 P0=0
- keeper《守塔人》257 断言:时空签名教学-兑现/插叙触发回返/trust×truth 档位/4结局;R2 F1/F2 坐实(震型豁免/首播跳句锁)4/4
- bridge《星环舰长》336 断言:巡检节奏逐毫秒/危机×系统态矩阵/仲裁7场景/忠诚差分/评级验算;R1 当场修F1-F4、R2 F5 菜单顺延保护 4/4 上行

公共:index.html 四卡片+profiles.js 四桶+check_all_assets 登记(预接线)、00-program 八款进度账收账、
gen_voice_dual 四游戏段、README/HANDOVER 阵容更新(11 款)、voice_text.json 四游戏键、mureka 台账(累计$1.26/$2.00)

验证:四游戏 playtest 223/205/257/336 全绿 + guide 122/122 + 全项目 15 游戏资产终检绿
遗留:keeper 三代人声滤波人耳试听(最高优先,ASR 对滤波句失明)、bridge 音频 32MB 超软指引 2MB(压缩候选)
2026-09-14 05:48:13 +08:00

35 lines
1.7 KiB
Bash
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
#!/bin/bash
# 《暗码》BGM 后处理(批次 3):Mureka flac 候选 -> 90s 无缝循环 ogg+m4a。
# 用法: bash tools/gen_cipher_bgm_post.sh (flac 原件在 tools/mureka_out/,不入库)
#
# 工艺(tools/gen_hunt_bgm.sh 同款):首个强 onset 起点(silenceremove,-35dB 门限)
# → 93s 裁剪 → 首尾 3s acrossfade(tri) 无缝循环 → loudnorm I=-20/TP=-2/LRA=11
# → aresample 44.1kHz → ogg libvorbis q3 + m4a aac 128k,落 web/cipher/audio/bgm/。
# cipher 无节拍网格玩法,不跑 bpm_precise(dungeon/hunt 先例)。
set -euo pipefail
cd "$(dirname "$0")/.."
export PATH="$PWD/tools/bin:$PATH"
TMP=tools/bgm_post_wav/cipher
DST=web/cipher/audio/bgm
mkdir -p "$TMP" "$DST"
post() { # post <flac> <track>
local src="$1" track="$2"
local tmp="$TMP/$track.wav"
ffmpeg -y -v error -i "$src" -af \
"silenceremove=start_periods=1:start_threshold=-35dB:start_silence=0.02,atrim=end=93,asetpts=PTS-STARTPTS,asplit[a][b];[b]atrim=start=90,asetpts=PTS-STARTPTS[t];[a][t]acrossfade=d=3:c1=tri:c2=tri,loudnorm=I=-20:TP=-2:LRA=11,aresample=44100" \
"$tmp"
ffmpeg -y -v error -i "$tmp" -c:a libvorbis -q:a 3 "$DST/$track.ogg"
ffmpeg -y -v error -i "$tmp" -c:a aac -b:a 128k "$DST/$track.m4a"
echo "$track <- $src"
}
# 选用候选 = 时长更接近 90s 的那支(拿不准原则),详见 tools/mureka_log.md cipher 节
post tools/mureka_out/cipher-radio_room/160722319310849_0.flac radio_room # 147.8s
post tools/mureka_out/cipher-closing/160722506153986_0.flac closing # 159.5s
post tools/mureka_out/cipher-night/160722722226177_0.flac night # 168.6s
post tools/mureka_out/cipher-ending/160722885607425_0.flac ending # 163.6s
echo "== cipher bgm done: $(ls "$DST" | wc -l) files =="