Version 3.4.0: Edit tab (edit list, large subtitle, replacements with effects and presets), Sounds tab only browses, ackit fx (pedalboard + own reverb) and replace --fx, first Linux build, catalog without a mod package

This commit is contained in:
2026-10-28 13:54:12 +01:00
parent a706dae419
commit 6de470174e
36 changed files with 2872 additions and 278 deletions

View File

@@ -14,6 +14,7 @@ The game folder is detected from Steam (Windows, Linux, Proton); override with -
language (default: the game's); languages without their own voices use the INT voice lines, like the game.
"""
import argparse
import json
import os
import sys
@@ -124,6 +125,9 @@ def _process(a, x, sr, ws, s):
x = audio.trim(x, sr, float(start or 0), float(end) if end else None)
if a.trim_silence:
x = audio.trim_silence(x, rate=sr)
if a.fx:
from . import fx
x = fx.render(x, sr, json.load(open(a.fx, encoding="utf-8")), s.channels)
if a.match_loudness:
ref, _ = ws.original_audio(s)
x = audio.match_loudness(x, ref)
@@ -134,6 +138,14 @@ def _process(a, x, sr, ws, s):
return x
def cmd_fx_template(a):
from . import fx
with open(a.out, "w", encoding="utf-8") as f:
json.dump(fx.defaults(), f, indent=1)
print("wrote %s: set \"on\": true on the effects you want (blocks: %s)"
% (a.out, ", ".join(b.key for b in fx.BLOCKS)))
def cmd_replace(a):
ws = _workspace(a)
s = ws.sound(a.name)
@@ -364,6 +376,7 @@ def build_parser():
proc = argparse.ArgumentParser(add_help=False)
proc.add_argument("--trim", metavar="START:END", help="keep only this part (seconds), e.g. 0.5:4.2")
proc.add_argument("--trim-silence", action="store_true", help="cut leading/trailing silence")
proc.add_argument("--fx", metavar="FILE", help="effects settings (JSON, see `ackit fx-template`)")
proc.add_argument("--gain", type=float, metavar="DB", help="volume change in dB")
proc.add_argument("--normalize", action="store_true", help="peak-normalize to -1 dBFS")
proc.add_argument("--match-loudness", action="store_true", help="match the original's loudness")
@@ -382,6 +395,9 @@ def build_parser():
s.add_argument("--group"); s.add_argument("--category"); s.add_argument("--character")
s.add_argument("--inferred", action="store_true", help="also match characters inferred from names")
s.add_argument("--modified", action="store_true"); s.add_argument("--csv", metavar="FILE")
s = add("fx-template", cmd_fx_template, "write effects settings with every effect off (edit, then "
"use with replace --fx)")
s.add_argument("out")
s = add("info", cmd_info, "show details of a sound (or of a .wem file)")
s.add_argument("name")
s = add("extract", cmd_extract, "save a sound as .wav (decoded) or .wem")