mirror of
https://github.com/curioustorvald/tsvm.git
synced 2026-06-08 14:24:05 +09:00
2taud update
This commit is contained in:
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user