2taud update

This commit is contained in:
minjaesong
2026-04-29 11:27:29 +09:00
parent 2282e0c10b
commit 27e4bc1ae5
3 changed files with 5 additions and 5 deletions

View File

@@ -624,8 +624,8 @@ def build_sample_inst_bin(instruments: list) -> tuple:
struct.pack_into('<H', inst_bin, base + 8, ls)
struct.pack_into('<H', inst_bin, base + 10, le)
inst_bin[base + 12] = flags_byte
# Volume envelope: hold at instrument volume (vol*4 clamped to 255)
env_vol = min(inst.volume * 4, 255)
# Volume envelope: hold at instrument volume (clamped to 0x3F)
env_vol = min(inst.volume, 63)
inst_bin[base + 16] = env_vol # volume
inst_bin[base + 17] = 0 # offset minifloat = 0 → hold