From 2b91251d6e4c86c2ae8d73cb9229a984bb10b9dd Mon Sep 17 00:00:00 2001 From: minjaesong Date: Sat, 2 May 2026 03:25:57 +0900 Subject: [PATCH] fix: random pitch changes; NNA note cut (not off!) for MOD and S3M --- mod2taud.py | 7 ++++--- s3m2taud.py | 7 ++++--- terranmon.txt | 5 +++-- 3 files changed, 11 insertions(+), 8 deletions(-) diff --git a/mod2taud.py b/mod2taud.py index 930612a..ee6e6ac 100644 --- a/mod2taud.py +++ b/mod2taud.py @@ -522,9 +522,10 @@ def build_sample_inst_bin(samples: list) -> tuple: inst_bin[base + 21] = env_vol inst_bin[base + 22] = 0 inst_bin[base + 171] = 0xFF # instrument global volume - inst_bin[base + 176] = 0xFF # default pan = off - inst_bin[base + 181] = 0xFF # filter cutoff = off - inst_bin[base + 182] = 0xFF # filter resonance = off + inst_bin[base + 177] = 0x80 # default pan = centre (unused; pan env "p" flag not set) + inst_bin[base + 182] = 0xFF # filter cutoff = off + inst_bin[base + 183] = 0xFF # filter resonance = off + inst_bin[base + 186] = 1 # NNA: note cut vprint(f" instrument[{taud_idx}] '{s.name}' ptr={ptr} c2spd={s.c2spd} " f"vol={s.volume} loop=({ls},{le},{'on' if loop_mode else 'off'})") diff --git a/s3m2taud.py b/s3m2taud.py index ebaa9ec..f6dab4b 100644 --- a/s3m2taud.py +++ b/s3m2taud.py @@ -514,9 +514,10 @@ def build_sample_inst_bin(instruments: list) -> tuple: inst_bin[base + 21] = env_vol inst_bin[base + 22] = 0 inst_bin[base + 171] = 0xFF # instrument global volume - inst_bin[base + 176] = 0xFF # default pan = off - inst_bin[base + 181] = 0xFF # filter cutoff = off - inst_bin[base + 182] = 0xFF # filter resonance = off + inst_bin[base + 177] = 0x80 # default pan = centre (unused; pan env "p" flag not set) + inst_bin[base + 182] = 0xFF # filter cutoff = off + inst_bin[base + 183] = 0xFF # filter resonance = off + inst_bin[base + 186] = 1 # NNA: note cut vprint(f" instrument[{base // 192}] '{inst.name}' ptr: '{ptr}', sampling rate: '{inst.c2spd}'") if inst.c2spd > 65535: diff --git a/terranmon.txt b/terranmon.txt index 988d5a9..98dbe96 100644 --- a/terranmon.txt +++ b/terranmon.txt @@ -2090,15 +2090,16 @@ TODO: [x] implement Instrument Flag, Vibrato Depth, Vibrato Rate, other samplewise/instrumentwise changes to it2taud and audio engine [x] implement new note action on the audio engine (IT uses "background channels", maybe we can do the same but make "background channels" mixer-private) [x] (same context as above) implement S7x command - [ ] on playback, panning changes randomly on Taud made by s3m2taud.py and mod2taud.py, but not by it2taud.py (maybe something's off with the instrument exports?) + [x] on playback, panning changes randomly on Taud made by s3m2taud.py and mod2taud.py, but not by it2taud.py (maybe something's off with the instrument exports?) + [x] NNA not disabled for S3M and MOD [ ] implement S6x command [ ] `S B000` and `S B100` not working as intended -- on first playback it jumps to the next cue same row, on subsequent playbacks the commands are completely ignored [ ] implement Wxx command (global volume slide) [ ] implement sample loop sustain - [ ] Amiga mode freq shift now "underdelivers" (pitch bend not "strong" enough) -- appear to be fixed (2nd_pm.taud is the only one behaves incorrectly) [ ] cue and pattern compression of the Taud format (taud_common.py, taud.mjs) [ ] figure out how IT (8 bits) and FT2 (12 bits) handles volume fadeout numbers, and come up with a compatible Taud spec, then implement [ ] implement bitcrusher (eff sym '8') + [ ] Figure out why pitch slides are not working right on 2nd_pm.s3m only Play Data: play data are series of tracker-like instructions, visualised as: