S3M/MON converters using NOTE_CUT for note-off because of fadeout semantics

This commit is contained in:
minjaesong
2026-05-06 21:57:11 +09:00
parent 937d3e27ed
commit ec0f41b574
2 changed files with 2 additions and 2 deletions

View File

@@ -132,7 +132,7 @@ def mon_note_to_taud(mon_note: int) -> int:
if mon_note == 0:
return NOTE_NOP
if mon_note == 0x7F:
return NOTE_KEYOFF
return NOTE_CUT
val = TAUD_C4 + round((mon_note - MON_NOTE_C4) * 4096.0 / 12.0)
return max(1, min(0xFFFD, val))

View File

@@ -226,7 +226,7 @@ def encode_note(s3m_note: int) -> int:
if s3m_note == S3M_NOTE_EMPTY:
return NOTE_NOP
if s3m_note == S3M_NOTE_OFF:
return NOTE_KEYOFF
return NOTE_CUT
octave = (s3m_note >> 4) & 0xF
pitch = s3m_note & 0xF
if pitch > 11: